2 # Apache/PHP/Drupal settings.
4 # Default setup is for running drupal in vhost.
5 # You can setup drupal as alias /drupal, but you need to comment/uncomment few things.
7 # Please note that drupal-ID's don't work in subdirs, you need vhost for that.
9 <Directory /usr/share/drupal/htdocs>
10 Options FollowSymLinks
12 <IfModule mod_access.c>
17 # Set the default handler.
19 DirectoryIndex index.php
22 # Override PHP settings. More in sites/default/settings.php
23 # but the following cannot be changed at runtime.
27 php_value magic_quotes_gpc 0
28 php_value register_globals 0
29 php_value session.auto_start 0
30 php_value mbstring.http_input pass
31 php_value mbstring.http_output pass
32 php_value mbstring.encoding_translation 0
35 # PHP 5, Apache 1 and 2.
37 php_value magic_quotes_gpc 0
38 php_value register_globals 0
39 php_value session.auto_start 0
40 php_value mbstring.http_input pass
41 php_value mbstring.http_output pass
42 php_value mbstring.encoding_translation 0
45 # Reduce the time dynamically generated pages are cache-able.
46 <IfModule mod_expires.c>
47 ExpiresByType text/html A1
50 # Various rewrite rules.
51 <IfModule mod_rewrite.c>
54 # Modify the RewriteBase if you are using Drupal in a subdirectory and
55 # the rewrite rules are not working properly.
56 # Enable RewriteBase if you have drupal configured in virtualhost root.
59 # Rewrite old-style URLs of the form 'node.php?id=x'.
60 #RewriteCond %{REQUEST_FILENAME} !-f
61 #RewriteCond %{REQUEST_FILENAME} !-d
62 #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
63 #RewriteRule node.php index.php?q=node/view/%1 [L]
65 # Rewrite old-style URLs of the form 'module.php?mod=x'.
66 #RewriteCond %{REQUEST_FILENAME} !-f
67 #RewriteCond %{REQUEST_FILENAME} !-d
68 #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
69 #RewriteRule module.php index.php?q=%1 [L]
71 # Rewrite current-style URLs of the form 'index.php?q=x'.
72 RewriteCond %{REQUEST_FILENAME} !-f
73 RewriteCond %{REQUEST_FILENAME} !-d
74 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
77 # Customized error messages.
78 ErrorDocument 404 /index.php
81 # If having drupal installed as /drupal
82 #<IfModule mod_alias.c>
83 # Alias /drupal/files /var/lib/drupal
84 # Alias /drupal /usr/share/drupal/htdocs
88 # # Customized error messages.
89 # ErrorDocument 404 /drupal/index.php
92 <Directory /var/lib/drupal>
98 ServerAlias www.drupal
99 DocumentRoot /usr/share/drupal/htdocs
101 <IfModule mod_alias.c>
102 Alias /files /var/lib/drupal
106 # vim: filetype=apache ts=4 sw=4 et