Default page in NGINX

Posted April 11, 2014 26.7k views
Hi, I have install a new LEMP server by following the instructions here The installation was successful by following the help guide. Issue: When I go to my domain -- it works great When I go to my domain - It automatically download a file. I would like it to default to index.php or index.htm or index.html. How do I go about setting that up. Thank much for your help.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers
It download a page because in nginx.conf you have:
default_type application/octet-stream;

You can change it to
default_type text/html;
or something like that
More info:

To have a default page
Use index index.php index.html;
More info:

works great :)

changing default_type application/octet-stream; to default_type text/html; in nginx.conf solved the issue.

Thanks much.