generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx_secure.conf
52 lines (45 loc) · 1.15 KB
/
nginx_secure.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
server {
listen 80;
listen [::]:80;
server_name ${HOST};
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ${HOST};
ssl_certificate /ssl/fullchain.pem;
ssl_certificate_key /ssl/privkey.pem;
# FIXME not sure if this will work with angular routing
# rewrite url if it doesent access via the actual domain name
#if ($http_host !~ "^${HOST}") {
# rewrite ^(.*)$ $scheme://${HOST}/$1 redirect;
#}
# size limits
client_max_body_size 1000M;
proxy_buffer_size 1024k;
proxy_buffers 4 1024k;
proxy_busy_buffers_size 1024k;
# compression
gzip on;
gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
application/javascript
application/json
application/xml
application/rss+xml
image/svg+xml;
# locations
location /api {
proxy_pass http://backend:8080/; # backend kommt von namen des docker-compose-services
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html?$args;
}
}