Welcome! Log In Create A New Profile

Advanced

Wrong mimetype when served from nginx

Cédric Jeanneret
July 10, 2015 02:02AM
Hello,

I have a small issue with my nginx (1.2.1) configuration:
some files are served as "application/octet-stream" while they are
detected as "text/plain" by "mimetype <file>" command.

File names are just "1", "2", and so on.

Is there a way to enforce mimetype for those files?

I thought about something like this:

location ~ /path/to/file/[0-9]+ {
types {}
default_type text/plain;
}

but after that, I get a 404 — what did I wrong?

Thanks for your support!

Cheers,

C.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Wrong mimetype when served from nginx

Cédric Jeanneret July 10, 2015 02:02AM

Re: Wrong mimetype when served from nginx

Maxim Dounin July 12, 2015 12:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 155
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready