# apache2 -X -d /etc/frontend -e debug
# apt-get install apache2 libapache2-mod-perl2 libdata-dump-perl libcommon-sense-perl
#ServerRoot "/dev/null"
Mutex pthread default
PidFile /run/frontend.pid
Timeout 30
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
#TODO: should be it's own user id
User www-data
Group www-data
GracefulShutdownTimeout 8
AddDefaultCharset UTF-8
# EnableSendfile On
# to be sure, spell out some defaults
HostnameLookups Off
AllowEncodedSlashes Off
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn
# event segfaults, hangs, creates unexplained error messages...
#LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so
LoadModule mpm_worker_module /usr/lib/apache2/modules/mod_mpm_worker.so
#LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
TypesConfig /etc/mime.types
LoadModule mime_magic_module /usr/lib/apache2/modules/mod_mime_magic.so
MIMEMagicFile /etc/apache2/magic
# must NOT be loaded
#LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
#DirectoryIndex index.html
LoadModule autoindex_module /usr/lib/apache2/modules/mod_autoindex.so
IndexOptions Charset=UTF-8 FancyIndexing FoldersFirst HTMLTable IgnoreCase SuppressColumnSorting NameWidth=* SuppressDescription SuppressIcon
HeaderName HEADER.html
ReadmeName FOOTER.html
LoadModule status_module /usr/lib/apache2/modules/mod_status.so
#ExtendedStatus Off # ON is the default
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_wstunnel_module /usr/lib/apache2/modules/mod_proxy_wstunnel.so
#LoadModule proxy_fcgi_module /usr/lib/apache2/modules/mod_proxy_fcgi.so
LoadModule proxy_scgi_module /usr/lib/apache2/modules/mod_proxy_scgi.so
#ProxySCGIInternalRedirect Internal-Redirect apache 2.6 :/
ProxySCGIInternalRedirect On
ProxySCGISendfile On
ProxyTimeout 120
#LoadModule proxy_fdpass_module /usr/lib/apache2/modules/mod_proxy_fdpass.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule xml2enc_module /usr/lib/apache2/modules/mod_xml2enc.so
#LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so
LoadModule proxy_html_module /usr/lib/apache2/modules/mod_proxy_html.so
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
#
# Options FollowSymLinks
# AllowOverride None
## Require all denied
#
#AccessFileName .htaccess
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %{Host}i" schmorp
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/frontend/access.log schmorp env=!suppress-logging
ErrorLog /var/log/frontend/error.log
ListenBacklog 511
ServerLimit 1
#MaxClients 100
MaxRequestWorkers 100
StartServers 1
ThreadsPerChild 100
ThreadLimit 100
MinSpareThreads 6
MaxSpareThreads 100
MaxMemFree 64
ThreadStackSize 196608
PerlInterpStart 1
PerlInterpMax 1
PerlInterpMinSpare 0
PerlInterpMaxSpare 1
#PerlInterpScope Handler
Include proxy_html.conf
# for debugging, enable reverse proxy url rewrite logging
#LogLevel warn proxy_html:trace3
ProxyHTMLDocType "" SGML
ProxyHTMLExtended on
# mod_proxy_html uncompresses content, but doesn't recompress nor remove
# content-encoding header
#SetOutputFilter INFLATE;DEFLATE
use Apache2::ServerUtil ();
use Apache2::Const -compile => qw(OK);
use lib Apache2::ServerUtil::server_root;
use proxy_impl;
PerlOptions None +Trans +MapToStorage +HeaderParser +Authz +Type
PerlTransHandler Apache2::Const::OK
PerlMapToStorageHandler proxy_impl::map_to_storage
PerlHeaderParserHandler Apache2::Const::OK
#PerlAuthenHandler Apache2::Const::OK
PerlAuthzHandler Apache2::Const::OK
# always runs all
#PerlAccessHandler Apache2::Const::OK
#PerlTypeHandler Apache2::Const::OK
#PerlFixupHandler Apache2::Const::OK
# handlers run anyway
# fixup mod_proxy checks for proxy: handler strings
# fixup mod_ssl annotates with lots of ssl, or updates for ssl optional
# type mod_mime mod_mime_magic do their job
# RUN_FIRST translate_name
# RUN_FIRST map_to_storage
# RUN_FIRST check_user_id
# RUN_ALL fixups
# RUN_FIRST type_checker
# RUN_ALL access_checker
# RUN_FIRST access_checker_ex
# RUN_FIRST auth_checker
# VOID insert_filter
# RUN_ALL create_request
# RUN_ALL post_perdir_config
# RUN_FIRST dirwalk_stat
# mod_dir fixup
# mod_cgi response
# mod_autoindex response
# ap_process_request_internal() function in server/request.c
Options Indexes FollowSymLinks
# Require all granted
Include local.conf
# vim: syntax=apache ts=8 sw=4