mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2024-11-05 19:48:43 +00:00
6672b6257a
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.
30 lines
467 B
Plaintext
30 lines
467 B
Plaintext
worker_processes 1;
|
|
error_log stderr;
|
|
pid nginx.pid;
|
|
daemon off;
|
|
|
|
events {
|
|
worker_connections 768;
|
|
}
|
|
|
|
http {
|
|
types_hash_max_size 2048;
|
|
include mime.types;
|
|
charset UTF-8;
|
|
server {
|
|
listen {{ $.PORT }};
|
|
server_name _;
|
|
{{ if ne $.NGINX_ROOT "" }}
|
|
root /app/www/{{ $.NGINX_ROOT }};
|
|
{{ else }}
|
|
root /app/www;
|
|
{{ end }}
|
|
index index.html;
|
|
port_in_redirect off;
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|
|
}
|