add nginx file template and fix reloading outside of the app

issue #89
This commit is contained in:
Ricardo Campos
2024-10-09 18:05:31 -03:00
parent f470bfae50
commit b3bdf17597
+37
View File
@@ -0,0 +1,37 @@
server {
root /var/www/example.com/html;
index index.html;
server_name example.com www.example.com;
location / {
try_files $uri /index.html
}
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/texample.com/privkey.pem;
location /server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_pass http://localhost:8585;
}
}
server {
if ($host = www.example.com) {
return 301 https://$host$request_uri;
}
if ($host = example.com) {
return 301 https://$host$request_uri;
}
listen 80;
listen [::]:80;
server_name example.com www.example.com;
return 404;
}