<div>
I've done this:
</div><div><div></div><blockquote type="cite"><div>root@shadow [/etc/cpnginx/custom]# cat mega-sound.be </div><div>location ~* \.mp3$ {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>types {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>application/octet-stream mp3;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div>}</div></blockquote><div></div></div>
<div><div>But, after rebuilding vhost and restarted nginx, the mp3 are currently audio/mpeg (referring to firefox).</div><div>Is there a way to check if the config is correctly "set" ?</div><div><br></div><div>Thanks for your help.</div><div>---<br>Cordialement, Adnan RIHAN.<br>
<u>Président</u>-<u>Fondateur</u> de l'association (de loi 1901) <a href="http://www.virtual-info.info/" target="_blank"><b>Virtual-Info</b></a>, <i>hébergeur Web et Serveurs de Jeux</i>.<br>
<a href="http://rihan.fr/" target="_blank"><u>Consultant</u></a>-<u>Technicien Supérieur</u> en <i>Informatique de Gestion</i>.<br><u>Ambassadeur</u> <a href="http://lyt.me/7E" target="_blank"><b>Qt</b></a> (Projet <a href="http://rihan.fr/fr/projets/tagpg" target="_blank"><b>Tag-PG</b></a>).<u><br></u></div><div><br></div></div>
<p style="color: #A0A0A8;">Le mercredi 28 mars 2012 à 00:15, Cliff Wells a écrit :</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div>On Tue, 2012-03-27 at 23:46 +0200, Adnan RIHAN wrote:</div><div><br></div><blockquote type="cite"><div><div>It's working well, but his website is now ugly, because the</div><div>instruction also applies for .css O_O</div><div><br></div><blockquote type="cite"><div><div>root@shadow [/etc/cpnginx/custom]# cat <a href="http://domain.com">domain.com</a></div><div>types {</div><div> application/octet-stream mp3;</div><div>}</div></div></blockquote></div></blockquote><div><br></div><div>When you use the types directive, it *replaces* all the types with</div><div>whatever you specify. You don't define any mimetypes besides mp3, so</div><div>Nginx uses the default (application/octet-stream) for anything it</div><div>doesn't recognize, which now includes css.</div><div><br></div><div>Try something like this instead:</div><div><br></div><div>location ~* \.mp3$ {</div><div> types { application/octet-stream mp3; }</div><div>}</div><div><br></div><div>See also:</div><div><a href="http://wiki.nginx.org/HttpCoreModule#types">http://wiki.nginx.org/HttpCoreModule#types</a></div><div><br></div><div>As an aside, you could also just edit /etc/nginx/mime.types and change</div><div>the type for mp3 files.</div><div><br></div><div>Regards,</div><div>Cliff</div><div><br></div><div><br></div><div>_______________________________________________</div><div>nginx mailing list</div><div><a href="mailto:nginx@nginx.org">nginx@nginx.org</a></div><div><a href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>