]>
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> |
26d68da7 ER |
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 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 | # php4 module under Apache 1.3 | |
26 | <IfModule mod_php4.c> | |
b030c5e6 ER |
27 | php_value magic_quotes_gpc 0 |
28 | php_value register_globals 0 | |
29 | php_value session.auto_start 0 | |
3e6baaa9 ER |
30 | php_value mbstring.http_input pass |
31 | php_value mbstring.http_output pass | |
32 | php_value mbstring.encoding_translation 0 | |
b030c5e6 | 33 | php_value memory_limit 12M |
26d68da7 ER |
34 | </IfModule> |
35 | # php5 module under Apache 1.3 | |
36 | <IfModule mod_php5.c> | |
b030c5e6 ER |
37 | php_value magic_quotes_gpc 0 |
38 | php_value register_globals 0 | |
39 | php_value session.auto_start 0 | |
3e6baaa9 ER |
40 | php_value mbstring.http_input pass |
41 | php_value mbstring.http_output pass | |
42 | php_value mbstring.encoding_translation 0 | |
b030c5e6 | 43 | php_value memory_limit 12M |
26d68da7 ER |
44 | </IfModule> |
45 | ||
46 | # php under Apache 2.x module | |
47 | <IfModule sapi_apache2.c> | |
b030c5e6 ER |
48 | php_value magic_quotes_gpc 0 |
49 | php_value register_globals 0 | |
50 | php_value session.auto_start 0 | |
3e6baaa9 ER |
51 | php_value mbstring.http_input pass |
52 | php_value mbstring.http_output pass | |
53 | php_value mbstring.encoding_translation 0 | |
b030c5e6 | 54 | php_value memory_limit 12M |
26d68da7 ER |
55 | </IfModule> |
56 | ||
57 | # Reduce the time dynamically generated pages are cache-able. | |
58 | <IfModule mod_expires.c> | |
59 | ExpiresByType text/html A1 | |
60 | </IfModule> | |
61 | ||
62 | # Various rewrite rules. | |
63 | <IfModule mod_rewrite.c> | |
64 | RewriteEngine on | |
65 | ||
66 | # Modify the RewriteBase if you are using Drupal in a subdirectory and | |
67 | # the rewrite rules are not working properly. | |
68 | # Enable RewriteBase if you have drupal configured in virtualhost root. | |
69 | #RewriteBase /drupal | |
70 | ||
71 | # Rewrite old-style URLs of the form 'node.php?id=x'. | |
72 | #RewriteCond %{REQUEST_FILENAME} !-f | |
73 | #RewriteCond %{REQUEST_FILENAME} !-d | |
74 | #RewriteCond %{QUERY_STRING} ^id=([^&]+)$ | |
75 | #RewriteRule node.php index.php?q=node/view/%1 [L] | |
76 | ||
77 | # Rewrite old-style URLs of the form 'module.php?mod=x'. | |
78 | #RewriteCond %{REQUEST_FILENAME} !-f | |
79 | #RewriteCond %{REQUEST_FILENAME} !-d | |
80 | #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$ | |
81 | #RewriteRule module.php index.php?q=%1 [L] | |
82 | ||
83 | # Rewrite current-style URLs of the form 'index.php?q=x'. | |
84 | RewriteCond %{REQUEST_FILENAME} !-f | |
85 | RewriteCond %{REQUEST_FILENAME} !-d | |
86 | RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] | |
87 | </IfModule> | |
88 | ||
89 | # Customized error messages. | |
90 | ErrorDocument 404 /index.php | |
eb3fbb5f | 91 | </Directory> |
ad7425e6 | 92 | |
abf9ab9f ER |
93 | # If having drupal installed as /drupal |
94 | #<IfModule mod_alias.c> | |
26d68da7 ER |
95 | # Alias /drupal/files /var/lib/drupal |
96 | # Alias /drupal /usr/share/drupal/htdocs | |
abf9ab9f ER |
97 | #</IfModule> |
98 | # | |
99 | #<Location /drupal> | |
26d68da7 ER |
100 | # # Customized error messages. |
101 | # ErrorDocument 404 /drupal/index.php | |
abf9ab9f | 102 | #</Location> |
ad7425e6 | 103 | |
bfb2b7e6 | 104 | <Directory /var/lib/drupal> |
26d68da7 | 105 | Allow from all |
71345161 ER |
106 | SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006 |
107 | Options None | |
108 | <IfModule mod_rewrite.c> | |
109 | RewriteEngine off | |
110 | </IfModule> | |
bfb2b7e6 ER |
111 | </Directory> |
112 | ||
abf9ab9f | 113 | <VirtualHost *:80> |
26d68da7 ER |
114 | ServerName drupal |
115 | ServerAlias www.drupal | |
116 | DocumentRoot /usr/share/drupal/htdocs | |
ad7425e6 | 117 | |
26d68da7 ER |
118 | <IfModule mod_alias.c> |
119 | Alias /files /var/lib/drupal | |
120 | </IfModule> | |
abf9ab9f | 121 | </VirtualHost> |
f9fd4089 | 122 | |
26d68da7 | 123 | # vim:ft=apache |