1
0
mirror of https://github.com/dokku/buildpack-nginx.git synced 2025-05-05 22:39:22 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
6c1abc0547
Merge pull request #51 from zachahn/patch-1
Respond with a 404 when the file doesn't exist
2021-12-02 22:47:33 -05:00
Zach Ahn
6672b6257a
Respond with a 404 when the file doesn't exist
Prior to this, I was seeing the successful HTTP status 200 when
requesting files that did not exist.

With this change, the server sends back Nginx's default 404 page instead
of the home page.
2021-12-02 22:19:05 -05:00

View File

@ -23,7 +23,7 @@ http {
port_in_redirect off; port_in_redirect off;
location / { location / {
try_files $uri $uri/ /index.html; try_files $uri $uri/ =404;
} }
} }
} }