| 1 |
# apache2 -X -d /etc/frontend -e debug |
| 2 |
|
| 3 |
# apt-get install apache2 libapache2-mod-perl2 libdata-dump-perl libcommon-sense-perl |
| 4 |
|
| 5 |
#ServerRoot "/dev/null" |
| 6 |
Mutex pthread default |
| 7 |
PidFile /run/frontend.pid |
| 8 |
|
| 9 |
Timeout 60 |
| 10 |
KeepAlive On |
| 11 |
MaxKeepAliveRequests 100 |
| 12 |
KeepAliveTimeout 30 |
| 13 |
|
| 14 |
User www-data |
| 15 |
Group www-data |
| 16 |
|
| 17 |
HostnameLookups Off |
| 18 |
|
| 19 |
AddDefaultCharset UTF-8 |
| 20 |
|
| 21 |
# LogLevel: Control the severity of messages logged to the error_log. |
| 22 |
# Available values: trace8, ..., trace1, debug, info, notice, warn, |
| 23 |
# error, crit, alert, emerg. |
| 24 |
# It is also possible to configure the log level for particular modules, e.g. |
| 25 |
# "LogLevel info ssl:warn" |
| 26 |
# |
| 27 |
LogLevel warn |
| 28 |
|
| 29 |
LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so |
| 30 |
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so |
| 31 |
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so |
| 32 |
|
| 33 |
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so |
| 34 |
TypesConfig /etc/mime.types |
| 35 |
LoadModule mime_magic_module /usr/lib/apache2/modules/mod_mime_magic.so |
| 36 |
|
| 37 |
# must not be loaded |
| 38 |
#LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so |
| 39 |
#DirectoryIndex index.html |
| 40 |
|
| 41 |
LoadModule autoindex_module /usr/lib/apache2/modules/mod_autoindex.so |
| 42 |
IndexOptions Charset=UTF-8 FancyIndexing FoldersFirst HTMLTable SuppressColumnSorting |
| 43 |
HeaderName HEADER.html |
| 44 |
ReadmeName FOOTER.html |
| 45 |
|
| 46 |
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so |
| 47 |
#LoadModule proxy_fcgi_module /usr/lib/apache2/modules/mod_proxy_fcgi.so |
| 48 |
|
| 49 |
LoadModule proxy_scgi_module /usr/lib/apache2/modules/mod_proxy_scgi.so |
| 50 |
#ProxySCGIInternalRedirect Internal-Redirect apache 2.6 :/ |
| 51 |
ProxySCGIInternalRedirect On |
| 52 |
ProxySCGISendfile On |
| 53 |
|
| 54 |
#LoadModule proxy_fdpass_module /usr/lib/apache2/modules/mod_proxy_fdpass.so |
| 55 |
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so |
| 56 |
LoadModule xml2enc_module /usr/lib/apache2/modules/mod_xml2enc.so |
| 57 |
LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so |
| 58 |
LoadModule proxy_html_module /usr/lib/apache2/modules/mod_proxy_html.so |
| 59 |
|
| 60 |
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so |
| 61 |
|
| 62 |
# Sets the default security model of the Apache2 HTTPD server. It does |
| 63 |
# not allow access to the root filesystem outside of /usr/share and /var/www. |
| 64 |
# The former is used by web applications packaged in Debian, |
| 65 |
# the latter may be used for local directories served by the web server. If |
| 66 |
# your system is serving content from a sub-directory in /srv you must allow |
| 67 |
# access here, or in any related virtual host. |
| 68 |
<Directory /> |
| 69 |
Options FollowSymLinks |
| 70 |
AllowOverride None |
| 71 |
Require all denied |
| 72 |
</Directory> |
| 73 |
|
| 74 |
<Directory /var/www/> |
| 75 |
Options Indexes FollowSymLinks |
| 76 |
Require all granted |
| 77 |
</Directory> |
| 78 |
|
| 79 |
AccessFileName .htaccess |
| 80 |
|
| 81 |
# |
| 82 |
# The following lines prevent .htaccess and .htpasswd files from being |
| 83 |
# viewed by Web clients. |
| 84 |
# |
| 85 |
<FilesMatch "^\.ht"> |
| 86 |
Require all denied |
| 87 |
</FilesMatch> |
| 88 |
|
| 89 |
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %{Host}i" schmorp |
| 90 |
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined |
| 91 |
LogFormat "%h %l %u %t \"%r\" %>s %O" common |
| 92 |
LogFormat "%{Referer}i -> %U" referer |
| 93 |
LogFormat "%{User-agent}i" agent |
| 94 |
|
| 95 |
CustomLog /var/log/frontend/access.log schmorp |
| 96 |
ErrorLog /var/log/frontend/error.log |
| 97 |
|
| 98 |
ServerLimit 1 |
| 99 |
MaxClients 100 |
| 100 |
MaxRequestWorkers 100 |
| 101 |
StartServers 1 |
| 102 |
ThreadsPerChild 100 |
| 103 |
ThreadLimit 200 |
| 104 |
MinSpareThreads 6 |
| 105 |
MaxSpareThreads 16 |
| 106 |
|
| 107 |
MaxMemFree 64 |
| 108 |
#ThreadStackSize 65536 # basically gets ignored |
| 109 |
|
| 110 |
PerlInterpStart 1 |
| 111 |
PerlInterpMax 1 |
| 112 |
PerlInterpMinSpare 0 |
| 113 |
PerlInterpMaxSpare 1 |
| 114 |
PerlInterpScope Handler |
| 115 |
|
| 116 |
Include proxy_html.conf |
| 117 |
|
| 118 |
# for debugging, enable reverse proxy url rewrite logging |
| 119 |
#LogLevel warn proxy_html:trace3 |
| 120 |
|
| 121 |
ProxyHTMLDocType "<!DOCTYPE html>" SGML |
| 122 |
ProxyHTMLExtended on |
| 123 |
|
| 124 |
# mod_proxy_html uncompresses content, but doesn't recompress nor remove |
| 125 |
# content-encoding header |
| 126 |
SetOutputFilter INFLATE;DEFLATE |
| 127 |
|
| 128 |
<Perl> |
| 129 |
use Apache2::ServerUtil (); |
| 130 |
use Apache2::Const -compile => qw(OK); |
| 131 |
use lib Apache2::ServerUtil::server_root; |
| 132 |
use proxy_impl; |
| 133 |
</Perl> |
| 134 |
|
| 135 |
PerlOptions None +Trans +MapToStorage +HeaderParser +Authen +Authz +Type |
| 136 |
|
| 137 |
PerlTransHandler Apache2::Const::OK |
| 138 |
PerlMapToStorageHandler proxy_impl::map_to_storage |
| 139 |
PerlHeaderParserHandler Apache2::Const::OK |
| 140 |
#PerlAccessHandler Apache2::Const::OK |
| 141 |
PerlAuthenHandler Apache2::Const::OK |
| 142 |
PerlAuthzHandler Apache2::Const::OK |
| 143 |
#PerlTypeHandler Apache2::Const::OK |
| 144 |
#PerlFixupHandler Apache2::Const::OK |
| 145 |
|
| 146 |
# handlers run anyway |
| 147 |
# fixup mod_proxy checks for proxy: handler strings |
| 148 |
# fixup mod_ssl annotates with lots of ssl, or updates for ssl optional |
| 149 |
# type mod_mime mod_mime_magic do their job |
| 150 |
|
| 151 |
# RUN_FIRST translate_name |
| 152 |
# RUN_FIRST map_to_storage |
| 153 |
# RUN_FIRST check_user_id |
| 154 |
# RUN_ALL fixups |
| 155 |
# RUN_FIRST type_checker |
| 156 |
# RUN_ALL access_checker |
| 157 |
# RUN_FIRST access_checker_ex |
| 158 |
# RUN_FIRST auth_checker |
| 159 |
# VOID insert_filter |
| 160 |
# RUN_ALL create_request |
| 161 |
# RUN_ALL post_perdir_config |
| 162 |
# RUN_FIRST dirwalk_stat |
| 163 |
|
| 164 |
# mod_dir fixup |
| 165 |
# mod_cgi response |
| 166 |
# mod_autoindex response |
| 167 |
# ap_process_request_internal() function in server/request.c |
| 168 |
|
| 169 |
<Location /> |
| 170 |
Options Indexes FollowSymLinks |
| 171 |
Require all granted |
| 172 |
</Location> |
| 173 |
|
| 174 |
Include local.conf |
| 175 |
|
| 176 |
# vim: syntax=apache ts=8 sw=4 |
| 177 |
|