Skip to content

Instantly share code, notes, and snippets.

@sidharrell
Last active October 20, 2016 23:55
Show Gist options
  • Save sidharrell/47767f2bb468ec65a84d to your computer and use it in GitHub Desktop.
Save sidharrell/47767f2bb468ec65a84d to your computer and use it in GitHub Desktop.
vhost template
<VirtualHost *:80>
ServerName XXXXXX.localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/XXXXXX/htdocs
LogLevel warn
ErrorLog "|/sbin/cronolog /var/www/XXXXXX/logs/%Y/%m/%Y-%m-%d-error.log"
CustomLog "|/sbin/cronolog /var/www/XXXXXX/logs/%Y/%m/%Y-%m-%d-access.log" combined
<Directory /var/www/XXXXXX/htdocs/>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
AllowOverride All
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment