<DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0">On Sat, Mar 29, 2014 at 12:12 PM, Adie Nurahmadie wrote:</FONT></DIV><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0"> <FONT SIZE="3"></FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">On Sat, Mar 29, 2014 at 11:50 PM, Doc  < <FONT COLOR="#3333FF"><A HREF="javascript:parent.wgMail.openComposeWindow('icantthinkofone@charter.net')" TARGET="_blank"><U>icantthinkofone@charter.net</U></A></FONT>>  wrote: </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">On my site, music can be played by going to  <FONT COLOR="#3333FF"><A HREF="http://mysite.com/music/billyjoel/song.mp3" TARGET="_blank"><U>http://mysite.com/music/billyjoel/song.mp3</U></A></FONT> (for example). </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">You can download the same song by going to  <FONT COLOR="#3333FF"><A HREF="http://mysite.com/music/billyjoel/download/song.mp3" TARGET="_blank"><U>http://mysite.com/music/billyjoel/download/song.mp3</U></A></FONT>. </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">The path including "download" is aliased and the default mime type changed as shown here: </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">location /music/billyjoel/play/ { </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    types{ </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">        audio/mp3 mp3; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    } </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">} </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">location /music/billyjoel/download/ { </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    types{} </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    default_type application/octet-stream; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    alias /(location of root goes here)/music/billyjoel/play/; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">} </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">This works as intended. However, I set expires and access_log directives for css/jpg/woff, etc. like this and the mp3 will no longer download and I get a 404 with a "file not found" error in the error logs: </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">location ~* ^.+\.(mp3|jpg|css)$ { </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    expires modified +30d; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    access_log off; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">} </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">Location with regex will get matched first,  </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">Ack! Yes. Exactly. I keep forgetting that. Thank you.</FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">Looks like the download request for mp3 files get served by: ` location ~* ^.+\.(mp3|jpg|css)$` </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">and since you didn't set any alias or location over there, it will returns 404. </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">  </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">_______________________________________________ </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">nginx mailing list </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#3333FF" LETTERSPACING="0" KERNING="0"><A HREF="javascript:parent.wgMail.openComposeWindow('nginx@nginx.org')" TARGET=""><U>nginx@nginx.org</U></A><FONT COLOR="#000000"></FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#3333FF" LETTERSPACING="0" KERNING="0"><A HREF="http://mailman.nginx.org/mailman/listinfo/nginx" TARGET="_blank"><U>http://mailman.nginx.org/mailman/listinfo/nginx</U></A><FONT COLOR="#000000"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#3333FF" LETTERSPACING="0" KERNING="0"><A HREF="http://mailman.nginx.org/mailman/listinfo/nginx" TARGET="_blank"></A></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">--  </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">regards, </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">Nurahmadie </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">-- </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">On Sat, Mar 29, 2014 at 11:50 PM, Doc < <FONT COLOR="#3333FF"><A HREF="javascript:parent.wgMail.openComposeWindow('icantthinkofone@charter.net')" TARGET="_blank"><U>icantthinkofone@charter.net</U></A></FONT>> wrote: </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">On my site, music can be played by going to <FONT COLOR="#3333FF"><A HREF="http://mysite.com/music/billyjoel/song.mp3" TARGET="_blank"><U>http://mysite.com/music/billyjoel/song.mp3</U></A></FONT>(for example). </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">You can download the same song by going to <FONT COLOR="#3333FF"><A HREF="http://mysite.com/music/billyjoel/download/song.mp3" TARGET="_blank"><U>http://mysite.com/music/billyjoel/download/song.mp3</U></A></FONT>. </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">The path including "download" is aliased and the default mime type changed as shown here: </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">location /music/billyjoel/play/ { </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    types{ </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">        audio/mp3 mp3; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    } </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">} </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">location /music/billyjoel/download/ { </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    types{} </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    default_type application/octet-stream; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    alias /(location of root goes here)/music/billyjoel/play/; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">} </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">This works as intended. However, I set expires and access_log directives for css/jpg/woff, etc. like this and the mp3 will no longer download and I get a 404 with a "file not found" error in the error logs: </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">location ~* ^.+\.(mp3|jpg|css)$ { </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    expires modified +30d; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">    access_log off; </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">} </FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">_______________________________________________ </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">nginx mailing list </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#3333FF" LETTERSPACING="0" KERNING="0"><A HREF="javascript:parent.wgMail.openComposeWindow('nginx@nginx.org')" TARGET=""><U>nginx@nginx.org</U></A><FONT COLOR="#000000"></FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#3333FF" LETTERSPACING="0" KERNING="0"><A HREF="http://mailman.nginx.org/mailman/listinfo/nginx" TARGET="_blank"><U>http://mailman.nginx.org/mailman/listinfo/nginx</U></A><FONT COLOR="#000000"></FONT></FONT></DIV><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#3333FF" LETTERSPACING="0" KERNING="0"><A HREF="http://mailman.nginx.org/mailman/listinfo/nginx" TARGET="_blank"></A></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">-- </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">regards, </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">Nurahmadie </FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="3" COLOR="#000000" LETTERSPACING="0" KERNING="0">-- </FONT></DIV><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0">------------------------------</FONT></DIV><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0"><br></FONT><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0">_______________________________________________</FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="2" COLOR="#000000" LETTERSPACING="0" KERNING="0">nginx mailing list</FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="2" COLOR="#3333FF" LETTERSPACING="0" KERNING="0"><A HREF="javascript:parent.wgMail.openComposeWindow('nginx@nginx.org')" TARGET=""><U>nginx@nginx.org</U></A><FONT COLOR="#000000"><A HREF="javascript:parent.wgMail.openComposeWindow('nginx@nginx.org')" TARGET=""> </A></FONT></FONT></DIV><DIV ALIGN="LEFT"><FONT FACE="Verdana" SIZE="2" COLOR="#3333FF" LETTERSPACING="0" KERNING="0"><A HREF="http://mailman.nginx.org/mailman/listinfo/nginx" TARGET="_blank"><U>http://mailman.nginx.org/mailman/listinfo/nginx</U></A><FONT COLOR="#000000"><A HREF="http://mailman.nginx.org/mailman/listinfo/nginx" TARGET="_blank"> </A></FONT></FONT></DIV>