Custom configuration
Adnan RIHAN
adnan at rihan.fr
Wed Mar 28 05:16:25 UTC 2012
I've done this:
> root at shadow [/etc/cpnginx/custom]# cat mega-sound.be
> location ~* \.mp3$ {
> types {
> application/octet-stream mp3;
> }
> }
But, after rebuilding vhost and restarted nginx, the mp3 are currently audio/mpeg (referring to firefox).
Is there a way to check if the config is correctly "set" ?
Thanks for your help.
---
Cordialement, Adnan RIHAN.
Président-Fondateur de l'association (de loi 1901) Virtual-Info (http://www.virtual-info.info/), hébergeur Web et Serveurs de Jeux.
Consultant (http://rihan.fr/)-Technicien Supérieur en Informatique de Gestion.
Ambassadeur Qt (http://lyt.me/7E) (Projet Tag-PG (http://rihan.fr/fr/projets/tagpg)).
Le mercredi 28 mars 2012 à 00:15, Cliff Wells a écrit :
> On Tue, 2012-03-27 at 23:46 +0200, Adnan RIHAN wrote:
>
> > It's working well, but his website is now ugly, because the
> > instruction also applies for .css O_O
> >
> > > root at shadow [/etc/cpnginx/custom]# cat domain.com (http://domain.com)
> > > types {
> > > application/octet-stream mp3;
> > > }
> > >
> >
> >
>
>
> When you use the types directive, it *replaces* all the types with
> whatever you specify. You don't define any mimetypes besides mp3, so
> Nginx uses the default (application/octet-stream) for anything it
> doesn't recognize, which now includes css.
>
> Try something like this instead:
>
> location ~* \.mp3$ {
> types { application/octet-stream mp3; }
> }
>
> See also:
> http://wiki.nginx.org/HttpCoreModule#types
>
> As an aside, you could also just edit /etc/nginx/mime.types and change
> the type for mp3 files.
>
> Regards,
> Cliff
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org (mailto:nginx at nginx.org)
> http://mailman.nginx.org/mailman/listinfo/nginx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120328/f4577f48/attachment-0001.html>
More information about the nginx
mailing list