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