mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2024-12-27 06:15:25 +00:00
89196adbf1
This allows folks the ability to restore the previous routing functionality used by static sites backed by VueJS (as an example). Note that all requests routed this way will respond with a '200 OK' on the server, potentially causing SEO issues. Closes #53
34 lines
608 B
Plaintext
34 lines
608 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 / {
|
|
{{ if ne $.NGINX_DEFAULT_REQUEST "" }}
|
|
try_files $uri $uri/ /{{ $.NGINX_DEFAULT_REQUEST }};
|
|
{{ else }}
|
|
try_files $uri $uri/ =404;
|
|
{{ end }}
|
|
}
|
|
}
|
|
}
|