Fresh install of nginx causes browser to download index.html instead of opening it
- by 010110110101
When I view this in Chrome, http://localhost:90 the file is downloaded instead of displayed in Chrome.
This question has been asked a lot of times on SO, but about index.php files. My problem is a plain jane HTML file, not a PHP file. That hasn't been asked yet. I was hoping the solution would be similar, but I haven't been able to figure it out.
Here's my example.com.conf:
server
{
server_name localhost;
listen 90;
root /var/www/example.com/html
index index.html
location / {
try_file $uri $uri/ =404;
}
}
My index.html file contains only two words, no markup
Hello World
I think it's the mime.types. The mime.types file has the entry for html in it. This is a fresh nginx install.
nginx -t reports "test is successful"