I am serving static html with nginx.
I'd like mydomain.com to show index.html in the root folder. For links of the form /pages/page I want them to go to the root directory and pull up page.html from the pages folder.
Here's what I came up with:
location / {
root /var/www/public_html;
index index.html;
try_files $uri $uri.html http://mysite.com;
}
However, I get a 404 when I go to my site. It does render index.html if I use try_files /index.html $uri $uri.html http://mysite.com;