-
Notifications
You must be signed in to change notification settings - Fork 40
/
metasfresh_webui_ssl.conf
133 lines (114 loc) · 5 KB
/
metasfresh_webui_ssl.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<IfModule mod_ssl.c>
<VirtualHost *:443>
ProxyRequests Off
DocumentRoot /opt/metasfresh-webui-frontend/dist/
# Logging
ErrorLog ${APACHE_LOG_DIR}/webui_error.log
CustomLog ${APACHE_LOG_DIR}/webui_access.log combined
# Debugging
# NOTE: pls comment the ErrorLog and CustomLog entries above
#ErrorLog /dev/stdout
#TransferLog /dev/stdout
#LogLevel alert rewrite:trace8
<Location /rest>
Order allow,deny
Allow from all
ProxyPass http://webapi:8080/rest/ retry=0 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse http://webapi:8080/rest/
</Location>
<Location /stomp>
Order allow,deny
Allow from all
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule .* ws://webapi:8080%{REQUEST_URI} [P]
ProxyPass wss://webapi:8080/stomp/ retry=0 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse wss://webapi:8080/stomp/
ProxyPass http://webapi:8080/stomp/ retry=0 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse http://webapi:8080/stomp/
</Location>
<Location /info>
Order allow,deny
Allow from all
ProxyPass http://webapi:8080/info retry=0 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse http://webapi:8080/info
</Location>
<Location /swagger-ui.html>
Order allow,deny
Allow from all
ProxyPass http://webapi:8080/swagger-ui.html retry=0 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse http://webapi:8080/swagger-ui.html
</Location>
<Location /v2/api-docs>
Order allow,deny
Allow from all
ProxyPass http://webapi:8080/v2/api-docs/ retry=0 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse http://webapi:8080/v2/api-docs/
</Location>
<Location /swagger-resources>
Order allow,deny
Allow from all
ProxyPass http://webapi:8080/swagger-resources/ retry=0 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse http://webapi:8080/swagger-resources/
</Location>
<Location /webjars/springfox-swagger-ui>
Order allow,deny
Allow from all
ProxyPass http://webapi:8080/webjars/springfox-swagger-ui/ retry=0 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse http://webapi:8080/webjars/springfox-swagger-ui/
</Location>
<Location /configuration>
Order allow,deny
Allow from all
ProxyPass http://webapi:8080/configuration/ retry=0 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse http://webapi:8080/configuration/
</Location>
<Location /info>
Order allow,deny
Allow from all
ProxyPass http://webapi:8080/info retry=0 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse http://webapi:8080/info
</Location>
<Location /mobile>
Order allow,deny
Allow from all
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 21 Oct 2015 07:28:00 GMT"
</Location>
<Directory /opt/metasfresh-webui-frontend/dist/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine On
# Existing file or directory
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# mobile UI
RewriteCond %{REQUEST_URI} ^/mobile
RewriteRule ^ /mobile/index.html [L]
# Fallback:
RewriteRule ^ /index.html
</Directory>
<Files index.html>
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 21 Oct 2015 07:28:00 GMT"
</Files>
<Files service-worker.js>
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 21 Oct 2015 07:28:00 GMT"
</Files>
SSLCertificateFile /etc/apache2/certs/fullchain.pem
SSLCertificateKeyFile /etc/apache2/certs/privkey.pem
</VirtualHost>
</IfModule>