By jeanmicheal
Hi,
I have install a new LEMP server by following the instructions here https://digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04
The installation was successful by following the help guide.
Issue: When I go to my domain example.com/index.php – it works great When I go to my domain exmaple.com - 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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
works great :) <br> <br>changing default_type application/octet-stream; to default_type text/html; in nginx.conf solved the issue. <br> <br>Thanks much. <br>
It download a page because in nginx.conf you have: <br>default_type application/octet-stream; <br> <br>You can change it to <br>default_type text/html; <br>or something like that <br>More info: http://nginx.org/en/docs/http/ngx_http_core_module.html#default_type <br> <br>To have a default page <br>Use index index.php index.html; <br>More info: http://nginx.org/en/docs/http/ngx_http_index_module.html#index <br> <br>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.