Skip to content

Commit dd48aeb

Browse files
committed
docs: fix nginx config for Next.js frontend proxy
1 parent e399952 commit dd48aeb

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

docs/nginx-setup-complete.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,22 @@ server {
3030
3131
location / {
3232
proxy_pass http://127.0.0.1:14100;
33-
# Standard proxy headers configured
33+
proxy_http_version 1.1;
34+
proxy_set_header Host $host;
35+
proxy_set_header X-Real-IP $remote_addr;
36+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
37+
proxy_set_header X-Forwarded-Proto $scheme;
38+
proxy_set_header X-Forwarded-Host $host;
39+
proxy_set_header X-Forwarded-Port $server_port;
40+
41+
# Timeout settings for Next.js
42+
proxy_connect_timeout 60s;
43+
proxy_send_timeout 60s;
44+
proxy_read_timeout 60s;
45+
46+
# Buffering settings
47+
proxy_buffering off;
48+
proxy_request_buffering off;
3449
}
3550
3651
listen 443 ssl; # managed by Certbot
@@ -181,4 +196,4 @@ dig dev.codeframeapp.com +short
181196
dig api.dev.codeframeapp.com +short
182197
```
183198

184-
Both should return: **47.88.89.175**
199+
Both should return: **47.88.89.175**

0 commit comments

Comments
 (0)