Skip to content

Instantly share code, notes, and snippets.

@sicksand
Created June 28, 2013 02:11
Show Gist options
  • Save sicksand/5881957 to your computer and use it in GitHub Desktop.
Save sicksand/5881957 to your computer and use it in GitHub Desktop.
adding virtualhost to apache2
I added the following file, foo, to /etc/apache2/sites-available/:
<VirtualHost *:80>
ServerName foo
DocumentRoot /var/www/foo/foo
# Other directives here
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/foo/foo>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
I then ran the following commands:
sudo a2ensite foo
sudo /etc/init.d/apache2 reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment