Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

111: connection refused while connecting to upstream [Solved]

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
vanderheyde
Posts: 35
Joined: Fri Dec 08, 2017 3:48 pm

Os: Debian 7x
Web: apache + nginx
111: connection refused while connecting to upstream [Solved]
  • Quote

Post by vanderheyde » Fri Dec 08, 2017 4:02 pm

Hi,

when browsing to any client domain (vestacp interface works fine), i receive a 500 internal server error.

From /var/log/apache/domain/xxx.error.log, i get this:

Code: Select all

2017/12/08 16:44:04 [error] 1651#1651: *38 connect() failed (111: Connection refused) while connecting to upstream, c lient: xx.xx.xx.xx, server: xxx.com, request: "GET / HTTP/1.1", upstream: "http://yy.yy.yy.yy:8080/", host: "xxx.com", referrer: "http://xxx.com/"
nginx does not return any errors, neither does php5-fpm.

I'm at a loss. I can't find any other error to troubleshoot this issue, and I'm unsure of what to make of the one I have.

Any and all help would be appreciated :)

/home/xxx/conf/web/apache2.conf below:

Code: Select all

<VirtualHost yy.yy.yy.yy:8080>

    ServerName xxx.com
    ServerAlias www.xxx.com
    ServerAdmin [email protected]
    DocumentRoot /home/xxx/web/xxx.com/public_html
    ScriptAlias /cgi-bin/ /home/xxx/web/xxx.com/cgi-bin/
    Alias /vstats/ /home/xxx/web/xxx.com/stats/
    Alias /error/ /home/xxx/web/xxx.com/document_errors/
    #SuexecUserGroup xxx xxx
    CustomLog /var/log/apache2/domains/xxx.com.bytes bytes
    CustomLog /var/log/apache2/domains/xxx.com.log combined
    ErrorLog /var/log/apache2/domains/xxx.com.error.log
    <Directory /home/xxx/web/xxx.com/public_html>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        php_admin_value open_basedir /home/xxx/web/xxx.com/public_html:/home/xxx/tmp
        php_admin_value upload_tmp_dir /home/xxx/tmp
        php_admin_value session.save_path /home/xxx/tmp
    </Directory>
    <Directory /home/xxx/web/xxx.com/stats>
        AllowOverride All
    </Directory>

    <IfModule mod_ruid2.c>
        RMode config
        RUidGid xxx xxx
        RGroups www-data
    </IfModule>
    <IfModule itk.c>
        AssignUserID xxx xxx
    </IfModule>

    IncludeOptional /home/xxxx/conf/web/apache2.xxx.com.conf*

</VirtualHost>
/home/xxx/conf/web/nginx.conf:

Code: Select all

server {
    listen      yy.yy.yy.yy:80;
    server_name xxx.com www.xxx.com;
    error_log  /var/log/apache2/domains/xxx.com.error.log error;

    location / {
        proxy_pass      http://yy.yy.yy.yy:8080;
        location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|odt|ods|odp|odf|tar|wav|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
            root           /home/xxx/web/xxx.com/public_html;
            access_log     /var/log/apache2/domains/xxx.com.log combined;
            access_log     /var/log/apache2/domains/xxx.com.bytes bytes;
            expires        max;
            try_files      $uri @fallback;
        }
    }

    location /error/ {
        alias   /home/xxx/web/xxx.com/document_errors/;
    }

    location @fallback {
        proxy_pass      http://yy.yy.yy.yy:8080;
    }

    location ~ /\.ht    {return 404;}
    location ~ /\.svn/  {return 404;}
    location ~ /\.git/  {return 404;}
    location ~ /\.hg/   {return 404;}
    location ~ /\.bzr/  {return 404;}

    include /home/xxx/conf/web/nginx.xxx.com.conf*;
}
Thanks,
vanderheyde
Last edited by vanderheyde on Sat Dec 09, 2017 12:22 am, edited 1 time in total.
Top

vanderheyde
Posts: 35
Joined: Fri Dec 08, 2017 3:48 pm

Os: Debian 7x
Web: apache + nginx
Re: 111: connection refused while connecting to upstream
  • Quote

Post by vanderheyde » Sat Dec 09, 2017 12:22 am

Found the issue:

/etc/apache2/conf.d/yy.yy.yy.yy.conf did not contain "listen yy.yy.yy.yy:8080"
Top

makozazi
Posts: 1
Joined: Tue Sep 29, 2020 12:40 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: 111: connection refused while connecting to upstream [Solved]
  • Quote

Post by makozazi » Tue Sep 29, 2020 12:43 pm

Hi,
i have similar issue, I am getting error 500 when i try open any website on my server.
Below is error message from my error log, what can be wrong???

connect() failed (111: Connection refused) while connecting to upstream
Top

thewrongadmin
Posts: 1
Joined: Wed Sep 30, 2020 6:46 am

Os: Ubuntu 15x
Web: apache + nginx
Re: 111: connection refused while connecting to upstream [Solved]
  • Quote

Post by thewrongadmin » Wed Sep 30, 2020 8:12 am

Also having the same problem, updated the server at some point then restarted later on and all local websites are doing this.
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password