Sleeping a night probably helped a bit.. I think I found the solution...my mistake was using parts of the configuration blocks from archlinux.org-nginx-wiki (the include php.conf-line with the php.conf-file).
So I removed those and added instead these lines to the server block:
# for php outside admin-folder
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
include fastcgi.conf;
}
# for php and protection inside admin folder
location /admin/ {
auth_basic "Restricted";
auth_basic_user_file /path/to/some/htpasswd;
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
include fastcgi.conf;
}
}
------------
wget now fails with "401 Unauthorized" and no redirection is being processed, even if redirect uri is used directly.
Problem solved :) Next time I should read more carefully how the location - statements are prioritized.
So I removed those and added instead these lines to the server block:
# for php outside admin-folder
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
include fastcgi.conf;
}
# for php and protection inside admin folder
location /admin/ {
auth_basic "Restricted";
auth_basic_user_file /path/to/some/htpasswd;
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
include fastcgi.conf;
}
}
------------
wget now fails with "401 Unauthorized" and no redirection is being processed, even if redirect uri is used directly.
Problem solved :) Next time I should read more carefully how the location - statements are prioritized.