-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnginx-config.example
42 lines (33 loc) · 1.6 KB
/
nginx-config.example
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
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=STATIC:100m inactive=360m;
proxy_cache_key "$scheme$request_method$host$request_uri";
server {
listen 443 ssl;
listen [::]:443 ssl ipv6only=on;
server_name HOSTNAME;
ssl_certificate /etc/letsencrypt/live/HOSTNAME/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/HOSTNAME/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4!EDH';
location ~ ^/(robots.txt|sitemap.xml)$ {
root /PATH/TO/ris2web/static;
}
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_cache STATIC;
proxy_cache_valid 200 1d;
proxy_cache_use_stale error timeout invalid_header updating
http_500 http_502 http_503 http_504;
rewrite ^/(citation/.*)$ /en/$1 permanent;
}
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/html;
location ~ /.well-known {
allow all;
}
return 301 https://$host$request_uri;
}