-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
47 lines (35 loc) · 1.47 KB
/
nginx.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
# After installing NGINX, this needs to be installed at /etc/nginx/sites-available/
server {
# 10/7/17; See https://github.com/crspybits/SyncServerII/issues/35
client_max_body_size 100M;
listen 443 ssl http2;
listen [::]:443 ssl http2;
# Edit this to reflect the name of your server. Mine is accessed as `https://syncserver.cprince.com`
server_name syncserver.cprince.com;
# SyncServer uses some http request headers with underscores
underscores_in_headers on;
# You'll need to edit these paths to reflect the location of the SSL files on your system.
ssl_certificate /etc/letsencrypt/live/syncserver.cprince.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/syncserver.cprince.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/syncserver.cprince.com/fullchain.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_protocols TLSv1.2;
ssl_ciphers EECDH+AESGCM:EECDH+AES;
ssl_ecdh_curve secp384r1;
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# SyncServer uses port 8080
proxy_pass http://127.0.0.1:8080;
}
}