I’m new to Nginx and I have a basic problem. In short my “index.htm”
isn’t dynamically loading on any sub-directories other than root.
For example, “http://www.mydomain.com/” will load the index.htm page
just fine. However, “http://www.mydomain.com/subdirectory/” will not
load
the associated index.htm. I have to manually specify “…/index.htm”
within the URL for the page to load. This can’t be right/normal.
My nginx.conf has this within the server declaration:
Perhaps placing the root and index directives one level higher (i.e.
within the server block) instead of at location / would be better.
Just customise the individual locations within the server.
server {
…
…
root  /var/www/localhost/htdocs;
index  index.html index.htm;
Question. Is this normal behavior? I’m used to tomcat taking the index
of any directory and using it as a default – I never expected Nginx to
only use the root index and ignore all sub directories.
Thank you for your posts…
Gyan
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.