How to set index.html as root file in Nginx?

后端 未结 5 585
挽巷
挽巷 2020-12-08 09:14

How to set index.html for the domain name e.g. https://www.example.com/ - leads user to index.html in root directory.

I\'ve tried different things like:

         


        
5条回答
  •  一个人的身影
    2020-12-08 09:47

    The answer is to place the root dir to the location directives:

    root   /srv/www/ducklington.org/public_html;
    

提交回复
热议问题