L
L
littleguga2016-01-07 16:38:53
Nginx
littleguga, 2016-01-07 16:38:53

Why does nginx redirect after submitting a form?

There is a configuration:

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 filling out the phpmyadmin login form, it throws me to mysite.com/phpmyadmin/index.php?token=...instead of mysite.com/secret/index.php?token....
1. Why is this happening?
2. How to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Zhivotnev, 2016-01-07
@littleguga

phpmyadmin needs to be configured so that it "knows" that it needs to work on the url /secret/
docs.phpmyadmin.net/en/latest/config.html#basic-se...
Now PMA itself responds to any requests to it with the address /phpmyadmin/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question