forked from syuilo/summaly
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsummaly.example.nginx
39 lines (32 loc) · 1.34 KB
/
summaly.example.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
proxy_cache_path /tmp/nginx_cachesm levels=1:2 keys_zone=cachesm:16m max_size=200m inactive=720m use_temp_path=off;
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name summaly.example.net;
ssl_session_cache shared:ssl_session_cache:10m;
root /var/www/html;
# To use Let's Encrypt certificate
#ssl_certificate /etc/letsencrypt/live/summaly.example.net/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/summaly.example.net/privkey.pem;
# To use Debian/Ubuntu's self-signed certificate (For testing or before issuing a certificate)
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
# SSL protocol settings
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:AES128-SHA;
ssl_prefer_server_ciphers on;
# Proxy to Node
location /url {
proxy_pass http://127.0.0.1:3030;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_redirect off;
# Cache settings
proxy_cache cachesm;
proxy_cache_lock on;
proxy_cache_use_stale updating;
add_header X-Cache-N $upstream_cache_status;
}
}