2025-03-21 17:05:18 +00:00
|
|
|
# HTTP configuration
|
|
|
|
# -- Redirect all HTTP requests to HTTPS port
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name nextcloud.systemsobscure.net;
|
|
|
|
location / {
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# HTTPS configuration
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
|
|
|
server_name nextcloud.systemsobscure.net;
|
|
|
|
|
|
|
|
# SSL configuration
|
|
|
|
ssl_certificate /etc/letsencrypt/live/systemsobscure.net/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/systemsobscure.net/privkey.pem;
|
|
|
|
|
|
|
|
# Security headers
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
|
|
|
|
|
|
# Set max upload size
|
|
|
|
client_max_body_size 10G;
|
|
|
|
|
|
|
|
|
|
|
|
# Proxy Configuration
|
|
|
|
location / {
|
2025-03-23 09:46:41 +00:00
|
|
|
proxy_pass http://nextcloud-app-1:80;
|
2025-03-21 17:05:18 +00:00
|
|
|
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 $scheme;
|
|
|
|
proxy_read_timeout 3600;
|
|
|
|
}
|
|
|
|
}
|