1

I have conf:

    location ~ ^/secret(.+) {
            rewrite ^/secret(.+)$ /phpmyadmin$1;
    }

    location /phpmyadmin {
            root /usr/share/;
            index index.php index.html index.htm;

            auth_basic "Auth";
            auth_basic_user_file /etc/nginx/pass/.pma;

            location ~ ^/phpmyadmin/(.+\.php)$ {
                    try_files $uri =404;
                    root /usr/share/;
                    include sites-available/common/php;
            }
            internal;
    }

After submit login form of phpmyadmin i've been redirected to mysite.com/phpmyadmin/index.php?token=... instead of mysite.com/secret/index.php?token.... Why does it behave this way?

littleguga
  • 166
  • 1
  • 7

1 Answers1

0

For others, who will have the same problem.

  1. Check PMA config for PmaAbsoluteUri. By default it equals to ''. If you have the default value - don't change it.
  2. Feel difference between alias and rewrite. I changed my conf from rewrite to alias and now it works fine.
littleguga
  • 166
  • 1
  • 7