-
Notifications
You must be signed in to change notification settings - Fork 0
/
safesaving.nginx
48 lines (41 loc) · 1.3 KB
/
safesaving.nginx
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
server {
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
listen 443 ssl http2;
access_log off;
client_max_body_size 200m;
server_name www.safesaving.tk safesaving.tk;
ssl_certificate /etc/letsencrypt/live/safesaving.tk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/safesaving.tk/privkey.pem;
ssl on;
ssl_prefer_server_ciphers on;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
add_header Strict-Transport-Security "max-age=15768000" always;
location ^~ /upload {
alias /var/www/xsafesaving/upload;
}
location ~* \.(ico|js|jpg|png|css|ttf|gif)$ {
root /var/www/xsafesaving/Frontend;
}
location / {
root /var/www/xsafesaving/Frontend;
index index.html;
}
location /api {
proxy_pass http://localhost:8081;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 10;
proxy_send_timeout 150;
proxy_read_timeout 150;
}
}
server {
listen 80;
server_name www.safesaving.tk safesaving.tk;
return 301 https://$host$request_uri;
}