Files
gitea-workflows/.gitea/templates/nginx-nextjs-site.conf.template
sursini c1748d6819
Some checks failed
Generate Nginx Config / generate-config (push) Failing after 33s
feat: add reusable nextjs-deploy and nextjs-nginx-conf workflows
2026-03-10 17:48:59 -03:00

38 lines
1.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Kalpasys generated by nextjs-nginx-conf.yaml
server {
listen 80;
server_name {{DOMAIN}};
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name {{DOMAIN}};
ssl_certificate /etc/letsencrypt/live/{{DOMAIN}}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{DOMAIN}}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
error_page 502 503 504 /maintenance.html;
location = /maintenance.html {
root /var/www/errors;
internal;
}
location / {
proxy_intercept_errors on;
proxy_pass http://127.0.0.1:{{PORT}};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_cache_bypass $http_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;
}
}