mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2025-06-26 02:20:47 +00:00
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.
This commit is contained in:
@ -23,7 +23,7 @@ http {
|
||||
port_in_redirect off;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user