Created
March 26, 2012 11:26
-
-
Save mchamplain/2204509 to your computer and use it in GitHub Desktop.
Dynamic apache configuration for dev
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
| <VirtualHost *:80> | |
| ServerName dev.local | |
| ServerAlias *.dev.local | |
| DocumentRoot /var/www/vhosts/ | |
| # get the server name from the Host: header | |
| UseCanonicalName Off | |
| LogLevel warn | |
| LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon | |
| CustomLog /var/log/apache2/dynamic.log vcommon | |
| ErrorLog /var/log/apache2/dynamic.error.log | |
| RewriteLogLevel 0 | |
| RewriteLog /var/log/apache2/dynamic.rewrite.log | |
| # include the server name in the filenames used to satisfy requests | |
| VirtualDocumentRoot /var/www/vhosts/%-3-/public | |
| DirectoryIndex index.php | |
| <Directory /var/www/vhosts/*/public> | |
| RewriteEngine On | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| # For VirtualDocumentRoot configurations | |
| RewriteRule ^(.*)$ /index.php [L,QSA] | |
| Options Indexes FollowSymLinks MultiViews | |
| AllowOverride All | |
| 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