Thursday, July 27, 2023

subdomain vhost code

_________________________>>>>><<<<<_____________________ replace sub.mritsolotion.com to your subdomain name. sudo mkdir /var/www/sub.mritsolotion.com sudo chown -R $USER:$USER /var/www/sub.mritsolotion.com sudo chmod -R 777 /var/www/sub.mritsolotion.com sudo chmod -R -f 777 /var/www/sub.mritsolotion.com nano /var/www/sub.mritsolotion/index.php sudo nano /etc/apache2/sites-available/sub.mritsolotion.com.conf ServerAdmin webmaster@localhost ServerName sub.mritsolotion.com ServerAlias www.sub.mritsolotion.com DocumentRoot /var/www/sub.mritsolotion.com Options FollowSymLinks AllowOverride all Require all granted ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined sudo a2ensite sub.mritsolotion.com sudo systemctl reload apache2 _________<<<<<>>>>>___________