drupal/drupal-apache.conf

Wed, 08 Feb 2012 20:07:00 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 08 Feb 2012 20:07:00 +0200
changeset 588
300d43423c2e
permissions
-rw-r--r--

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.

     1 ##
     2 ##  drupal-apache.conf -- Drupal 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/drupal/run/apache.pid
    15 ScoreBoardFile         @l_prefix@/var/drupal/run/apache.sb
    16 LockFile               @l_prefix@/var/drupal/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/drupal/log/apache.access.log common
    41 #   error logging
    42 LogLevel               warn
    43 ErrorLog               @l_prefix@/var/drupal/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/drupal/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 Drupal
    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/drupal/includes
    91 php_admin_value   upload_max_filesize           2M
    92 php_admin_value   post_max_size                 8M
    94 #   configure Drupal
    95 RewriteEngine     on
    96 RewriteRule       ^/$ /drupal/ [R,L]
    97 Alias             /drupal @l_prefix@/share/drupal
    98 DocumentRoot      @l_prefix@/share/drupal
    99 DirectoryIndex    index.php
   100 ErrorDocument     404 /index.php
   101 ExpiresByType     text/html A1
   102 <Directory        @l_prefix@/share/drupal>
   103     Options       -Indexes +FollowSymLinks
   104     AllowOverride All
   105     Order         allow,deny
   106     Allow         from all
   107     RewriteEngine On
   108     RewriteBase   /drupal
   109 </Directory>
   110 <Location /drupal/sites/default/files/js>
   111     SetOutputFilter DEFLATE
   112 </Location>
   113 <Location /drupal/sites/default/files/css>
   114     SetOutputFilter DEFLATE
   115 </Location>

mercurial