2025-08-13 13:47:23 +01:00
|
|
|
|
|
|
|
# S3 (Garage) Web endpoint for public file access
|
|
|
|
|
2025-08-10 16:43:39 +01:00
|
|
|
# HTTP configuration
|
|
|
|
# -- Redirect all HTTP requests to HTTPS port
|
|
|
|
server {
|
|
|
|
listen 80; # HTTP port
|
|
|
|
server_name s3.systemsobscure.net;
|
|
|
|
location / {
|
|
|
|
return 301 https://$host$request_uri; # Variable is a placeholder for all requests to the server name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# HTTPS configuration
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
2025-08-13 13:47:23 +01:00
|
|
|
server_name *.s3.systemsobscure.net;
|
2025-08-10 16:45:55 +01:00
|
|
|
|
2025-08-10 16:43:39 +01:00
|
|
|
# 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;
|
|
|
|
|
|
|
|
|
2025-08-12 16:24:38 +01:00
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass http://172.18.0.1:3902;
|
|
|
|
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;
|
2025-08-10 16:43:39 +01:00
|
|
|
}
|
|
|
|
}
|