46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name joplin.zinomedia.de;
|
|
|
|
access_log off;
|
|
error_log /var/log/nginx/error.log error;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/joplin.zinomedia.de/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/joplin.zinomedia.de/privkey.pem;
|
|
|
|
# SSL Optimizations
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_session_timeout 10m;
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
|
|
# Gzip Compression
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
location / {
|
|
resolver 127.0.0.11;
|
|
set $upstream "joplin:22300";
|
|
|
|
client_max_body_size 10000M; # allow large files
|
|
|
|
proxy_pass http://$upstream;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Accept-Encoding gzip;
|
|
proxy_headers_hash_max_size 512;
|
|
proxy_headers_hash_bucket_size 128;
|
|
proxy_read_timeout 3600;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name joplin.zinomedia.de;
|
|
return 301 https://$host$request_uri;
|
|
}
|