SquirelMail/phpMyAdmin ERROR 502 - Bad Gateway!

Discussion in 'General' started by Mitzy, Mar 25, 2012.

  1. Mitzy

    Mitzy New Member

    Hello,

    I've been reluctant to post about this, basically I can't access SquirelMail and phpMyAdmin at all despite both being installed and apparently working. ie I can create databases from the control panel and I'm singing along using imap.

    I have added the needful in the options page for my website.

    Any ideas?
     
  2. itsnedkeren

    itsnedkeren New Member

    Code:
    /etc/init.d/php5-fpm restart
     
  3. Mitzy

    Mitzy New Member

    I had but I did it again :)

    Same result, 502.

    This is what the error log shows.

    Code:
    2012/03/25 19:44:08 [error] 32451#0: *93 connect() failed (111: Connection refused) while connecting to upstream, client: 82.5.163.135, server: the-sps.org, request: "GET /squirrelmail/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "the-sps.org"
     
  4. itsnedkeren

    itsnedkeren New Member

    How about the wrapper?

    Code:
    /etc/init.d/fcgiwrap restart
     
  5. Mitzy

    Mitzy New Member

    Thanks again, unfortunately that didn't work either, same result 502.
     
  6. itsnedkeren

    itsnedkeren New Member

    More info then please!

    What did you add in the options tab?

    Can you access phpmyadmin from the apps site?

    Code:
    http://server1.domain.com:8081/phpmyadmin
     
  7. Mitzy

    Mitzy New Member

    Can't access the apps site either.

    I added the following in the options.

    Code:
            location /squirrelmail {
                   root /usr/share/;
                   index index.php index.html index.htm;
                   location ~ ^/squirrelmail/(.+\.php)$ {
                           try_files $uri =404;
                           root /usr/share/;
                           fastcgi_pass 127.0.0.1:9000;
                           fastcgi_index index.php;
                           fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                           include /etc/nginx/fastcgi_params;
                           fastcgi_buffer_size 128k;
                           fastcgi_buffers 256 4k;
                           fastcgi_busy_buffers_size 256k;
                           fastcgi_temp_file_write_size 256k;
                           fastcgi_intercept_errors on;
                   }
                   location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                           root /usr/share/;
                   }
            }
            location /webmail {
                   rewrite ^/* /squirrelmail last;
            }
     
  8. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    netstat -tapn
    ?
     
  9. Mitzy

    Mitzy New Member

    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address * * * * * Foreign Address * * * * State * * * PID/Program name
    tcp * * * *0 * * *0 127.0.0.1:10024 * * * * 0.0.0.0:* * * * * * * * LISTEN * * *2179/amavisd (maste
    tcp * * * *0 * * *0 127.0.0.1:10025 * * * * 0.0.0.0:* * * * * * * * LISTEN * * *7340/master * **
    tcp * * * *0 * * *0 0.0.0.0:3306 * * * * * *0.0.0.0:* * * * * * * * LISTEN * * *1985/mysqld * **
    tcp * * * *0 * * *0 0.0.0.0:8080 * * * * * *0.0.0.0:* * * * * * * * LISTEN * * *3749/nginx * * *
    tcp * * * *0 * * *0 0.0.0.0:80 * * * * * * *0.0.0.0:* * * * * * * * LISTEN * * *3749/nginx * * *
    tcp * * * *0 * * *0 0.0.0.0:8081 * * * * * *0.0.0.0:* * * * * * * * LISTEN * * *3749/nginx * * *
    tcp * * * *0 * * *0 0.0.0.0:21 * * * * * * *0.0.0.0:* * * * * * * * LISTEN * * *3224/pure-ftpd (SER
    tcp * * * *0 * * *0 178.79.182.17:53 * * * *0.0.0.0:* * * * * * * * LISTEN * * *2010/named * * *
    tcp * * * *0 * * *0 127.0.0.1:53 * * * * * *0.0.0.0:* * * * * * * * LISTEN * * *2010/named * * *
    tcp * * * *0 * * *0 0.0.0.0:22 * * * * * * *0.0.0.0:* * * * * * * * LISTEN * * *2096/sshd * * **
    tcp * * * *0 * * *0 0.0.0.0:25 * * * * * * *0.0.0.0:* * * * * * * * LISTEN * * *7340/master * **
    tcp * * * *0 * * *0 127.0.0.1:953 * * * * * 0.0.0.0:* * * * * * * * LISTEN * * *2010/named * * *
    tcp * * * *0 * *196 178.79.182.17:22 * * * *31.83.60.98:49272 * * * ESTABLISHED 15314/0 * * * **
    tcp * * * *0 * * *0 178.79.182.17:80 * * * *94.23.225.68:53757 * * *TIME_WAIT * - * * * * * * *
    tcp * * * *0 * * *0 127.0.0.1:34429 * * * * 127.0.0.1:3306 * * * * *ESTABLISHED 28414/amavisd (ch8-
    tcp * * * *0 * * *0 178.79.182.17:80 * * * *94.23.225.68:53785 * * *TIME_WAIT * - * * * * * * *
    tcp * * * *0 * * *0 127.0.0.1:3306 * * * * *127.0.0.1:34429 * * * * ESTABLISHED 1985/mysqld * **
    tcp * * * *0 * * *0 178.79.182.17:80 * * * *66.249.66.129:41303 * * ESTABLISHED 3750/nginx: worker*
    tcp * * * *0 * * *0 127.0.0.1:3306 * * * * *127.0.0.1:34296 * * * * ESTABLISHED 1985/mysqld * **
    tcp * * * *0 * * *0 178.79.182.17:80 * * * *86.50.78.111:64985 * * *TIME_WAIT * - * * * * * * *
    tcp * * * *0 * * *0 178.79.182.17:80 * * * *86.50.78.111:64999 * * *TIME_WAIT * - * * * * * * *
    tcp * * * *0 * * *0 127.0.0.1:34296 * * * * 127.0.0.1:3306 * * * * *ESTABLISHED 28137/amavisd (ch9-
    tcp6 * * * 0 * * *0 :::993 * * * * * * * * *:::* * * * * * * * * * *LISTEN * * *6793/couriertcpd
    tcp6 * * * 0 * * *0 :::995 * * * * * * * * *:::* * * * * * * * * * *LISTEN * * *6830/couriertcpd
    tcp6 * * * 0 * * *0 :::110 * * * * * * * * *:::* * * * * * * * * * *LISTEN * * *2718/couriertcpd
    tcp6 * * * 0 * * *0 :::143 * * * * * * * * *:::* * * * * * * * * * *LISTEN * * *2684/couriertcpd
    tcp6 * * * 0 * * *0 :::21 * * * * * * * * * :::* * * * * * * * * * *LISTEN * * *3224/pure-ftpd (SER
    tcp6 * * * 0 * * *0 :::53 * * * * * * * * * :::* * * * * * * * * * *LISTEN * * *2010/named * * *
    tcp6 * * * 0 * * *0 :::22 * * * * * * * * * :::* * * * * * * * * * *LISTEN * * *2096/sshd * * **
    tcp6 * * * 0 * * *0 ::1:953 * * * * * * * * :::* * * * * * * * * * *LISTEN * * *2010/named * * *
    tcp6 * * * 0 * * *0 178.79.182.17:993 * * * 31.83.60.98:49266 * * * ESTABLISHED 15310/couriertls
    tcp6 * * * 0 * * *0 178.79.182.17:993 * * * 31.83.60.98:49267 * * * ESTABLISHED 15311/couriertls
     
  10. falko

    falko Super Moderator ISPConfig Developer

    PHP-FPM isn't running (at least it's not listening on port 9000). Please restart it.
     
  11. Mitzy

    Mitzy New Member

    Restarted, when I try to access webmail using the link within ispconfig I get a 404.
     
  12. Mitzy

    Mitzy New Member

    This is the error I'm getting

    Code:
    2012/03/27 17:51:13 [error] 25674#0: *22924 open() "/usr/local/ispconfig/interface/web/webmail" failed (2: No such file or directory), client: 82.5.163.135, server: _, request: "GET /webmail HTTP/1.1", host: "the-sps.org:8080", referrer: "https://the-sps.org:8080/"
    
    The folder it's referencing doesn't exist, at which stage should that have been created in the install process?

    /usr/local/ispconfig/interface/web/webmail
     
  13. falko

    falko Super Moderator ISPConfig Developer

    Webmail is located under http://<your-server>:8081/webmail
     
  14. Mitzy

    Mitzy New Member

    Going to that yields a 502 error for me.
     
  15. falko

    falko Super Moderator ISPConfig Developer

    Can you post the output of
    Code:
    netstat -tapn
    again? Looks as if PHP-FPM is still not running, and then you have to find out why (logs, etc.).
     

Share This Page