Created
November 19, 2012 16:31
-
-
Save holly/4111651 to your computer and use it in GitHub Desktop.
apache cakephp vhost config
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 *:80> | |
#this handles sitename.example.com | |
ServerName example.com | |
ServerAlias *.example.com | |
Options -Indexes FollowSymLinks | |
UseCanonicalName Off | |
VirtualDocumentRoot /opt/example/sites/%1/app/webroot | |
<Directory /> | |
AllowOverride none | |
</Directory> | |
<Directory "/opt/example/sites/*/app/webroot/"> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^/opt/example/sites/(.*)/app/webroot/(.*)$ index.php?url=$2 [QSA,L] | |
<Files sitemap.xml> | |
RewriteEngine Off | |
</Files> | |
</Directory> | |
</VirtualHost> |
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 *:80> | |
ServerName www.example.com | |
ServerAlias www.example.com example.com | |
DocumentRoot /var/www/example/app/webroot | |
Options -Indexes FollowSymLinks | |
#disable htaccess starting at / | |
<Directory /> | |
AllowOverride none | |
</Directory> | |
<Directory /var/www/example/app/webroot/> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] | |
<Files sitemap.xml> | |
RewriteEngine Off | |
</Files> | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment