##
##  apache.base -- Apache Base/Default Configuration
##  ______________________________________________________
##
##  PLEASE DO NOT EDIT THIS FILE!! ADJUST CONFIGURATION BY 
##  OVERRIDING DIRECTIVES IN "apache.conf" INSTEAD, PLEASE!
##  ______________________________________________________
##

#   global server
ServerRoot              @l_prefix@
ServerAdmin             root@@l_hostname@.@l_domainname@
ServerName              @l_hostname@.@l_domainname@
ServerTokens            os
User                    @l_nusr@
Group                   @l_ngrp@

#   runtime files
LockFile                @l_prefix@/var/apache/run/apache.lock
<IfModule mpm_prefork_module>
    PidFile             @l_prefix@/var/apache/run/apache.pid
    ScoreBoardFile      @l_prefix@/var/apache/run/apache.sb
</IfModule>
<IfModule cgid_module>
    ScriptSock          @l_prefix@/var/apache/run/apache.cgisock
</IfModule>

#  server behaviour
Timeout                 300
KeepAlive               on
MaxKeepAliveRequests    100
KeepAliveTimeout        15
<IfModule mpm_prefork_module>
    MinSpareServers     5
    MaxSpareServers     10
    StartServers        5
    MaxClients          150
    MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
    MinSpareThreads     25
    MaxSpareThreads     75
    ThreadsPerChild     25
    StartServers        2
    ServerLimit         16
    MaxClients          150
    MaxRequestsPerChild 0
</IfModule>
HostnameLookups         off
UseCanonicalName        on

#   access logging
<IfModule log_config_module>
    LogFormat           "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    <IfModule logio_module>
        LogFormat       "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combined_io
    </IfModule>
    <IfModule ssl_module>
        LogFormat       "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{SSL_PROTOCOL}x %{SSL_CIPHER}x" combined_ssl
    </IfModule>
    LogFormat           "%h %l %u %t \"%r\" %>s %b" common
    LogFormat           "%{Referer}i -> %U" referer
    LogFormat           "%{User-agent}i" agent
    CustomLog           @l_prefix@/var/apache/log/access.log common env=!ignore_global_access
</IfModule>

#   error logging
LogLevel                warn
ErrorLog                @l_prefix@/var/apache/log/error.log
ServerSignature         on

#   script logging
<IfModule cgi_module>
    ScriptLog           @l_prefix@/var/apache/log/script.log
    ScriptLogBuffer     1024
    ScriptLogLength     10485760
</IfModule>

#   secure root directory
<Directory />
    Options             FollowSymLinks
    AllowOverride       None
    Order               deny,allow
    Deny                from all
</Directory>

#   configure global document root
DocumentRoot            @l_prefix@/share/apache/htdocs
<IfModule alias_module>
    Alias               /apache-htdocs @l_prefix@/share/apache/htdocs
</IfModule>
<Directory "@l_prefix@/share/apache/htdocs">
    Options             Indexes FollowSymLinks MultiViews
    AllowOverride       none
    Order               allow,deny
    Allow               from all
</Directory>

#   default directories and files
<IfModule userdir_module>
    UserDir             public_html
    UserDir             disabled root
</IfModule>
<IfModule dir_module>
    DirectoryIndex      index.html
</IfModule>

#   local configuration files
AccessFileName          .htaccess
<Files ~ "^\.ht">
    Order               allow,deny
    Deny                from all
    Satisfy             All
</Files>

#   global Icons and CGI directory
<IfModule alias_module>
    Alias               /apache-icons @l_prefix@/share/apache/icons
    <Directory "@l_prefix@/share/apache/icons">
        Options         Indexes MultiViews
        AllowOverride   None
        Order           allow,deny
        Allow           from all
    </Directory>
    AliasMatch          ^/apache-manual(?:/(?:de|en|es|fr|ja|ko|pt-br|ru))?(/.*)?$ @l_prefix@/share/apache/manual$1
    <Directory "@l_prefix@/share/apache/manual">
        Options         Indexes
        AllowOverride   None
        Order           allow,deny
        Allow           from all
        <Files *.html>
            SetHandler  type-map
        </Files>
        SetEnvIf        Request_URI ^/apache-manual/(de|en|es|fr|ja|ko|pt-br|ru)/ prefer-language=$1
        RedirectMatch   301 ^/apache-manual(?:/(de|en|es|fr|ja|ko|pt-br|ru)){2,}(/.*)?$ /apache-manual/$1$2
        LanguagePriority      en de es fr ja ko pt-br ru
        ForceLanguagePriority Prefer Fallback
    </Directory>
    Alias               /apache-error @l_prefix@/share/apache/error
    <Directory "@l_prefix@/share/apache/error">
        Options         IncludesNoExec
        AllowOverride   None
        Order           allow,deny
        Allow           from all
        AddOutputFilter Includes html
        AddHandler      type-map var
        LanguagePriority      en cs de es fr it ja ko nl pl pt-br ro sv tr
        ForceLanguagePriority Prefer Fallback
    </Directory>
    ScriptAlias         /openpkg-cgi "@l_prefix@/cgi"
    <Directory "@l_prefix@/cgi">
        AllowOverride   None
        Options         None
        Order           allow,deny
        Allow           from all
    </Directory>
