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