-
Notifications
You must be signed in to change notification settings - Fork 12
/
scibot.conf
72 lines (64 loc) · 2.32 KB
/
scibot.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
upstream scibot-bookmarklet {
# change this to point where it is actually running
server unix:/run/scibot-bookmarklet/socket;
}
upstream scibot-dashboard {
# change this to point where it is actually running
server unix:/run/scibot-dashboard/socket;
}
server {
listen 80;
listen [::]:80;
server_name scibot.scicrunch.io;
return 301 https://$server_name$request_uri;
access_log /var/log/nginx/scibot.scicrunch.io.access_log main;
error_log /var/log/nginx/scibot.scicrunch.io.error_log info;
}
server {
listen 443;
listen [::]:443 ssl;
server_name scibot.scicrunch.io;
ssl on;
# *.scicrunch.io certs
ssl_certificate /etc/scicrunch.io/scicrunch.io.crt;
ssl_certificate_key /etc/scicrunch.io/scicrunch.io.key;
access_log /var/log/nginx/scibot.scicrunch.io.ssl_access_log main;
error_log /var/log/nginx/scibot.scicrunch.io.ssl_error_log info;
# from https://cipherli.st/
# and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
# disable HSTS header for now
#add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
ssl_dhparam /etc/ssl/certs/dhparam.pem; # openssl dhparam -out /tmp/dhparam.pem 4096 # DO NOT RUN ON AMAZON scp it over
location / {
proxy_pass http://scibot-bookmarklet;
client_max_body_size 20m;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Scheme $scheme;
}
location /dashboard {
proxy_pass http://scibot-dashboard;
client_max_body_size 20m;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Scheme $scheme;
}
}