</IfModule>

#   global server status information
<IfModule status_module>
    ExtendedStatus      on
    <Location /apache-server-status>
        SetHandler      server-status
        Order           deny,allow
        Deny            from all
        Allow           from 127.0.0.1
    </Location>
    <Location /apache-server-info>
        SetHandler      server-info
        Order           deny,allow
        Deny            from all
        Allow           from 127.0.0.1
    </Location>
</IfModule>

#   automatic CGI and SSI recognition
<IfModule mime_module>
    <IfModule cgi_module>
        AddHandler      cgi-script .cgi
    </IfModule>
    <IfModule include_module>
        AddType         text/html  .shtml
        AddOutputFilter INCLUDES   .shtml
    </IfModule>
</IfModule>

#   multi-language error documents
ErrorDocument           400 /apache-error/HTTP_BAD_REQUEST.html.var
ErrorDocument           401 /apache-error/HTTP_UNAUTHORIZED.html.var
ErrorDocument           403 /apache-error/HTTP_FORBIDDEN.html.var
ErrorDocument           404 /apache-error/HTTP_NOT_FOUND.html.var
ErrorDocument           405 /apache-error/HTTP_METHOD_NOT_ALLOWED.html.var
ErrorDocument           408 /apache-error/HTTP_REQUEST_TIME_OUT.html.var
ErrorDocument           410 /apache-error/HTTP_GONE.html.var
ErrorDocument           411 /apache-error/HTTP_LENGTH_REQUIRED.html.var
ErrorDocument           412 /apache-error/HTTP_PRECONDITION_FAILED.html.var
ErrorDocument           413 /apache-error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
ErrorDocument           414 /apache-error/HTTP_REQUEST_URI_TOO_LARGE.html.var
ErrorDocument           415 /apache-error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
ErrorDocument           500 /apache-error/HTTP_INTERNAL_SERVER_ERROR.html.var
ErrorDocument           501 /apache-error/HTTP_NOT_IMPLEMENTED.html.var
ErrorDocument           502 /apache-error/HTTP_BAD_GATEWAY.html.var
ErrorDocument           503 /apache-error/HTTP_SERVICE_UNAVAILABLE.html.var
ErrorDocument           506 /apache-error/HTTP_VARIANT_ALSO_VARIES.html.var

