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