ubuntu – Nginx sever default index file

I think I have found out the answer myself.

It seems that the http port 80’s root directory is being set in the file by the name “default” in the site-available directory.

Inside the file named “default” in the directory there is a “root” statement. This root statement contains the default path of the port 80 response.

My problem was the above root statement over powered my server block directives for port 80 in nginx.conf.

I changed the default path of the “root” statement in the file named “default” then Nginx finally serves my intended index file in my indended directory.

The file named “default” also is sym-linked by a sym-link in the sites-enabled directory.

Please give comments if you know better ways of setting up the default port 80 default root directory for Nginx.

Read more here: Source link