title: How to configure nginx to serve HTML files for viewing instead of downloading?
body: <p>I want to configure nginx to server HTML files for viewing instead of downloading.</p>
  
  <pre><code>server {
      listen       5000;
      server_name  localhost;
  
      #charset koi8-r;
  
      #access_log  logs/host.access.log  main;
  
      #location / {
      #    root   html;
      #    index  index.html index.htm;
      #}
  
      location = / {
          root /home/vagrant/own/base/assets;
          index index.html;
      }
  
      location = /login {
      #    root /home/vagrant/own/base/assets;
            alias /home/vagrant/own/base/assets/login.html;
      }
  
      location /index.html {
          root /home/vagrant/own/base/assets;
      }
  }
  </code></pre>
  
  <p>This is my conf file, when I browse to <code>/login</code>, my browser tries to offer the file for download instead of viewing it. Thanks for your help.</p>