Created
October 13, 2017 08:55
-
-
Save mhasan3/63bade2262e2b0859da5dcee4aff8e6e to your computer and use it in GitHub Desktop.
how to create virtual host in ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName example.com | |
ServerAlias www.example.com | |
DocumentRoot /var/www/example.com/public_html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> | |
sudo a2ensite example.com.conf | |
sudo service apache2 restart | |
sudo nano /etc/hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment