forked from Debian/debiman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apache2.conf
49 lines (37 loc) · 1.27 KB
/
apache2.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# requires apache2 ≥ 2.4.13 for ap_expr evaluation in ErrorDocument
# required apache2 modules: proxy_http, deflate, expires, headers
<VirtualHost *:3080>
ServerName man.localhost
ServerAdmin webmaster@localhost
DocumentRoot /srv/man
LogLevel alert
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# Add gzip to the Accept-Encoding to prevent apache from serving an
# HTTP 406 Not Acceptable response. We keep the original
# Accept-Encoding value and later on use mod_deflate to uncompress if
# necessary.
RequestHeader set Accept-Encoding "expr=gzip,%{req:Accept-Encoding}" early
ExpiresActive On
ExpiresDefault "access plus 1 hours"
<Files ~ "^rwmap">
Order allow,deny
Deny from all
</Files>
<Location /auxserver/>
ProxyPass "http://localhost:2431/"
ProxyPassReverse "http://localhost:2431/"
</Location>
ErrorDocument 404 /auxserver/%{REQUEST_URI}?%{QUERY_STRING}
<Directory /srv/man>
Require all granted
# To set the correct Content-Type (e.g. text/html).
RemoveType .gz
AddEncoding gzip gz
FilterDeclare gzip CONTENT_SET
FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip,.*gzip/"
FilterChain gzip
Options +Multiviews
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet