]> git.pld-linux.org Git - packages/drupal.git/blob - drupal.conf
- Up to 6.20, NT
[packages/drupal.git] / drupal.conf
1 #
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.
6 #
7 # Please note that drupal-ID's don't work in subdirs, you need vhost for that.
8
9 <Directory /usr/share/drupal/htdocs>
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 mbstring.http_input               pass
31                 php_value mbstring.http_output              pass
32                 php_value mbstring.encoding_translation     0
33                 php_value memory_limit                      12M
34         </IfModule>
35         # php5 module under Apache 1.3
36         <IfModule mod_php5.c>
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
43                 php_value memory_limit                      12M
44         </IfModule>
45
46         # php under Apache 2.x module
47         <IfModule sapi_apache2.c>
48                 php_value magic_quotes_gpc                  0
49                 php_value register_globals                  0
50                 php_value session.auto_start                0
51                 php_value mbstring.http_input               pass
52                 php_value mbstring.http_output              pass
53                 php_value mbstring.encoding_translation     0
54                 php_value memory_limit                      12M
55         </IfModule>
56
57         # Reduce the time dynamically generated pages are cache-able.
58         <IfModule mod_expires.c>
59                 ExpiresByType text/html A1
60         </IfModule>
61
62         # Various rewrite rules.
63         <IfModule mod_rewrite.c>
64                 RewriteEngine on
65
66                 # Modify the RewriteBase if you are using Drupal in a subdirectory and
67                 # the rewrite rules are not working properly.
68                 # Enable RewriteBase if you have drupal configured in virtualhost root.
69                 #RewriteBase /drupal
70
71                 # Rewrite old-style URLs of the form 'node.php?id=x'.
72                 #RewriteCond %{REQUEST_FILENAME} !-f
73                 #RewriteCond %{REQUEST_FILENAME} !-d
74                 #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
75                 #RewriteRule node.php index.php?q=node/view/%1 [L]
76
77                 # Rewrite old-style URLs of the form 'module.php?mod=x'.
78                 #RewriteCond %{REQUEST_FILENAME} !-f
79                 #RewriteCond %{REQUEST_FILENAME} !-d
80                 #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
81                 #RewriteRule module.php index.php?q=%1 [L]
82
83                 # Rewrite current-style URLs of the form 'index.php?q=x'.
84                 RewriteCond %{REQUEST_FILENAME} !-f
85                 RewriteCond %{REQUEST_FILENAME} !-d
86                 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
87         </IfModule>
88
89         # Customized error messages.
90         ErrorDocument 404 /index.php
91 </Directory>
92
93 # If having drupal installed as /drupal
94 #<IfModule mod_alias.c>
95 #       Alias /drupal/files /var/lib/drupal
96 #       Alias /drupal /usr/share/drupal/htdocs
97 #</IfModule>
98 #
99 #<Location /drupal>
100 #       # Customized error messages.
101 #       ErrorDocument 404 /drupal/index.php
102 #</Location>
103
104 <Directory /var/lib/drupal>
105         Allow from all
106         SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
107         Options None
108         <IfModule mod_rewrite.c>
109                 RewriteEngine off
110         </IfModule>
111 </Directory>
112
113 <VirtualHost *:80>
114         ServerName drupal
115         ServerAlias www.drupal
116         DocumentRoot /usr/share/drupal/htdocs
117
118         <IfModule mod_alias.c>
119                 Alias /files /var/lib/drupal
120         </IfModule>
121 </VirtualHost>
122
123 # vim:ft=apache
This page took 0.074637 seconds and 3 git commands to generate.