Preferred method for location blocks

Gena Makhomed gmm at csdoc.com
Wed Apr 1 22:39:40 UTC 2015


On 01.04.2015 23:55, Daniel Miller wrote:

> What is the difference between:
>
> location /admin {
> }
>
> vs.
>
> location ~ /admin(/.*) {
> }
>
>
> The first seems cleaner, and I assume runs faster - but do they process
> differently?

Yes, they process differently.

http://nginx.org/en/docs/http/ngx_http_core_module.html#location

http://nginx.org/en/docs/http/request_processing.html

-- 
Best regards,
  Gena



More information about the nginx mailing list