Skip to content

Commit 11a6ab4

Browse files
authored
nginx.conf tweaks: return 404 page when not found (#1104)
* nginx.conf tweaks: return 404 page when not found avoid returning a 500 error due to internal rewrite loop, which blocks/breaks dynamic routes * Remove 50x error page and try_files: these are default behaviors This simplifies the config that we show users
1 parent 9047338 commit 11a6ab4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

blog/2024-10-8-self-hosting-reflex-with-docker.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,7 @@ server {
205205
server_name frontend;
206206
207207
208-
error_page 500 502 503 504 /50x.html;
209-
location = /50x.html {
210-
root /usr/share/nginx/html;
211-
}
208+
error_page 404 /404.html;
212209
213210
location /_event {
214211
proxy_set_header Connection "upgrade";
@@ -228,7 +225,6 @@ server {
228225
location / {
229226
# This would be the directory where your Reflex app's static files are stored at
230227
root /usr/share/nginx/html;
231-
try_files $uri /$uri/index.html;
232228
}
233229
234230
}

0 commit comments

Comments
 (0)