Welcome! Log In Create A New Profile

Advanced

Re: Alias causing phpMyAdmin login endless loop

February 18, 2011 11:40AM
"location ~ ^/phpmyadmin/(.*\.php)$" -->> How about all the other phpMyAdmin files that are not .php files?

This works for me (Replace 'proxy' with 'fastcgi').

[code]
server {
location ~ .+\.php$ {
# Return '400 Bad Request' for dodgy urls;
location ~ \..*/.*\.php$ {
return 400;
}
# Send others to proxy;
error_page 402 = @proxy;
return 402;
}
location ~ ^/phpMyAdmin/(.*)$ {
alias /server/path/to/phpMyAdmin/;

# Require authentication
auth_basic "Area-Name";
auth_basic_user_file htpasswd-file;

# Serve static files directly and pass dynamic requests to proxy;
try_files $uri $uri/ @proxy;
}
location @proxy {
proxy_pass http://127.0.0.1:xyz;
...
}
}
[/code]

The setup means all phpMyAdmin request go through the phpMyAdmin location first.

As said, swap fastcgi for proxy and should be good to go.
Subject Author Posted

Alias causing phpMyAdmin login endless loop

stickaforkinme January 16, 2011 11:28AM

Re: Alias causing phpMyAdmin login endless loop

Amanager February 18, 2011 04:06AM

Re: Alias causing phpMyAdmin login endless loop

stickaforkinme February 26, 2011 04:14PM

Re: Alias causing phpMyAdmin login endless loop

acjohnson March 07, 2011 08:37PM

Re: Alias causing phpMyAdmin login endless loop

stickaforkinme March 08, 2011 05:37PM

Re: Alias causing phpMyAdmin login endless loop

Dayo February 18, 2011 11:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 88
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready