My question is similar to Proxy to "backend" service whenever a file does not exists, except that it should work for the root path as well, where I would like index.html to be returned.
Here is my current configuration:
location / {
root /home/appserver/tmp/;
try_files $uri.html @django;
}
location @django {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8090;
}
This works for everything, but the root (/) path where I would like to return index.html. I've
index index.html;
at the top of my server block.
I've tried
location = / {
alias /home/appserver/tmp/index.html;
}
But this was never caught, and @django was reached instead.