How Nginx can open all ASP files as text/html?

Caio Tarifa asked:

I’ve a lot of files with ASP extension running on linux, but I can’t rename. The content of that files is HTML, but when I open, the Nginx takes me to download.

Does anyone know what I can insert on Nginx to open ASP files as text/html?

My answer:


Just add a MIME type with types. This should appear after the line in nginx.conf which reads include /etc/nginx/mime.types:

http {
   ......
   types {
       text/html asp;
   }
   .....
}

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.