Last active
August 29, 2015 14:15
-
-
Save johnrc/956d3ba78d4539caf3a3 to your computer and use it in GitHub Desktop.
Basic Apache virtual host configuration
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
# http://www.rackspace.com/knowledge_center/article/how-to-serve-multiple-domains-using-virtual-hosts | |
# Uncomment this line from /etc/httpd/conf/httpd.conf | |
NameVirtualHost *:80 | |
# Create multiple files for each vhost or put them all in one | |
# They just need to be named with *.conf to be picked up | |
<VirtualHost *:80> | |
ServerName example.org | |
ServerAlias *.example.org | |
ServerAdmin [email protected] | |
ErrorLog /var/log/httpd/example.err | |
CustomLog /var/log/httpd/example.log combined | |
DocumentRoot /var/www/html/mysite2 | |
<Directory "/var/www/html/mysite2"> | |
Order allow,deny | |
Allow from all | |
</Directory> | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerName example.com | |
ServerAlias *.example.com | |
ServerAdmin [email protected] | |
ErrorLog /var/log/httpd/example.err | |
CustomLog /var/log/httpd/example.log combined | |
DocumentRoot /var/www/html/piwik | |
<Directory "/var/www/html/piwik"> | |
Order allow,deny | |
Allow from all | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment