Page 1 of 1

Apache on port 8081, nginx connecting to 8080

Posted: Fri Aug 14, 2020 11:32 am
Hi,

This morning, all my websites are down.

On my server, i have run

Code: Select all

netstat -tulpn
And I can see a single entry for apache, suggesting its listening on port 8081:

Code: Select all

tcp        0      0 127.0.0.1:8081          0.0.0.0:*               LISTEN      8752/apache2
In my web log / errorlog, i can see many errors like:

Code: Select all

connect() failed (111: Connection refused) while connecting to upstream, client: XXXXXXXXXXX, server: XXXXXXXXXXX, request: "GET / HTTP/1.1", upstream: "XXXXXXXXXXX:8080/", host: "XXXXXXXXXXX"
(private data replaced with XXXXXXXXXXX)

Where it looks like nginx is connecting to Apache on port 8080, where it is not listening.

How can I make apache listen on port 8080, or niginx connect to apache on port 8081??

Many thanks!

Re: Apache on port 8081, nginx connecting to 8080

Posted: Fri Aug 14, 2020 2:46 pm
by grayfolk
[email protected] wrote:
Fri Aug 14, 2020 11:32 am
Hi,

This morning, all my websites are down.

On my server, i have run

Code: Select all

netstat -tulpn
And I can see a single entry for apache, suggesting its listening on port 8081:

Code: Select all

tcp        0      0 127.0.0.1:8081          0.0.0.0:*               LISTEN      8752/apache2
In my web log / errorlog, i can see many errors like:

Code: Select all

connect() failed (111: Connection refused) while connecting to upstream, client: XXXXXXXXXXX, server: XXXXXXXXXXX, request: "GET / HTTP/1.1", upstream: "XXXXXXXXXXX:8080/", host: "XXXXXXXXXXX"
(private data replaced with XXXXXXXXXXX)

Where it looks like nginx is connecting to Apache on port 8080, where it is not listening.

How can I make apache listen on port 8080, or niginx connect to apache on port 8081??

Many thanks!
Try to rebuild web.

Re: Apache on port 8081, nginx connecting to 8080

Posted: Fri Aug 14, 2020 5:02 pm
Hi,

Thanks for the help!

I ran

Code: Select all

for user in $(v-list-sys-users plain); do v-rebuild-web-domains $user; done
and it seemed to complete OK, but it looks like apache is still listening on 8081, and nginx is trying to connect to 8080

Re: Apache on port 8081, nginx connecting to 8080

Posted: Fri Aug 14, 2020 5:07 pm
Further, I can see that HTTPS requests should be forwarded to apache at port 8443, but it is not listening there either...

Also, my /etc/apache2/ports.conf file is empty (except "# Powered by vesta"). Should there be something here?

Re: Apache on port 8081, nginx connecting to 8080

Posted: Fri Aug 14, 2020 6:35 pm
by grayfolk
[email protected] wrote:
Fri Aug 14, 2020 5:07 pm
Further, I can see that HTTPS requests should be forwarded to apache at port 8443, but it is not listening there either...

Also, my /etc/apache2/ports.conf file is empty (except "# Powered by vesta"). Should there be something here?
See ~/conf/web

Re: Apache on port 8081, nginx connecting to 8080

Posted: Sun Aug 16, 2020 12:50 am
Looking in ~/conf/web I can see .conf files with entries like:

Code: Select all

<VirtualHost XX.XX.XX.XX:8080>
And yet apache is not listening on 8080. Do you have any idea how i find out why?

Thanks,
Justin

Re: Apache on port 8081, nginx connecting to 8080

Posted: Mon Nov 01, 2021 11:57 pm
by cameronmotes
I'm having this exact same issue. Was there a found resolution?