Subdomain Creation in VPS Hosting Like Digital Ocean and Kamatera

 


 

sudo apt-get update

 

sudo mkdir -p /var/www/ok.mwtc.in/public_html

 

sudo chown -R $USER:$USER /var/www/ok.mwtc.in/public_html

 

sudo chmod -R 755 /var/www

 

sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/ok.mwtc.in.conf

 

sudo nano /etc/apache2/sites-available/ok.mwtc.in.conf

 

<VirtualHost *:80>

        ServerAdmin info@example.com

        ServerName ok.mwtc.com

        DocumentRoot /var/www/ok.mwtc.in/public_html

 

        <Directory /var/www/ok.mwtc.in/public_html/>

            Options Indexes FollowSymLinks

            AllowOverride All

            Require all granted

        </Directory>

 

        ErrorLog ${APACHE_LOG_DIR}/error.log

        CustomLog ${APACHE_LOG_DIR}/access.log combined

 

</VirtualHost>

 

sudo a2ensite ok.mwtc.in.conf

 

sudo service apache2 restart

 

Comments

Popular posts from this blog

Target class controller does not exist - Laravel 8