-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocserv-auxserver.conf
64 lines (52 loc) · 1.9 KB
/
docserv-auxserver.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# docserv VirtualHost config
#
# Install in /etc/apache2/vhosts.d/
#
# See /usr/share/doc/packages/apache2/README.QUICKSTART for further hints
# about virtual hosts.
#
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName docserv.localhost
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot /srv/docserv
# if not specified, the global error log is used
ErrorLog /var/log/apache2/error_log
CustomLog /var/log/apache2/access_log combined
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off
# 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">
Require all denied
</Files>
<Location /auxserver/>
ProxyPass "http://localhost:2431/"
ProxyPassReverse "http://localhost:2431/"
</Location>
ErrorDocument 404 /auxserver/%{REQUEST_URI}?%{QUERY_STRING}
<Directory /srv/docserv>
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>