#   automatic directory indexing
<IfModule autoindex_module>
    IndexOptions        FancyIndexing HTMLTable VersionSort
    ReadmeName          README
    HeaderName          HEADER
    IndexIgnore         .??* *~ *# HEADER* README* RCS CVS *,v *,t
    DefaultIcon              /apache-icons/unknown.gif
    AddIcon                  /apache-icons/back.gif        ..
    AddIcon                  /apache-icons/dir.gif         ^^DIRECTORY^^
    AddIcon                  /apache-icons/blank.gif       ^^BLANKICON^^
    AddIcon                  /apache-icons/binary.gif      .bin .exe
    AddIcon                  /apache-icons/binhex.gif      .hqx
    AddIcon                  /apache-icons/tar.gif         .tar
    AddIcon                  /apache-icons/world2.gif      .wrl .wrl.gz .vrml .vrm .iv
    AddIcon                  /apache-icons/compressed.gif  .Z .z .tgz .gz .zip
    AddIcon                  /apache-icons/a.gif           .ps .ai .eps
    AddIcon                  /apache-icons/layout.gif      .html .shtml .htm .pdf
    AddIcon                  /apache-icons/text.gif        .txt
    AddIcon                  /apache-icons/c.gif           .c
    AddIcon                  /apache-icons/p.gif           .pl .py
    AddIcon                  /apache-icons/f.gif           .for
    AddIcon                  /apache-icons/dvi.gif         .dvi
    AddIcon                  /apache-icons/uuencoded.gif   .uu
    AddIcon                  /apache-icons/script.gif      .conf .sh .shar .csh .ksh .tcl
    AddIcon                  /apache-icons/tex.gif         .tex
    AddIcon                  /apache-icons/bomb.gif        core
    AddIconByEncoding   (CMP,/apache-icons/compressed.gif) x-compress x-gzip
    AddIconByType       (TXT,/apache-icons/text.gif)       text/*
    AddIconByType       (IMG,/apache-icons/image2.gif)     image/*
    AddIconByType       (SND,/apache-icons/sound2.gif)     audio/*
    AddIconByType       (VID,/apache-icons/movie.gif)      video/*
</IfModule>

#   MIME types and content negotiation
DefaultType             text/plain
<IfModule mime_module>
    TypesConfig         @l_prefix@/etc/apache/mime.types
    AddType             application/x-compress .Z
    AddType             application/x-gzip     .gz  .tgz
    AddType             application/x-bzip2    .bz2 .tbz2
    AddType             application/x-xz       .xz  .txz
    AddType             application/x-tar      .tar
    AddEncoding         compress     Z
    AddEncoding         gzip         gz tgz
    AddEncoding         br           br tbr
    AddLanguage         da           .dk
    AddLanguage         nl           .nl
    AddLanguage         en           .en
    AddLanguage         et           .ee
    AddLanguage         fr           .fr
    AddLanguage         de           .de
    AddLanguage         el           .el
    AddLanguage         he           .he
    AddCharset          ISO-8859-8   .iso8859-8
    AddLanguage         it           .it
    AddLanguage         ja           .ja
    AddCharset          ISO-2022-JP  .jis
    AddLanguage         kr           .kr
    AddCharset          ISO-2022-KR  .iso-kr
    AddLanguage         no           .no
    AddLanguage         pl           .po
    AddCharset          ISO-8859-2   .iso-pl
    AddLanguage         pt           .pt
    AddLanguage         pt-br        .pt-br
    AddLanguage         ltz          .lu
    AddLanguage         ca           .ca
    AddLanguage         es           .es
    AddLanguage         sv           .se
    AddLanguage         cz           .cz
    AddLanguage         ru           .ru
    AddLanguage         tw           .tw
    AddCharset          Big5         .Big5 .big5
    AddCharset          WINDOWS-1251 .cp-1251
    AddCharset          CP866        .cp866
    AddCharset          ISO-8859-5   .iso-ru
    AddCharset          KOI8-R       .koi8-r
    AddCharset          UCS-2        .ucs2
    AddCharset          UCS-4        .ucs4
    AddCharset          UTF-8        .utf8
</IfModule>
<IfModule negotiation_module>
    AddHandler          type-map     .var
    LanguagePriority    en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
    ForceLanguagePriority Prefer Fallback
</IfModule>
<IfModule mime_magic_module>
    MIMEMagicFile       @l_prefix@/etc/apache/mime.magic
</IfModule>

#   SSL/TLS support
<IfModule ssl_module>
    SSLRandomSeed           startup builtin
    SSLRandomSeed           connect builtin
    SSLMutex                sem
    SSLCADNRequestFile      @l_prefix@/etc/x509/public-ca.crt.pem
    SSLCACertificateFile    @l_prefix@/etc/x509/public-ca.crt.pem
    SSLSessionCache         shm:@l_prefix@/var/apache/run/apache.ssl_scache(512000)
    SSLSessionCacheTimeout  300
    SSLProtocol             all -SSLv2 -SSLv3
    SSLCipherSuite          "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"
    SSLHonorCipherOrder     on
    <Files ~ "\.(cgi|shtml|pl|phtml|php?)$">
        SSLOptions          +StdEnvVars
    </Files>
    <Directory "@l_prefix@/cgi">
        SSLOptions          +StdEnvVars
    </Directory>
    AddType application/x-x509-ca-cert .crt
    AddType application/x-pkcs7-crl    .crl
</IfModule>

#   DAV support
<IfModule dav_module>
    DavLockDB           @l_prefix@/var/apache/run/apache.dav/lock
    BrowserMatch        "Microsoft Data Access Internet Publishing Provider" redirect-carefully
    BrowserMatch        "MS FrontPage"                                       redirect-carefully
    BrowserMatch        "^WebDrive"                                          redirect-carefully
    BrowserMatch        "^WebDAVFS/1.[0123]"                                 redirect-carefully
    BrowserMatch        "^gnome-vfs/1.0"                                     redirect-carefully
    BrowserMatch        "^XML Spy"                                           redirect-carefully
    BrowserMatch        "^Dreamweaver-WebDAV-SCM1"                           redirect-carefully
</IfModule>

#   Cache support
<IfModule disk_cache_module>
    CacheRoot           @l_prefix@/var/apache/run/apache.cache
    CacheMaxFileSize    1000000
    CacheMinFileSize    1
    CacheDirLength      2
    CacheDirLevels      3
</IfModule>

#   Compression support
<IfModule deflate_module>
    DeflateCompressionLevel 1
    DeflateMemLevel         9
    DeflateWindowSize       15
    DeflateBufferSize       8096
    DeflateFilterNote       Ratio deflate_ratio
    AddOutputFilterByType   DEFLATE text/plain text/html text/xml application/javascript application/json text/css
</IfModule>

