Solved nginx 1.19.6 rewrite location ~ ^/phpmyadmin not work

mean

Verified User
Joined
Feb 14, 2007
Messages
103
Hello Support team.

I have a problem after update Nginx version 1.19.6

the any domain (User Level) show a blank page on /phpmyadmin, rewrite location is not working
the login dialog show normal but nginx response 404 Not Found for any static file ,css js,

url rewrite is not work
  • user-domain.com/phpmyadmin
work with only
  • user-domain.com/phpMyAdmin
  • user-domain.com/pma
  • hostname.com/phpMyAdmin
  • hostname.com/phpmyadmin
  • hostname.com/pma

webapps.conf
location ^~ /phpMyAdmin {
root /var/www/html/;
index index.php index.html index.htm;
location ~ ^/phpMyAdmin/ {
access_log off;
set $my_server_addr $server_addr;
if ($server_addr ~ ^[0-9a-fA-F:]+$) {
set $my_server_addr [$server_addr];
}
proxy_pass http://$my_server_addr:8080;
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header X-Accel-Internal /phpMyAdmin/nginx_static_files;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header Upgrade;
}
location ~ ^/phpMyAdmin/nginx_static_files/ {
access_log /var/log/nginx/access_log_proxy;
alias /var/www/html/;
internal;
}
}
location ~ ^/phpmyadmin {
rewrite ^/* /phpMyAdmin last;
}
location ~ ^/pma {
rewrite ^/* /phpMyAdmin last;
}
webapps.ssl.conf
location ^~ /phpMyAdmin {
root /var/www/html/;
index index.php index.html index.htm;
location ~ ^/phpMyAdmin/ {
access_log off;
set $my_server_addr $server_addr;
if ($server_addr ~ ^[0-9a-fA-F:]+$) {
set $my_server_addr [$server_addr];
}
proxy_pass https://$my_server_addr:8081;
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header X-Accel-Internal /phpMyAdmin/nginx_static_files;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header Upgrade;
}
location ~ ^/phpMyAdmin/nginx_static_files/ {
access_log /var/log/nginx/access_log_proxy;
alias /var/www/html/;
internal;
}
}
location ~ ^/phpmyadmin {
rewrite ^/* /phpMyAdmin last;
}
location ~ ^/pma {
rewrite ^/* /phpMyAdmin last;
}

Thank you for any answer
CJ
 

Attachments

  • 2021-02-10_105936.jpg
    2021-02-10_105936.jpg
    555.8 KB · Views: 7
What is the 1 php version in options.conf
maybe it's old?
#PHP Settings
php1_release=7.4
I think it needs to be 7.2+ if my memory is right..

What is the PMA version selected in options.conf
maybe it's not 5
#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_ver=5

What is the OS and version?

Your file seems similar to mine
Did you try running ./build rewrite_conf
 
Back
Top