- Plesk 12.5 for Linux
- Plesk Onyx for Linux
- Plesk 12.0 for Linux
- nginx as a proxy is enabled for a server.
Websites are periodically down with the following error from nginx:
502 Bad Gateway
The following errors can be found in
CONFIG_TEXT: [error] 10485#0: *1947668 connect() failed (111: Connection refused) while connecting to upstream, client: 203.0.113.2, server: , request: "GET / HTTP/1.1", upstream: "http://192.0.2.2:7080/", host: "example.com"
Where 192.0.2.2 is server's IP address.
Fail2Ban blocks server's IP addresses.
- In Plesk > Tools & Settings > IP Addresses click Re-read IP button.
- Add all server IP addresses to Trusted IP Addresses list in Fail2ban configuration under Tools & Settings > IP Address Banning (Fail2Ban).
- If the issue persits, connect to the server using SSH and restart 'iptables' service:
# service iptables restart