]>
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> | |
ad7425e6 | 16 | |
eb3fbb5f | 17 | # Set the default handler. |
05607353 ER |
18 | <IfModule mod_dir.c> |
19 | DirectoryIndex index.php | |
20 | </IfModule> | |
ad7425e6 | 21 | |
eb3fbb5f ER |
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 | <IfModule mod_php4.c> | |
26 | php_value magic_quotes_gpc 0 | |
27 | php_value register_globals 0 | |
28 | php_value session.auto_start 0 | |
29 | </IfModule> | |
ad7425e6 | 30 | |
eb3fbb5f ER |
31 | <IfModule sapi_apache2.c> |
32 | php_value magic_quotes_gpc 0 | |
33 | php_value register_globals 0 | |
34 | php_value session.auto_start 0 | |
35 | </IfModule> | |
ad7425e6 | 36 | |
eb3fbb5f ER |
37 | # Reduce the time dynamically generated pages are cache-able. |
38 | <IfModule mod_expires.c> | |
39 | ExpiresByType text/html A1 | |
40 | </IfModule> | |
ad7425e6 | 41 | |
eb3fbb5f ER |
42 | # Various rewrite rules. |
43 | <IfModule mod_rewrite.c> | |
44 | RewriteEngine on | |
45 | ||
46 | # Modify the RewriteBase if you are using Drupal in a subdirectory and | |
47 | # the rewrite rules are not working properly. | |
abf9ab9f ER |
48 | # Enable RewriteBase if you have drupal configured in virtualhost root. |
49 | #RewriteBase /drupal | |
eb3fbb5f ER |
50 | |
51 | # Rewrite old-style URLs of the form 'node.php?id=x'. | |
52 | #RewriteCond %{REQUEST_FILENAME} !-f | |
53 | #RewriteCond %{REQUEST_FILENAME} !-d | |
54 | #RewriteCond %{QUERY_STRING} ^id=([^&]+)$ | |
55 | #RewriteRule node.php index.php?q=node/view/%1 [L] | |
56 | ||
57 | # Rewrite old-style URLs of the form 'module.php?mod=x'. | |
58 | #RewriteCond %{REQUEST_FILENAME} !-f | |
59 | #RewriteCond %{REQUEST_FILENAME} !-d | |
60 | #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$ | |
61 | #RewriteRule module.php index.php?q=%1 [L] | |
62 | ||
63 | # Rewrite current-style URLs of the form 'index.php?q=x'. | |
64 | RewriteCond %{REQUEST_FILENAME} !-f | |
65 | RewriteCond %{REQUEST_FILENAME} !-d | |
66 | RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] | |
67 | </IfModule> | |
ad7425e6 | 68 | |
eb3fbb5f ER |
69 | # Customized error messages. |
70 | ErrorDocument 404 /index.php | |
71 | </Directory> | |
ad7425e6 | 72 | |
abf9ab9f ER |
73 | # If having drupal installed as /drupal |
74 | #<IfModule mod_alias.c> | |
75 | # Alias /drupal/files /var/lib/drupal | |
76 | # Alias /drupal /usr/share/drupal/htdocs | |
77 | #</IfModule> | |
78 | # | |
79 | #<Location /drupal> | |
80 | # # Customized error messages. | |
81 | # ErrorDocument 404 /drupal/index.php | |
82 | #</Location> | |
ad7425e6 | 83 | |
abf9ab9f ER |
84 | <VirtualHost *:80> |
85 | ServerName drupal | |
86 | ServerAlias www.drupal | |
87 | DocumentRoot /usr/share/drupal/htdocs | |
ad7425e6 | 88 | |
abf9ab9f ER |
89 | <IfModule mod_alias.c> |
90 | Alias /files /var/lib/drupal | |
91 | </IfModule> | |
92 | </VirtualHost> | |
d9073a8d | 93 | |
dee1e9df | 94 | # vim: filetype=apache ts=4 sw=4 et |