Skip to content

Instantly share code, notes, and snippets.

@cravecode
Created August 17, 2011 22:16
Show Gist options
  • Save cravecode/1152780 to your computer and use it in GitHub Desktop.
Save cravecode/1152780 to your computer and use it in GitHub Desktop.
Apache Drupal Template Host File
# $Id: dist-apache2.conf,v 1.2 2009/09/16 07:37:27 deniver Exp $
#
# Keywords used by the densite script:
#
# server_name
# document_root
# allow_ip
# site_root
#
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName server_name
# Indexes + Directory Root.
DirectoryIndex index.php
DocumentRoot document_root
<Directory document_root>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>
<FilesMatch "cron.php">
Order deny,allow
Deny from all
Allow from allow_ip
</FilesMatch>
<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
Order allow,deny
</FilesMatch>
ErrorLog site_root/logs/error.log
CustomLog site_root/logs/access.log combined
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment