]>
Commit | Line | Data |
---|---|---|
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> |
eb3fbb5f | 10 | Options FollowSymLinks |
dee1e9df ER |
11 | AllowOverride None |
12 | <IfModule mod_access.c> | |
13 | order allow,deny | |
14 | allow from all | |
15 | </IfModule> | |
16 | <IfModule mod_php4.c> | |
05607353 | 17 | php_value include_path "/usr/share/drupal:/etc/drupal:." |
dee1e9df | 18 | </IfModule> |
ad7425e6 | 19 | |
eb3fbb5f | 20 | # Set the default handler. |
05607353 ER |
21 | <IfModule mod_dir.c> |
22 | DirectoryIndex index.php | |
23 | </IfModule> | |
ad7425e6 | 24 | |
eb3fbb5f ER |
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> | |
ad7425e6 | 33 | |
eb3fbb5f ER |
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> | |
ad7425e6 | 39 | |
eb3fbb5f ER |
40 | # Reduce the time dynamically generated pages are cache-able. |
41 | <IfModule mod_expires.c> | |
42 | ExpiresByType text/html A1 | |
43 | </IfModule> | |
ad7425e6 | 44 | |
eb3fbb5f ER |
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. | |
abf9ab9f ER |
51 | # Enable RewriteBase if you have drupal configured in virtualhost root. |
52 | #RewriteBase /drupal | |
eb3fbb5f ER |
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> | |
ad7425e6 | 71 | |
eb3fbb5f ER |
72 | # Customized error messages. |
73 | ErrorDocument 404 /index.php | |
74 | </Directory> | |
ad7425e6 | 75 | |
abf9ab9f ER |
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> | |
ad7425e6 | 86 | |
abf9ab9f ER |
87 | <VirtualHost *:80> |
88 | ServerName drupal | |
89 | ServerAlias www.drupal | |
90 | DocumentRoot /usr/share/drupal/htdocs | |
ad7425e6 | 91 | |
abf9ab9f ER |
92 | <IfModule mod_alias.c> |
93 | Alias /files /var/lib/drupal | |
94 | </IfModule> | |
95 | </VirtualHost> | |
d9073a8d | 96 | |
dee1e9df | 97 | # vim: filetype=apache ts=4 sw=4 et |