65626f680006b63eb85509933af66f03ce03b53e
[tine20] / scripts / packaging / fedora / SOURCES / tine20-httpd.conf
1 # Apache and PHP configuration for Tine 2.0
2 #
3
4 Alias /tine20                      /usr/share/tine20
5 Alias /Microsoft-Server-ActiveSync /usr/share/tine20/Microsoft-Server-ActiveSync
6
7 # some people prefer a simple URL like http://tine20.example.org
8 # in this case you also have to disable to Alias lines above
9 #<VirtualHost 1.2.3.4:80>
10 #  DocumentRoot /usr/share/tine20
11 #  ServerName   tine20.example.org
12 #</VirtualHost>
13
14 <Directory /usr/share/tine20>
15     Order Allow,Deny
16     Allow from all
17
18     DirectoryIndex index.php
19
20     Options +ExecCGI
21
22     <IfModule mod_php5.c>
23         php_admin_value max_input_time          120
24         php_admin_value include_path            .:/usr/share/tine20:/usr/share/tine20/library:/etc/tine20
25         php_admin_value open_basedir            /usr/share/tine20:/var/lib/tine20:/tmp:/usr/share/php:/etc/tine20:/var/log/tine20
26         php_admin_value session.gc_maxlifetime  86400
27         php_admin_value memory_limit            128M
28         php_admin_value upload_max_filesize     20M
29         php_admin_value post_max_size           20M
30         
31         php_admin_value safe_mode               off
32         php_admin_flag  display_errors          off
33         php_admin_flag  log_errors              on
34         php_admin_flag  magic_quotes_gpc        off
35         php_admin_flag  magic_quotes_runtime    off
36         php_admin_flag  register_globals        off
37         php_admin_flag  zlib.output_compression on
38         
39         php_value       max_execution_time      90
40     </IfModule>
41     
42     <IfModule mod_rewrite.c>
43         RewriteEngine on
44
45         RewriteBase /tine20
46
47         # ActiveSync
48         RewriteRule ^Microsoft-Server-ActiveSync index.php?frontend=activesync         [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
49
50         # OpenID
51         RewriteRule ^users/(.*)                  index.php?frontend=openid&username=$1 [L,QSA]
52
53         # WebDAV / CalDAV / CardDAV
54         RewriteCond %{REQUEST_METHOD} !^(GET|POST)$
55         RewriteRule ^$                           index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
56
57         RewriteRule ^addressbooks                index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
58         RewriteRule ^calendars                   index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
59         RewriteRule ^webdav                      index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
60         RewriteRule ^principals                  index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
61         RewriteRule ^remote.php                  index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
62         
63         # Anonymous downloads
64         RewriteRule ^download/get/(.*)           index.php?method=Download.downloadNode&path=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
65         RewriteRule ^download/show/(.*)          index.php?method=Download.displayNode&path=$1  [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
66     </IfModule>
67
68     <IfModule mod_expires.c>
69         ExpiresActive on
70
71         ExpiresByType image/gif  "access plus 1 month 1 days"
72         ExpiresByType image/jpeg "access plus 1 month 1 days"
73         ExpiresByType image/png  "access plus 1 month 1 days"
74     </IfModule>
75     
76     <IfModule mod_deflate.c>
77         AddOutputFilterByType DEFLATE text/plain
78         AddOutputFilterByType DEFLATE text/html
79         AddOutputFilterByType DEFLATE text/css
80         AddOutputFilterByType DEFLATE application/javascript
81
82         <IfModule mod_headers.c>
83             # properly handle requests coming from behind proxies
84             Header append Vary User-Agent env=!dont-vary
85         </IfModule>
86     </IfModule>
87
88 </Directory>
89
90