phpmyadmin 502: connection refused

Discussion in 'HOWTO-Related Questions' started by traezi, Mar 12, 2025.

  1. traezi

    traezi New Member

    Hey everyone,

    so i'm actually on my way to get ispconfig running and moving everything to it from my old CLI based system. So actually i want to import some tiny databases and tried to access phpmyadmin - but unfortunately i'm getting a 502 bad gateway.

    So i've checked the nginx logs and saw: (connecting ip and domain reducted)
    Code:
    2025/03/12 11:16:07 [error] 72178#72178: *400 connect() failed (111: Connection refused) while connecting to upstream, client: 123.123.123.123, server: _, request: "GET /phpmyadmin/ HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "srv1.mydomain.net:8081"
    
    So i've checked the apps.vhost and saw, that phpmyadmin uses the
    Code:
    fastcgi_pass 127.0.0.1:9000;
    and not the
    Code:
    fastcgi_pass unix:/var/lib/php8.2-fpm/apps.sock;
    I was able to fix phpmyadmin with changing it to the apps.sock but i'm not sure, if there is any automatism which will change it back in the future?

    Best regards
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which OS do you use and how did you install ISPConfig and PHPMyAdmin on it?
     
  3. traezi

    traezi New Member

    I'm using Debian 12 and i used the following command line to install ISPconfig:
    Code:
    wget -O - https://CANT-POST-URLS-YET | sh -s -- --no-mail --no-dns --use-nginx --use-php=8.2,8.3 --use-ftp-ports=40110-40210 --unattended-upgrades
    //Edit
    I didnt installed phpmyadmin in any manual way - it's just there ^^ And with the change of the socket it works.
     
    Last edited: Mar 12, 2025
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, this looks fine so far. The issue might be related to the selection of PHP versions; I'll see if I can reproduce that. On my Debian 12 Nginx system, which used default settings that I installed 3 days ago, phpmyadmin works flawlessly. And there has been neither an ISPconfig nor auto installer update since then.
     
    ahrasis and traezi like this.
  5. FSNTiger

    FSNTiger Member

    I hate to reopen an old thread, but I am having exactly the same issue. Brand new install of both debian 12 and debian 13. Command used:


    wget -O - https://get.ispconfig.org | sh -s -- --use-nginx --use-ftp-ports=40110-40210 --use-php=8.2,8.3,8.4 --no-dns --ssh-permit-root=no --ssh-harden --unattended-upgrades

    PHPMyAdmin is not accessible. Inside the apps config the socket is correct, but commented out. Port is uncommented. Gateway Error 502.

    Doing this allows it to work but not ideal:
    cp /usr/local/ispconfig/server/conf/nginx_apps.vhost.master /usr/local/ispconfig/server/conf-custom/nginx_apps.vhost.master
    nano /usr/local/ispconfig/server/conf-custom/nginx_apps.vhost.master

    remove {socket} {tcp} vars and comment out TCP line in two spots. Change port in dashboard for apps, change back. All works well. Tried to reinstall server twice with no luck.
     
    Last edited: Feb 7, 2026 at 3:30 AM
    till likes this.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem is already listed in the issue tracker.
     

Share This Page