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 |
# LogLevel: Control the severity of messages logged to the error_log. |
20 |
# Available values: trace8, ..., trace1, debug, info, notice, warn, |
21 |
# error, crit, alert, emerg. |
22 |
# It is also possible to configure the log level for particular modules, e.g. |
23 |
# "LogLevel info ssl:warn" |
24 |
# |
25 |
LogLevel warn |
26 |
|
27 |
LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so |
28 |
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so |
29 |
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so |
30 |
|
31 |
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so |
32 |
AddDefaultCharset UTF-8 |
33 |
TypesConfig /etc/mime.types |
34 |
|
35 |
# must not be loaded |
36 |
#LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so |
37 |
#DirectoryIndex index.html |
38 |
|
39 |
LoadModule autoindex_module /usr/lib/apache2/modules/mod_autoindex.so |
40 |
IndexOptions Charset=UTF-8 FancyIndexing FoldersFirst HTMLTable SuppressColumnSorting |
41 |
HeaderName HEADER.html |
42 |
ReadmeName FOOTER.html |
43 |
|
44 |
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so |
45 |
#LoadModule proxy_fcgi_module /usr/lib/apache2/modules/mod_proxy_fcgi.so |
46 |
|
47 |
LoadModule proxy_scgi_module /usr/lib/apache2/modules/mod_proxy_scgi.so |
48 |
#ProxySCGIInternalRedirect Internal-Redirect apache 2.6 :/ |
49 |
ProxySCGIInternalRedirect On |
50 |
ProxySCGISendfile On |
51 |
|
52 |
#LoadModule proxy_fdpass_module /usr/lib/apache2/modules/mod_proxy_fdpass.so |
53 |
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so |
54 |
LoadModule xml2enc_module /usr/lib/apache2/modules/mod_xml2enc.so |
55 |
LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so |
56 |
LoadModule proxy_html_module /usr/lib/apache2/modules/mod_proxy_html.so |
57 |
|
58 |
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so |
59 |
|
60 |
# Sets the default security model of the Apache2 HTTPD server. It does |
61 |
# not allow access to the root filesystem outside of /usr/share and /var/www. |
62 |
# The former is used by web applications packaged in Debian, |
63 |
# the latter may be used for local directories served by the web server. If |
64 |
# your system is serving content from a sub-directory in /srv you must allow |
65 |
# access here, or in any related virtual host. |
66 |
<Directory /> |
67 |
Options FollowSymLinks |
68 |
AllowOverride None |
69 |
Require all denied |
70 |
</Directory> |
71 |
|
72 |
<Directory /var/www/> |
73 |
Options Indexes FollowSymLinks |
74 |
Require all granted |
75 |
</Directory> |
76 |
|
77 |
AccessFileName .htaccess |
78 |
|
79 |
# |
80 |
# The following lines prevent .htaccess and .htpasswd files from being |
81 |
# viewed by Web clients. |
82 |
# |
83 |
<FilesMatch "^\.ht"> |
84 |
Require all denied |
85 |
</FilesMatch> |
86 |
|
87 |
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %{Host}i" schmorp |
88 |
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined |
89 |
LogFormat "%h %l %u %t \"%r\" %>s %O" common |
90 |
LogFormat "%{Referer}i -> %U" referer |
91 |
LogFormat "%{User-agent}i" agent |
92 |
|
93 |
CustomLog /var/log/frontend/access.log schmorp |
94 |
ErrorLog /var/log/frontend/error.log |
95 |
|
96 |
ServerLimit 1 |
97 |
MaxClients 100 |
98 |
MaxRequestWorkers 100 |
99 |
StartServers 1 |
100 |
ThreadsPerChild 100 |
101 |
ThreadLimit 200 |
102 |
MinSpareThreads 6 |
103 |
MaxSpareThreads 16 |
104 |
|
105 |
MaxMemFree 64 |
106 |
#ThreadStackSize 65536 # basically gets ignored |
107 |
|
108 |
PerlInterpStart 1 |
109 |
PerlInterpMax 1 |
110 |
PerlInterpMinSpare 0 |
111 |
PerlInterpMaxSpare 1 |
112 |
PerlInterpScope Handler |
113 |
|
114 |
Include proxy_html.conf |
115 |
|
116 |
# for debugging, enable reverse proxy url rewrite logging |
117 |
#LogLevel warn proxy_html:trace3 |
118 |
|
119 |
ProxyHTMLDocType "<!DOCTYPE html>" SGML |
120 |
ProxyHTMLExtended on |
121 |
|
122 |
# mod_proxy_html uncompresses content, but doesn't recompress nor remove |
123 |
# content-encoding header |
124 |
SetOutputFilter INFLATE;DEFLATE |
125 |
|
126 |
<Perl> |
127 |
use Apache2::ServerUtil (); |
128 |
use Apache2::Const -compile => qw(OK); |
129 |
use lib Apache2::ServerUtil::server_root; |
130 |
use proxy_impl; |
131 |
</Perl> |
132 |
|
133 |
PerlOptions None +Trans +MapToStorage +HeaderParser +Authen +Authz +Type |
134 |
|
135 |
PerlTransHandler Apache2::Const::OK |
136 |
PerlMapToStorageHandler proxy_impl::map_to_storage |
137 |
PerlHeaderParserHandler Apache2::Const::OK |
138 |
#PerlAccessHandler Apache2::Const::OK |
139 |
PerlAuthenHandler Apache2::Const::OK |
140 |
PerlAuthzHandler 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 |
# type mod_mime does its job |
148 |
|
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 |
Require all granted |
170 |
</Location> |
171 |
|
172 |
Include local.conf |
173 |
|
174 |
# vim: syntax=apache ts=8 sw=4 |
175 |
|