The following makes nginx not to pass to the PHP-FPM fastcgi server because I created a location block:
location = /test.php { auth_basic "Nope."; auth_basic_user_file /test.htpasswd; } location ~* \.php$ { try_files $uri =404; include params/fastcgi; fastcgi_keep_conn on; fastcgi_index index.php; fastcgi_pass 127.0.0.1:4623; } Means: if the first location block matches, it seems that the second one is ignored. Is there any solution for this without copying the fastcgi-stuff from the second location block into the first one?