add custom nginx configuration

add custom nginx config so we can set custom 404 page
This commit is contained in:
Ray Elliott 2020-05-03 15:42:33 +01:00
parent 0d419af894
commit fa61a2342c
1 changed files with 34 additions and 0 deletions

34
app-nginx.conf.sigil Normal file
View File

@ -0,0 +1,34 @@
worker_processes 1;
error_log stderr;
pid nginx.pid;
daemon off;
events {
worker_connections 768;
}
http {
types_hash_max_size 2048;
include mime.types;
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/ /index.html;
}
error_page 404 /404.html;
location = /404.html {
root /app/www/{{ $.NGINX_ROOT }};
internal;
}
}
}