Default page in NGINX

April 11, 2014 9.6k 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.
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.
Have another answer? Share your knowledge.