multiple blocks or single reg exp

token nginx-forum at nginx.us
Sun Jul 31 13:27:41 UTC 2011


Hello,
which would be the best way to handle this multiple location blocks or a
single location block with a regular exp.

location /css/    {   root /var/www/static_includes/; expires 97d; }  
location /images/ { root /var/www/static_includes/; expires 97d; }  
location /js/     { root /var/www/static_includes/; expires 97d;}
   
----------------

location ~ /(css|images|js)/  {
  root /var/www/static_includes/;
  expires 97d;
}


Thanks.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,213142,213142#msg-213142



More information about the nginx mailing list