-
Notifications
You must be signed in to change notification settings - Fork 1
/
apache2.conf
102 lines (86 loc) · 2.96 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
ServerRoot /usr/lib/apache2
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule mime_module modules/mod_mime.so
LoadModule dir_module modules/mod_dir.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule headers_module modules/mod_headers.so
LoadModule xml2enc_module modules/mod_xml2enc.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule filter_module modules/mod_filter.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule alias_module modules/mod_alias.so
TypesConfig /etc/mime.types
# normally in /etc/apache2/
ProxyHTMLLinks a href
ProxyHTMLLinks area href
ProxyHTMLLinks link href
ProxyHTMLLinks img src longdesc usemap
ProxyHTMLLinks object classid codebase data usemap
ProxyHTMLLinks q cite
ProxyHTMLLinks blockquote cite
ProxyHTMLLinks ins cite
ProxyHTMLLinks del cite
ProxyHTMLLinks form action
ProxyHTMLLinks input src usemap
ProxyHTMLLinks head profile
ProxyHTMLLinks base href
ProxyHTMLLinks script src for
ServerName mupif.proxy
Listen *:80
User mupif
# apache must think these are absolute :)
PidFile /tmp/apache2.pid
DocumentRoot /var/lib/mupif/www
DirectoryIndex index.html
# LogLevel trace5 filter:trace8 proxy_html:trace8
LogLevel warn
ErrorLog /dev/stdout
TransferLog /dev/stdout
ErrorLogFormat "[%m:%l] %M"
<Directory />
AllowOverride None
Require all granted
</Directory>
ProxyRequests Off
# not sure this is needed?
ProxyAddHeaders On
ProxyPreserveHost On
# we can enable this globally, why not
ProxyHTMLEnable On
ProxyHTMLExtended On
# this is needed for websocket, e.g. with /sched/ which compresses the stream
# it would be better to prevent proxies from compression
# (there is a setting which delcares apache won't accept compressed output, but can't find it ATM)
SetOutputFilter inflate;deflate
<Location /api/>
ProxyPass http://localhost:8005/
ProxyPassReverse http://localhost:8005/
</Location>
<Location /api-old/>
ProxyPass http://localhost:5000/
ProxyPassReverse http://localhost:5000/
</Location>
<Location /safe-api/>
ProxyPass http://localhost:8006/
ProxyPassReverse http://localhost:8006/
</Location>
<Location /web/>
ProxyPass http://localhost:5555/
ProxyPassReverse http://localhost:5555/
# the ^/(?!/) matches leading /, but not leading // (protocol-neutral URLs)
ProxyHTMLURLMap ^/(?!/) /web/ [R]
</Location>
<Location /mon-old/>
ProxyPass http://localhost:8000/
ProxyPassReverse http://localhost:8000/
ProxyHTMLURLMap ^/(?!/) /mon-old/ [R]
</Location>
<Location /sched/>
ProxyPass http://localhost:8001/ upgrade=WebSocket
ProxyPassReverse http://localhost:8001/
ProxyHTMLURLMap ^/(?!/) /sched/ [R]
</Location>
Alias /mon /var/lib/mupif/monitor/dist/spa