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
15 # Set the default handler.
17 DirectoryIndex index.php
20 # Override PHP settings. More exist in sites/default/settings.php, but
21 # the following cannot be changed at runtime. The first IfModule is
22 # for Apache 1.3, the second for Apache 2.
23 # php4 module under Apache 1.3
25 php_value magic_quotes_gpc 0
26 php_value register_globals 0
27 php_value session.auto_start 0
28 php_value memory_limit 12M
30 # php5 module under Apache 1.3
32 php_value magic_quotes_gpc 0
33 php_value register_globals 0
34 php_value session.auto_start 0
35 php_value memory_limit 12M
38 # php under Apache 2.x module
39 <IfModule sapi_apache2.c>
40 php_value magic_quotes_gpc 0
41 php_value register_globals 0
42 php_value session.auto_start 0
43 php_value memory_limit 12M
46 # Reduce the time dynamically generated pages are cache-able.
47 <IfModule mod_expires.c>
48 ExpiresByType text/html A1
51 # Various rewrite rules.
52 <IfModule mod_rewrite.c>
55 # Modify the RewriteBase if you are using Drupal in a subdirectory and
56 # the rewrite rules are not working properly.
57 # Enable RewriteBase if you have drupal configured in virtualhost root.
60 # Rewrite old-style URLs of the form 'node.php?id=x'.
61 #RewriteCond %{REQUEST_FILENAME} !-f
62 #RewriteCond %{REQUEST_FILENAME} !-d
63 #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
64 #RewriteRule node.php index.php?q=node/view/%1 [L]
66 # Rewrite old-style URLs of the form 'module.php?mod=x'.
67 #RewriteCond %{REQUEST_FILENAME} !-f
68 #RewriteCond %{REQUEST_FILENAME} !-d
69 #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
70 #RewriteRule module.php index.php?q=%1 [L]
72 # Rewrite current-style URLs of the form 'index.php?q=x'.
73 RewriteCond %{REQUEST_FILENAME} !-f
74 RewriteCond %{REQUEST_FILENAME} !-d
75 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
78 # Customized error messages.
79 ErrorDocument 404 /index.php
82 # If having drupal installed as /drupal
83 #<IfModule mod_alias.c>
84 # Alias /drupal/files /var/lib/drupal
85 # Alias /drupal /usr/share/drupal/htdocs
89 # # Customized error messages.
90 # ErrorDocument 404 /drupal/index.php
93 <Directory /var/lib/drupal>
100 ServerAlias www.drupal
101 DocumentRoot /usr/share/drupal/htdocs
103 <IfModule mod_alias.c>
104 Alias /files /var/lib/drupal
108 # vim: filetype=apache ts=4 sw=4 et