After moving my website files & database from Hetzner VQ virtual server to CX virtual server I am getting ‘502 bad gateway nginx error’ when trying to open www.1luxuryphones.com in a browser, and can see the following errors in /var/www/vhosts/system/1luxuryphones.com/logs/proxy_error_log
:
2018/04/08 15:20:43 [error] 4568#0: *2721 connect() failed (111: Connection refused) while connecting to upstream, client: 77.98.74.207, server: 1luxuryphones.com, request: "GET / HTTP/1.1", upstream: "http://172.31.1.100:7080/", host: "www.1luxuryphones.com", referrer: "http://www.1luxuryphones.com/"
My Hetzner VQ virtual server was running on Debian 6.0.7 with Plesk 11.0.9 and has a dedicated IP address 78.46.151.222, and everything was working fine.
My CX server is running on Debian 9.4 with Plesk Onyx 17.8.11, and has a private ip address 172.31.1.100 which is configured 1:1 via NAT on public IP 88.99.186.220, and now I cannot access my website anymore.
In Plesk panel > Tools & Settings > IP addresses I have configured IP 172.31.1.100 so it has external IP 88.99.186.220.
However based on the proxy_error_log above it seems there is nothing listening on 172.31.1.100:7080, so the nginx cannot successfully forward the traffic.
Would someone know what could be done to fix this problem?
Many thanks