Last active
May 4, 2017 18:25
-
-
Save acbilimoria/e31029e2597ca1da37eb6e2eb778707e to your computer and use it in GitHub Desktop.
VHost Ubuntu 16.04 LAMP
This file contains hidden or 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 vim /etc/hosts | |
# add this line: | |
127.0.0.1 EXAMPLE.loc | |
# create new conf file based off of the default | |
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/EXAMPLE.loc.conf | |
# edit the apache2.conf file | |
# add this block of text below the other Directory tags | |
<Directory /home/mac/code/ztrust/ztrust/> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
# edit the new conf file | |
sudo vim /etc/apache2/sites-available/EXAMPLE.loc.conf | |
# add these lines: | |
ServerName EXAMPLE.loc | |
ServerAlias www.EXAMPLE.loc | |
# edit DocumentRoot line. | |
DocumentRoot PATH-TO-EXAMPLE-FILES | |
# enable the new site | |
sudo a2ensite EXAMPLE.loc.conf | |
# reload apache2 | |
sudo service apache2 reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment