Welcome! Log In Create A New Profile


Nginx domain resolution 502 gateway

September 25, 2019 06:06AM
I have developed a website for a customer, it's currently sitting on a sub-domain on our server and is finished but i now need to carry out testing for eCommerce payments and that means the site needs to move from our sub-domain over to their live domain.

For this, i've created a cPanel account with that domain but because it's live elsewhere, the best way for me to complete the migration before any DNS records are changed on the 3rd party hosting is to be able to access the site on my machine, i edited my local host files (windows) for that reason

Before NGINX was installed on the CentOS server, modifying the local host file would work perfectly and i could access the site only on my machine to finish up the migration, then when finished i'll ask the 3rd party host to change NS to our us, meaning no downtime to their site and a nice migration.

At the moment, even though the host file is changed and a local cmd ping brings up our server, i get a 502 gateway error nginx in the browser, checking nginx error logs i believe it's because nginx server is trying to resolve the 3rd party real host IP address but my machine is set to resolve the server ip version.

Does that make sense? All other sites on the server are working fine through Apache + Nginx but i'm stuck with this problem.

I could simply ask the 3rd party hosting company to change the A record to point to our server but it would mean the client would face some downtime while i finished up the migration.

Any help is appreciated.
Subject Author Posted

Nginx domain resolution 502 gateway

medievil19 September 25, 2019 06:06AM

Re: Nginx domain resolution 502 gateway

Francis Daly September 29, 2019 04:42AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 82
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready