Correct way to serve static files ?

George nginx-forum at
Mon Oct 19 21:11:57 MSD 2009

I've been looking over lots of nginx configurations and the way to serve static files differed slightly, so which is the correct way as i've seen the following syntax

	location ~* \.(jpg|jpeg|gif|css|png|js|ico)$ {


        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {

what's the difference between the 2 ?



Posted at Nginx Forum:,14978,14978#msg-14978

More information about the nginx mailing list