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