Difference between revisions of "Configuring virtual hosts in Ubuntu Apache"

From MyWiki
Jump to: navigation, search
(Created page with "Create a new virtual host file as follows:<br> sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf<br> The edit it to look lik...")
 
Line 11: Line 11:
 
</VirtualHost>
 
</VirtualHost>
 
</source>
 
</source>
 +
Create another one if necessary. <br>

Revision as of 11:56, 23 February 2016

Create a new virtual host file as follows:
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf

The edit it to look like below:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Create another one if necessary.