Alias causing phpMyAdmin login endless loop

stickaforkinme nginx-forum at
Sun Jan 16 19:28:51 MSK 2011

Recently I've been trying to set up a web server using Nginx (I normally
use Apache). However I've ran into a problem trying to set phpMyAdmin up
on an alias. The alias correctly takes you too the phpMyAdmin login
screen, however when you enter valid credentials and hit go you end up
back on the login screen with no errors.

Sounded like a cookie or session problem to me... but if I symlink the
phpMyAdmin directory and try logging in through the symlinked version it
works fine! Both the symlink and the alias one set the same number of
cookies and both set seem to set the cookies for the correct domain and

My Nginx config for the php alias is as follows (which seems to be
correct based on the googling I've done on the problem):

location ~ ^/phpmyadmin/(.*\.php)$ {
    alias /usr/share/phpMyAdmin/$1;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $request_filename;

I'm running Nginx 0.8.53
PHP 5.3.3
MySQL 5.1.47
phpMyAdmin 3.3.9 - self install
And php-mcrypt is installed.

Anyone have any ideas about how to fix it?

Posted at Nginx Forum:,166700,166700#msg-166700

More information about the nginx mailing list