Created
May 4, 2011 18:37
-
-
Save eddiemonge/955742 to your computer and use it in GitHub Desktop.
Virtual Host Example
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
<VirtualHost IPADDRESS:PORT> | |
ServerAdmin [email protected] | |
ServerName domain.com | |
ServerAlias www.domain.com | |
DocumentRoot /var/www/html | |
<Directory "/var/www/html"> | |
Options FollowSymLinks | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] | |
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] | |
</Directory> | |
ErrorLog /var/www/logs/site.error.log | |
CustomLog /var/www/logs/site.access.log combined | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment