]> git.pld-linux.org Git - packages/drupal.git/blob - drupal-apache1.conf
- restore r1.15
[packages/drupal.git] / drupal-apache1.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 in sites/default/settings.php
23     # but the following cannot be changed at runtime.
24
25     # PHP 4, Apache 1.
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     </IfModule>
34
35     # PHP 5, Apache 1 and 2.
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     </IfModule>
44
45     # Reduce the time dynamically generated pages are cache-able.
46     <IfModule mod_expires.c>
47         ExpiresByType text/html A1
48     </IfModule>
49
50     # Various rewrite rules.
51     <IfModule mod_rewrite.c>
52         RewriteEngine on
53
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.
57         #RewriteBase /drupal
58
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]
64
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]
70
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]
75     </IfModule>
76
77     # Customized error messages.
78     ErrorDocument 404 /index.php
79 </Directory>
80
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
85 #</IfModule>
86 #
87 #<Location /drupal>
88 #    # Customized error messages.
89 #    ErrorDocument 404 /drupal/index.php
90 #</Location>
91
92 <Directory /var/lib/drupal>
93     allow from all
94 </Directory>
95
96 <VirtualHost *:80>
97     ServerName drupal
98     ServerAlias www.drupal
99     DocumentRoot /usr/share/drupal/htdocs
100
101     <IfModule mod_alias.c>
102         Alias /files /var/lib/drupal
103     </IfModule>
104 </VirtualHost>
105
106 # vim: filetype=apache ts=4 sw=4 et
This page took 0.06015 seconds and 3 git commands to generate.