Files
graff.estate-nextjs-updated/graff.estate.conf
T
2025-05-30 12:30:23 +05:00

47 lines
1.3 KiB
Plaintext

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name graff.estate;
root /var/www/graff.estate/client/dist;
# SSL
ssl_certificate /etc/letsencrypt/live/graff.estate/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/graff.estate/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/graff.estate/chain.pem;
# security
include nginxconfig.io/security.conf;
# logging
access_log /var/log/nginx/access.log combined buffer=512k flush=1m;
error_log /var/log/nginx/error.log warn;
# index.html fallback
location / {
# try_files $uri $uri/ /index.html;
try_files $uri $uri.html $uri/ /index.html;
}
location /api {
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:3003;
proxy_set_header Host $host;
include nginxconfig.io/proxy.conf;
}
# additional config
include nginxconfig.io/general.conf;
}
# HTTP redirect
server {
listen 80;
listen [::]:80;
server_name graff.estate;
include nginxconfig.io/letsencrypt.conf;
location / {
return 301 https://graff.estate$request_uri;
}
}