Nginx with phpmyadmin wrong redirect after login

前端 未结 6 1607
时光取名叫无心
时光取名叫无心 2021-02-04 13:48

I\'m setting up phpMyAdmin with nginx. I can visit phpMyAdmin at http://localhost/phpmyadmin. However, when I logged in, the URL is redirected to http://localhost/sql.php instea

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-04 14:27

    Changing cgi.fix_pathinfo back to 1 fixed the issue for me as well. However, I'm not certain that this is a good solution since guides tell:

    "This is an extremely insecure setting because it tells PHP to attempt to execute the closest file it can find if the requested PHP file cannot be found. This basically would allow users to craft PHP requests in a way that would allow them to execute scripts that they shouldn't be allowed to execute."

    So it seems there should be a better fix to this so I wouldn't have to compromise on security.

    The first post in this topic doesn't work for me. It just disables phpmyadmin... So at the moment I'm left only with cgi.fix_pathinfo workaround.

提交回复
热议问题