1 |
root |
1.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 |
root |
1.9 |
Timeout 30 |
10 |
root |
1.1 |
KeepAlive On |
11 |
|
|
MaxKeepAliveRequests 100 |
12 |
root |
1.9 |
KeepAliveTimeout 2 |
13 |
root |
1.1 |
|
14 |
root |
1.9 |
#TODO: should be it's own user id |
15 |
root |
1.1 |
User www-data |
16 |
|
|
Group www-data |
17 |
|
|
|
18 |
root |
1.9 |
GracefulShutdownTimeout 8 |
19 |
root |
1.1 |
|
20 |
root |
1.5 |
AddDefaultCharset UTF-8 |
21 |
root |
1.9 |
# EnableSendfile On |
22 |
|
|
|
23 |
|
|
# to be sure, spell out some defaults |
24 |
|
|
HostnameLookups Off |
25 |
|
|
AllowEncodedSlashes Off |
26 |
root |
1.5 |
|
27 |
root |
1.1 |
# LogLevel: Control the severity of messages logged to the error_log. |
28 |
|
|
# Available values: trace8, ..., trace1, debug, info, notice, warn, |
29 |
|
|
# error, crit, alert, emerg. |
30 |
|
|
# It is also possible to configure the log level for particular modules, e.g. |
31 |
|
|
# "LogLevel info ssl:warn" |
32 |
|
|
# |
33 |
|
|
LogLevel warn |
34 |
|
|
|
35 |
root |
1.9 |
# event segfaults, hangs, creates unexplained error messages... |
36 |
|
|
#LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so |
37 |
|
|
LoadModule mpm_worker_module /usr/lib/apache2/modules/mod_mpm_worker.so |
38 |
|
|
#LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so |
39 |
root |
1.1 |
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so |
40 |
|
|
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so |
41 |
|
|
|
42 |
|
|
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so |
43 |
|
|
TypesConfig /etc/mime.types |
44 |
root |
1.7 |
LoadModule mime_magic_module /usr/lib/apache2/modules/mod_mime_magic.so |
45 |
root |
1.8 |
MIMEMagicFile /etc/apache2/magic |
46 |
root |
1.1 |
|
47 |
root |
1.11 |
# must NOT be loaded |
48 |
root |
1.1 |
#LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so |
49 |
|
|
#DirectoryIndex index.html |
50 |
|
|
|
51 |
|
|
LoadModule autoindex_module /usr/lib/apache2/modules/mod_autoindex.so |
52 |
root |
1.14 |
IndexOptions Charset=UTF-8 FancyIndexing FoldersFirst HTMLTable IgnoreCase SuppressColumnSorting NameWidth=* SuppressDescription SuppressIcon |
53 |
root |
1.1 |
HeaderName HEADER.html |
54 |
|
|
ReadmeName FOOTER.html |
55 |
|
|
|
56 |
root |
1.9 |
LoadModule status_module /usr/lib/apache2/modules/mod_status.so |
57 |
root |
1.12 |
#ExtendedStatus Off # ON is the default |
58 |
root |
1.9 |
|
59 |
root |
1.1 |
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so |
60 |
|
|
#LoadModule proxy_fcgi_module /usr/lib/apache2/modules/mod_proxy_fcgi.so |
61 |
root |
1.2 |
|
62 |
root |
1.1 |
LoadModule proxy_scgi_module /usr/lib/apache2/modules/mod_proxy_scgi.so |
63 |
root |
1.2 |
#ProxySCGIInternalRedirect Internal-Redirect apache 2.6 :/ |
64 |
|
|
ProxySCGIInternalRedirect On |
65 |
|
|
ProxySCGISendfile On |
66 |
|
|
|
67 |
root |
1.1 |
#LoadModule proxy_fdpass_module /usr/lib/apache2/modules/mod_proxy_fdpass.so |
68 |
|
|
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so |
69 |
|
|
LoadModule xml2enc_module /usr/lib/apache2/modules/mod_xml2enc.so |
70 |
|
|
LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so |
71 |
|
|
LoadModule proxy_html_module /usr/lib/apache2/modules/mod_proxy_html.so |
72 |
|
|
|
73 |
|
|
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so |
74 |
|
|
|
75 |
root |
1.11 |
#<Directory /> |
76 |
|
|
# Options FollowSymLinks |
77 |
|
|
# AllowOverride None |
78 |
|
|
## Require all denied |
79 |
|
|
#</Directory> |
80 |
root |
1.1 |
|
81 |
root |
1.11 |
#AccessFileName .htaccess |
82 |
root |
1.1 |
|
83 |
|
|
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %{Host}i" schmorp |
84 |
|
|
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined |
85 |
|
|
LogFormat "%h %l %u %t \"%r\" %>s %O" common |
86 |
|
|
LogFormat "%{Referer}i -> %U" referer |
87 |
|
|
LogFormat "%{User-agent}i" agent |
88 |
|
|
|
89 |
root |
1.10 |
CustomLog /var/log/frontend/access.log schmorp env=!suppress-logging |
90 |
root |
1.1 |
ErrorLog /var/log/frontend/error.log |
91 |
|
|
|
92 |
root |
1.9 |
ListenBacklog 511 |
93 |
root |
1.1 |
ServerLimit 1 |
94 |
root |
1.9 |
#MaxClients 100 |
95 |
root |
1.1 |
MaxRequestWorkers 100 |
96 |
|
|
StartServers 1 |
97 |
|
|
ThreadsPerChild 100 |
98 |
root |
1.9 |
ThreadLimit 100 |
99 |
root |
1.1 |
MinSpareThreads 6 |
100 |
root |
1.9 |
MaxSpareThreads 100 |
101 |
root |
1.1 |
|
102 |
|
|
MaxMemFree 64 |
103 |
root |
1.9 |
ThreadStackSize 196608 |
104 |
root |
1.1 |
|
105 |
|
|
PerlInterpStart 1 |
106 |
|
|
PerlInterpMax 1 |
107 |
|
|
PerlInterpMinSpare 0 |
108 |
|
|
PerlInterpMaxSpare 1 |
109 |
root |
1.14 |
#PerlInterpScope Handler |
110 |
root |
1.1 |
|
111 |
|
|
Include proxy_html.conf |
112 |
|
|
|
113 |
|
|
# for debugging, enable reverse proxy url rewrite logging |
114 |
|
|
#LogLevel warn proxy_html:trace3 |
115 |
|
|
|
116 |
|
|
ProxyHTMLDocType "<!DOCTYPE html>" SGML |
117 |
|
|
ProxyHTMLExtended on |
118 |
|
|
|
119 |
|
|
# mod_proxy_html uncompresses content, but doesn't recompress nor remove |
120 |
|
|
# content-encoding header |
121 |
|
|
SetOutputFilter INFLATE;DEFLATE |
122 |
|
|
|
123 |
|
|
<Perl> |
124 |
|
|
use Apache2::ServerUtil (); |
125 |
|
|
use Apache2::Const -compile => qw(OK); |
126 |
|
|
use lib Apache2::ServerUtil::server_root; |
127 |
|
|
use proxy_impl; |
128 |
|
|
</Perl> |
129 |
|
|
|
130 |
root |
1.13 |
PerlOptions None +Trans +MapToStorage +HeaderParser +Authz +Type |
131 |
root |
1.1 |
|
132 |
|
|
PerlTransHandler Apache2::Const::OK |
133 |
|
|
PerlMapToStorageHandler proxy_impl::map_to_storage |
134 |
|
|
PerlHeaderParserHandler Apache2::Const::OK |
135 |
root |
1.13 |
|
136 |
|
|
#PerlAuthenHandler Apache2::Const::OK |
137 |
|
|
PerlAuthzHandler Apache2::Const::OK |
138 |
|
|
|
139 |
|
|
# always runs all |
140 |
root |
1.1 |
#PerlAccessHandler Apache2::Const::OK |
141 |
|
|
#PerlTypeHandler Apache2::Const::OK |
142 |
|
|
#PerlFixupHandler Apache2::Const::OK |
143 |
|
|
|
144 |
|
|
# handlers run anyway |
145 |
|
|
# fixup mod_proxy checks for proxy: handler strings |
146 |
|
|
# fixup mod_ssl annotates with lots of ssl, or updates for ssl optional |
147 |
root |
1.6 |
# type mod_mime mod_mime_magic do their job |
148 |
root |
1.1 |
|
149 |
|
|
# RUN_FIRST translate_name |
150 |
|
|
# RUN_FIRST map_to_storage |
151 |
|
|
# RUN_FIRST check_user_id |
152 |
|
|
# RUN_ALL fixups |
153 |
|
|
# RUN_FIRST type_checker |
154 |
|
|
# RUN_ALL access_checker |
155 |
|
|
# RUN_FIRST access_checker_ex |
156 |
|
|
# RUN_FIRST auth_checker |
157 |
|
|
# VOID insert_filter |
158 |
|
|
# RUN_ALL create_request |
159 |
|
|
# RUN_ALL post_perdir_config |
160 |
|
|
# RUN_FIRST dirwalk_stat |
161 |
|
|
|
162 |
|
|
# mod_dir fixup |
163 |
|
|
# mod_cgi response |
164 |
|
|
# mod_autoindex response |
165 |
|
|
# ap_process_request_internal() function in server/request.c |
166 |
|
|
|
167 |
|
|
<Location /> |
168 |
|
|
Options Indexes FollowSymLinks |
169 |
root |
1.11 |
# Require all granted |
170 |
root |
1.1 |
</Location> |
171 |
|
|
|
172 |
|
|
Include local.conf |
173 |
|
|
|
174 |
|
|
# vim: syntax=apache ts=8 sw=4 |
175 |
|
|
|