legacy-server-config/nginx/sites/nextcloud

34 lines
1001 B
Plaintext
Raw Permalink Normal View History

2021-01-01 15:09:53 +00:00
server {
listen 80;
2021-04-12 09:14:55 +00:00
server_name cloud.teier.net;
return 301 https://cloud.teier.net:443$request_uri;
2021-01-01 15:09:53 +00:00
}
server {
listen 443 ssl http2;
2021-04-12 09:14:55 +00:00
server_name cloud.teier.net;
2021-01-01 15:09:53 +00:00
ssl on;
2021-04-12 09:14:55 +00:00
ssl_certificate /etc/letsencrypt/live/teier.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.net/privkey.pem;
2021-01-01 15:09:53 +00:00
location / {
proxy_pass http://127.0.0.1:8081/;
# Configuration for WebSockets
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_cache off;
# Configuration for ServerSentEvents
proxy_buffering off;
# Configuration for LongPolling or if your KeepAliveInterval is longer than 60 seconds
proxy_read_timeout 100s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
2021-01-10 16:40:52 +00:00
proxy_set_header X-Frame-Options "SAMEORIGIN";
2021-01-01 15:09:53 +00:00
}
}