Created
September 21, 2010 10:49
-
-
Save sassman/589530 to your computer and use it in GitHub Desktop.
vhosts examples and snippets
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
<?php | |
class DATABASE_CONFIG { | |
var $default = array( | |
'driver' => 'mysql', | |
'persistent' => false, | |
'host' => 'localhost', | |
'login' => ':user', | |
'password' => ':password', | |
'database' => ':database', | |
'prefix' => '', | |
'encoding' => 'utf8' | |
); | |
} |
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 :servername | |
ServerAlias :serveralias www.:serveralias | |
# ServerAlias :serveralias | |
DocumentRoot /home/sassman/web/:appname/app/webroot | |
Options -Indexes FollowSymLinks | |
#disable htaccess starting at / | |
<Directory /> | |
AllowOverride none | |
</Directory> | |
<Directory /home/sassman/web/:appname/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> |
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 :servername | |
ServerAlias :serveralias www.:serveralias | |
DocumentRoot /var/vhosts/:appname/app/webroot | |
# Possible values include: debug, info, notice, warn, error, crit, | |
LogLevel warn | |
ErrorLog /var/vhosts/:serveralias/logs/apache2_error.log | |
CustomLog /var/vhosts/:serveralias/logs/apache2_access.log combined | |
Options -Indexes FollowSymLinks | |
#disable htaccess starting at / | |
<Directory /> | |
AllowOverride none | |
</Directory> | |
<Directory /var/vhosts/:appname/app/webroot/> | |
RewriteEngine On | |
RewriteBase / | |
# removing www | |
#RewriteCond %{HTTP_HOST} ^www.:serveralias$ [NC] | |
#RewriteRule ^(.*)$ http://:serveralias/$1 [R=301,L] | |
# adding www | |
#RewriteCond %{HTTP_HOST} ^:serveralias$ | |
#RewriteRule (.*) http://www.:serveralias$1 [R=301] | |
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