← back to Kamatera Nginx

sites-available/thesetdecorator.com

63 lines

server {
    server_name thesetdecorator.com www.thesetdecorator.com;
    access_log /var/log/nginx/thesetdecorator.com.access.log;
    error_log /var/log/nginx/thesetdecorator.com.error.log;
    add_header X-Content-Type-Options "nosniff" always;
    add_header Referrer-Policy "strict-origin-when-cross-origin" always;
    add_header Cache-Control "no-store, must-revalidate" always;

    location ^~ /.well-known/acme-challenge/ {
        root /var/www/html;
    }

    # Proxy /api/art-archive/photos/* over tailnet to Mac2 where the 4.2 GB
    # of original JPEGs live. Keeps the heavy image bytes off Kamatera disk.
    location /api/art-archive/photos/ {
        proxy_pass http://100.65.187.120:9716;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_buffering off;
        proxy_read_timeout 60s;
        client_max_body_size 50m;
    }

    location / {
        proxy_pass http://127.0.0.1:9716;
        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 $scheme;
        proxy_connect_timeout 10s;
        proxy_read_timeout 60s;
        client_max_body_size 25m;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/thesetdecorator.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/thesetdecorator.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}
server {
    if ($host = www.thesetdecorator.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = thesetdecorator.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    server_name thesetdecorator.com www.thesetdecorator.com;
    return 404; # managed by Certbot




}