Files
homaroma/serverinfo/homaroma.shop.conf
2026-06-03 09:28:22 +07:00

41 lines
1.1 KiB
Plaintext

server {
listen 80;
server_name homaroma.shop www.homaroma.shop;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name homaroma.shop www.homaroma.shop;
ssl_certificate /etc/letsencrypt/live/homaroma.shop/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/homaroma.shop/privkey.pem;
# Next.js SSR
location / {
proxy_pass http://192.168.1.167:3002;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
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_cache_bypass $http_upgrade;
}
# Next.js static assets caching
location /_next/static/ {
proxy_pass http://192.168.1.167:3002;
proxy_http_version 1.1;
proxy_set_header Host $host;
add_header Cache-Control "public, max-age=31536000, immutable";
}
}