Applicable to:
- Plesk for Linux
Symptoms
-
Opening a website/webmail results in the following error:
CONFIG_TEXT: ERR_CONNECTION_REFUSED
-
Proxy mode is enabled under Plesk > Domains > example.com > Apache & Nginx Settings.
-
In Plesk > Domains > example.com > Logs or in
/var/www/vhosts/example.com/logs/proxy_error_log
the following record can be found:CONFIG_TEXT: [error] 31160#0: *35 connect() failed (111: Connection refused) while connecting to upstream, client: 203.0.113.2, server: example.com, request: "GET /dev/ HTTP/1.1", upstream:
-
There are no processes listening on 80 or 443 port:
# netstat -tunlp | grep -E ":80|:443"
Cause
Nginx service is not running.
Resolution
Note: To apply further instructions, it is required to have administrative access to Plesk. If you don't have Tools & Settings (Server settings) menu, please contact your server's administrator or hosting company support that can manage your server.
Start nginx service under Plesk > Tools & Settings > Services Management > Reverse Proxy Server (nginx):
Note: in case nginx is missing, install it according to the article.
-
Connect to the server via SSH.
-
Run the following command:
# service nginx restart
Comments
4 comments
In my case, the nginx appears to be on.
I restart nginx = nothing.
I restart apache = nothing.
I reboot server, all websites are back on.
Please help, as I have no clue.
Hello @Andre,
As I can see, you have already submitted a ticket to us.
That is the best option for this case as deeper investigation is required.
Hi @Alexandr,
Thanks so much for this.
It seems that Nginx was disabled 'automatically' - ie: my server and sites were running fine, and then all of a sudden overnight, this issue occured. It was resolved by following your solution.
Is there any reason that this issue could happen 'automatically' - ie: with no config changes done by me?
Thanks
Hi @absolutepast,
There is no way nginx can be stopped automatically without any failures. I would recommend checking journalctl logs for nginx and /var/log/nginx/error.log file for some error messages and configure automatic restart of ngixn on failure on a systemd level: https://www.freedesktop.org/software/systemd/man/systemd.service.html
Please sign in to leave a comment.