FastCGI failed to connect to server

Discussion in 'General' started by dokov, Jan 20, 2014.

  1. dokov

    dokov New Member

    Hello.

    I am having a really weird errors on half of my vhostsubdomains.
    I get 500 Internal Server Error when try to access the subdomain.

    The error log says:

    Code:
    [Mon Jan 20 16:32:21 2014] [error] [client 79.100.52.26] (111)Connection refused: FastCGI: failed to connect to server "/var/www/clients/client1/web1/cgi-bin/php5-fcgi-*-80-subdomain.domain.com": connect() failed
    [Mon Jan 20 16:32:21 2014] [error] [client 79.100.52.26] FastCGI: incomplete headers (0 bytes) received from server "/var/www/clients/client1/web1/cgi-bin/php5-fcgi-*-80-subdomain.domain.com"
    [Mon Jan 20 16:32:21 2014] [error] [client 79.100.52.26] (111)Connection refused: FastCGI: failed to connect to server "/var/www/clients/client1/web1/cgi-bin/php5-fcgi-*-80-subdomain.domain.com": connect() failed
    [Mon Jan 20 16:32:21 2014] [error] [client 79.100.52.26] FastCGI: incomplete headers (0 bytes) received from server "/var/www/clients/client1/web1/cgi-bin/php5-fcgi-*-80-subdomain.domain.com"
    The most weird part of the error is that the subdomains are set to use PHP-FPM, not FastCGI.

    I partially solve the problem by changing the PHP to something else (SuPHP/ModPHP), waits for apache to change the settings and switch back to PHP-FPM.

    However the problem occurs again and again. I don't know what makes the change from PHP-FPM to FastCGI, but it's certainly not me.

    I would appreciate any help!
    Thanks in advance.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    is the website root of the vhostsubdomain inside the "web" directory of the main domain? Are there any applications installed with the aps installer in this website?
     
  3. dokov

    dokov New Member

    The vhostsubdomain root folder is located in:

    Code:
    /var/www/clients/client1/web1/subdomains/subdomain
    The main domain web folder is in:
    Code:
    /var/www/clients/client1/web1/web
    Code:
    /var/www/clients/client1/web1$ ls -l
    total 40
    drwxr-xr-x  2 web1 client1  4096 Aug 16 18:08 cgi-bin
    drwxr-xr-x 39 root root     4096 Jan 20 17:14 log
    drwxr-x---  2 web1 client1  4096 Aug 16 18:08 private
    drwxr-xr-x  2 root root     4096 Aug 16 18:08 ssl
    drwxr-xr-x 32 root git      4096 Jan 20 16:20 subdomains
    drwxrwxrwx  2 web1 client1 12288 Jan 20 19:33 tmp
    drwxr-x--- 14 web1 client1  4096 Jan 15 10:11 web
    drwxr-x---  2 web1 client1  4096 Aug 16 18:08 webdav
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. And wht about the aps installer?
     
  5. dokov

    dokov New Member

    I haven't use the installer at all.
     
  6. dokov

    dokov New Member

    Bump. Still need help, thanks!
     
  7. tanius

    tanius New Member

    Try restarting PHP-FPM

    The log messages do not necessarily indicate that something switched your config back to FastCGI. Because for Apache, a PHP-FPM configuration just looks like a FastCGI handler configuration plus using the directive
    Code:
    FastCgiExternalServer
    to deviate the traffic to the PHP-FPM server. Log messages will still come from the Apache FastCGI handler!

    One hint that might fix the issue: Try restarting PHP-FPM with
    Code:
    service php-fpm restart
    . I found that, when switching to PHP-FPM, ISPConfig omits to do that, at least in the somewhat outdated version that I am still running. Before doing it myself, I had the same error messages as you. Afterwards, it worked.
     
    Ark74 and linus like this.
  8. Ark74

    Ark74 Member

    Thanks, that worked out :)
     

Share This Page