]> git.pld-linux.org Git - packages/drupal.git/blob - drupal.conf
- add README.PLD
[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     <IfModule mod_php4.c>
17         php_value include_path "/usr/share/drupal:/etc/drupal:."
18     </IfModule>
19
20     # Set the default handler.
21     <IfModule mod_dir.c>
22         DirectoryIndex index.php
23     </IfModule>
24
25     # Override PHP settings. More exist in sites/default/settings.php, but
26     # the following cannot be changed at runtime. The first IfModule is
27     # for Apache 1.3, the second for Apache 2.
28     <IfModule mod_php4.c>
29         php_value magic_quotes_gpc                0
30         php_value register_globals                0
31         php_value session.auto_start              0
32     </IfModule>
33
34     <IfModule sapi_apache2.c>
35         php_value magic_quotes_gpc                0
36         php_value register_globals                0
37         php_value session.auto_start              0
38     </IfModule>
39
40     # Reduce the time dynamically generated pages are cache-able.
41     <IfModule mod_expires.c>
42         ExpiresByType text/html A1
43     </IfModule>
44
45     # Various rewrite rules.
46     <IfModule mod_rewrite.c>
47         RewriteEngine on
48
49         # Modify the RewriteBase if you are using Drupal in a subdirectory and
50         # the rewrite rules are not working properly.
51         # Enable RewriteBase if you have drupal configured in virtualhost root.
52         #RewriteBase /drupal
53
54         # Rewrite old-style URLs of the form 'node.php?id=x'.
55         #RewriteCond %{REQUEST_FILENAME} !-f
56         #RewriteCond %{REQUEST_FILENAME} !-d
57         #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
58         #RewriteRule node.php index.php?q=node/view/%1 [L]
59
60         # Rewrite old-style URLs of the form 'module.php?mod=x'.
61         #RewriteCond %{REQUEST_FILENAME} !-f
62         #RewriteCond %{REQUEST_FILENAME} !-d
63         #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
64         #RewriteRule module.php index.php?q=%1 [L]
65
66         # Rewrite current-style URLs of the form 'index.php?q=x'.
67         RewriteCond %{REQUEST_FILENAME} !-f
68         RewriteCond %{REQUEST_FILENAME} !-d
69         RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
70     </IfModule>
71
72     # Customized error messages.
73     ErrorDocument 404 /index.php
74 </Directory>
75
76 # If having drupal installed as /drupal
77 #<IfModule mod_alias.c>
78 #    Alias /drupal/files /var/lib/drupal
79 #    Alias /drupal /usr/share/drupal/htdocs
80 #</IfModule>
81 #
82 #<Location /drupal>
83 #    # Customized error messages.
84 #    ErrorDocument 404 /drupal/index.php
85 #</Location>
86
87 <VirtualHost *:80>
88     ServerName drupal
89     ServerAlias www.drupal
90     DocumentRoot /usr/share/drupal/htdocs
91
92     <IfModule mod_alias.c>
93         Alias /files /var/lib/drupal
94     </IfModule>
95 </VirtualHost>
96
97 # vim: filetype=apache ts=4 sw=4 et
This page took 0.030341 seconds and 3 git commands to generate.