Thu, 18 Oct 2012 12:53:06 +0200
Refine specification, using other PHP dependent web packages as reference.
1 ##
2 ## roundcube-apache.conf -- Roundcube Apache Custom Configuration
3 ##
5 ServerRoot @l_prefix@
6 ServerAdmin root@@l_hostname@.@l_domainname@
7 ServerName @l_hostname@.@l_domainname@
8 ServerTokens Prod
9 User @l_rusr@
10 Group @l_rgrp@
11 Listen 127.0.0.1:8080
13 # runtime files
14 PidFile @l_prefix@/var/roundcube/run/apache.pid
15 ScoreBoardFile @l_prefix@/var/roundcube/run/apache.sb
16 LockFile @l_prefix@/var/roundcube/run/apache.lck
18 # include apache-php
19 Include @l_prefix@/etc/apache/apache.d/apache-php.conf
21 # server behaviour
22 Timeout 300
23 KeepAlive on
24 MaxKeepAliveRequests 100
25 KeepAliveTimeout 15
26 MinSpareServers 5
27 MaxSpareServers 10
28 StartServers 5
29 MaxClients 15
30 MaxRequestsPerChild 500
31 HostnameLookups off
32 UseCanonicalName on
34 # access logging
35 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
36 LogFormat "%h %l %u %t \"%r\" %>s %b" common
37 LogFormat "%{Referer}i -> %U" referer
38 LogFormat "%{User-agent}i" agent
39 CustomLog @l_prefix@/var/roundcube/log/apache.access.log common
41 # error logging
42 LogLevel warn
43 ErrorLog @l_prefix@/var/roundcube/log/apache.error.log
44 ServerSignature on
46 # secure root directory
47 <Directory />
48 Options FollowSymLinks
49 AllowOverride None
50 </Directory>
52 # browser specifics
53 BrowserMatch "Mozilla/2" nokeepalive
54 BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
55 BrowserMatch "RealPlayer 4\.0" force-response-1.0
56 BrowserMatch "Java/1\.0" force-response-1.0
57 BrowserMatch "JDK/1\.0" force-response-1.0
59 # SSL/TLS support
60 <IfModule ssl_module>
61 SSLRandomSeed startup builtin
62 SSLRandomSeed connect builtin
63 SSLMutex sem
64 SSLSessionCache shmcb:@l_prefix@/var/roundcube/run/apache.scache(512000)
65 SSLSessionCacheTimeout 300
66 SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
67 SetEnvIf User-Agent ".*MSIE.*" \
68 nokeepalive ssl-unclean-shutdown \
69 downgrade-1.0 force-response-1.0
70 <Files ~ "\.(cgi|shtml|phtml|php?)$">
71 SSLOptions +StdEnvVars
72 </Files>
73 <Directory "@l_prefix@/cgi">
74 SSLOptions +StdEnvVars
75 </Directory>
76 </IfModule>
78 # configure PHP for Roundcube
79 AddType application/x-httpd-php .php
80 php_admin_flag magic_quotes_gpc off
81 php_admin_flag register_globals off
82 php_admin_flag session.auto_start off
83 php_admin_value session.save_handler user
84 php_admin_value session.cache_limiter none
85 php_admin_value error_reporting 6135
86 php_admin_value memory_limit 64M
87 php_admin_value mbstring.http_input pass
88 php_admin_value mbstring.http_output pass
89 php_admin_flag mbstring.encoding_translation off
90 php_admin_value include_path .:@l_prefix@/share/roundcube/includes
91 php_admin_value upload_max_filesize 2M
92 php_admin_value post_max_size 8M
94 # configure Roundcube
95 RewriteEngine on
96 RewriteRule ^/$ /roundcube/ [R,L]
97 Alias /roundcube @l_prefix@/share/roundcube
98 DocumentRoot @l_prefix@/share/roundcube
99 DirectoryIndex index.php
100 ErrorDocument 404 /index.php
101 ExpiresByType text/html A1
102 <Directory @l_prefix@/share/roundcube>
103 Options -Indexes +FollowSymLinks
104 AllowOverride All
105 Order allow,deny
106 Allow from all
107 RewriteEngine On
108 RewriteBase /roundcube
109 </Directory>
110 <Location /roundcube/sites/default/files/js>
111 SetOutputFilter DEFLATE
112 </Location>
113 <Location /roundcube/sites/default/files/css>
114 SetOutputFilter DEFLATE
115 </Location>