]> git.pld-linux.org Git - packages/drupal.git/blame - drupal.conf
- tabs
[packages/drupal.git] / drupal.conf
CommitLineData
ad7425e6 1#
abf9ab9f
ER
2# Apache/PHP/Drupal settings.
3
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.
ad7425e6 6#
abf9ab9f 7# Please note that drupal-ID's don't work in subdirs, you need vhost for that.
ad7425e6 8
dee1e9df 9<Directory /usr/share/drupal/htdocs>
26d68da7
ER
10 Options FollowSymLinks
11 AllowOverride None
12 <IfModule mod_access.c>
13 order allow,deny
14 allow from all
15 </IfModule>
16
17 # Set the default handler.
18 <IfModule mod_dir.c>
19 DirectoryIndex index.php
20 </IfModule>
21
22 # Override PHP settings. More exist in sites/default/settings.php, but
23 # the following cannot be changed at runtime. The first IfModule is
24 # for Apache 1.3, the second for Apache 2.
25 # php4 module under Apache 1.3
26 <IfModule mod_php4.c>
27 php_value magic_quotes_gpc 0
28 php_value register_globals 0
29 php_value session.auto_start 0
30 php_value memory_limit 12M
31 </IfModule>
32 # php5 module under Apache 1.3
33 <IfModule mod_php5.c>
34 php_value magic_quotes_gpc 0
35 php_value register_globals 0
36 php_value session.auto_start 0
37 php_value memory_limit 12M
38 </IfModule>
39
40 # php under Apache 2.x module
41 <IfModule sapi_apache2.c>
42 php_value magic_quotes_gpc 0
43 php_value register_globals 0
44 php_value session.auto_start 0
45 php_value memory_limit 12M
46 </IfModule>
47
48 # Reduce the time dynamically generated pages are cache-able.
49 <IfModule mod_expires.c>
50 ExpiresByType text/html A1
51 </IfModule>
52
53 # Various rewrite rules.
54 <IfModule mod_rewrite.c>
55 RewriteEngine on
56
57 # Modify the RewriteBase if you are using Drupal in a subdirectory and
58 # the rewrite rules are not working properly.
59 # Enable RewriteBase if you have drupal configured in virtualhost root.
60 #RewriteBase /drupal
61
62 # Rewrite old-style URLs of the form 'node.php?id=x'.
63 #RewriteCond %{REQUEST_FILENAME} !-f
64 #RewriteCond %{REQUEST_FILENAME} !-d
65 #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
66 #RewriteRule node.php index.php?q=node/view/%1 [L]
67
68 # Rewrite old-style URLs of the form 'module.php?mod=x'.
69 #RewriteCond %{REQUEST_FILENAME} !-f
70 #RewriteCond %{REQUEST_FILENAME} !-d
71 #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
72 #RewriteRule module.php index.php?q=%1 [L]
73
74 # Rewrite current-style URLs of the form 'index.php?q=x'.
75 RewriteCond %{REQUEST_FILENAME} !-f
76 RewriteCond %{REQUEST_FILENAME} !-d
77 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
78 </IfModule>
79
80 # Customized error messages.
81 ErrorDocument 404 /index.php
eb3fbb5f 82</Directory>
ad7425e6 83
abf9ab9f
ER
84# If having drupal installed as /drupal
85#<IfModule mod_alias.c>
26d68da7
ER
86# Alias /drupal/files /var/lib/drupal
87# Alias /drupal /usr/share/drupal/htdocs
abf9ab9f
ER
88#</IfModule>
89#
90#<Location /drupal>
26d68da7
ER
91# # Customized error messages.
92# ErrorDocument 404 /drupal/index.php
abf9ab9f 93#</Location>
ad7425e6 94
bfb2b7e6 95<Directory /var/lib/drupal>
26d68da7 96 Allow from all
bfb2b7e6
ER
97</Directory>
98
abf9ab9f 99<VirtualHost *:80>
26d68da7
ER
100 ServerName drupal
101 ServerAlias www.drupal
102 DocumentRoot /usr/share/drupal/htdocs
ad7425e6 103
26d68da7
ER
104 <IfModule mod_alias.c>
105 Alias /files /var/lib/drupal
106 </IfModule>
abf9ab9f 107</VirtualHost>
f9fd4089 108
26d68da7 109# vim:ft=apache
This page took 0.048396 seconds and 4 git commands to generate.