Skip to content

Instantly share code, notes, and snippets.

@marcodamm
Created December 5, 2017 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcodamm/01d810f60ada011aebed11c0bbe03ea9 to your computer and use it in GitHub Desktop.
Save marcodamm/01d810f60ada011aebed11c0bbe03ea9 to your computer and use it in GitHub Desktop.
# On your vagrant machine
# on command line to duplicate scotchbox.local.conf
# sudo cp /etc/apache2/sites-available/scotchbox.local.conf /etc/apache2/sites-available/test.local.conf
# Edit this file test.local.conf
# sudo nano /etc/apache2/sites-available/test.local.conf
# put this line :
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName test.local
ServerAlias www.test.local
DocumentRoot /var/www/public/Nexus
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
# Active the vhost :
# sudo a2ensite /etc/apache2/sites-available/test.local.conf
# Restart apache :
# sudo service apache2 reload
# On your local machine
# Now on your local machine manage your hosts (macosX) :
# sudo nano /private/etc/hosts
# Add this line (with ip access of your vagrant machine):
# 192.168.33.10 test.local
# 192.168.33.10 www.test.local
# Now test in the browser : http://www.test.local or http://test.local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment