40 lines
1.2 KiB
Nginx Configuration File
40 lines
1.2 KiB
Nginx Configuration File
# nginx/nginx.conf
|
|
server {
|
|
listen 80;
|
|
server_name nxt.bhatfamily.in;
|
|
|
|
# Redirect all HTTP to HTTPS on 8446
|
|
return 301 https://$host:8446$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
http2 on;
|
|
server_name nxt.bhatfamily.in;
|
|
|
|
ssl_certificate /etc/nginx/ssl/nxt.bhatfamily.in.crt;
|
|
ssl_certificate_key /etc/nginx/ssl/nxt.bhatfamily.in.key;
|
|
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
|
|
|
|
# Good basic TLS settings (tune further as needed)
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_prefer_server_ciphers on;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
|
|
client_max_body_size 10240M;
|
|
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" always;
|
|
|
|
location / {
|
|
proxy_pass http://nextcloud-app:80;
|
|
proxy_http_version 1.1;
|
|
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-Proto https;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Port 8446;
|
|
proxy_read_timeout 3600;
|
|
proxy_send_timeout 3600;
|
|
}
|
|
}
|