N
N
Nikolay2018-02-02 10:59:27
Domain Name System
Nikolay, 2018-02-02 10:59:27

How to place the developer's copy of the site on the second server?

Good day everyone!
Recently I ran into an unexpected problem, which for some reason did not manifest itself in any way before.
For example, on one hosting there is a site www.site.ru (works via SSL)
I deploy its full copy on another hosting and the same domain, I copy the SSL certificate from the combat server.
I register the ip of the development server in my hosts and everything is ok, more precisely, everything was ok before.
Problem 1.
I gave access to the developer server to a developer who works on Win10.
He edits the hosts, enters the site, when he first loads, he opens the site from the development server, and when he refreshes the page or follows an internal link, the site opens from the combat server.
Moreover, if you close the browser and try to go to the address again, the combat server immediately opens.
It seems that at the first boot, ip is read from hosts, and then a DNS request is already made, which says that the IP of the current server does not appear in the records for the domain and sends a request to the IP of the combat server, which is specified in DNS.
Of the security software, there is only the standard Defender, which they tried to disable - it did not help.
I do not have a problem on Win7 and another developer on Win8.
Problem 2.
The site works with Google maps.
Previously, again, everything was ok on the developer server, but now the maps are not loaded.
API key issued for the domain, the domain is the same, but the maps are not loaded, in the browser console there are bunches of errors "Failed to load resource: the server responded with a status of 403 ()".
There is an idea that you need to register the IP of the development server in the zones of the main provider, but this is inaccurate.
To put it mildly, I don’t understand DNS records, so I don’t understand whether this can be done, if so, what type of record to choose and make it so that random users do not go to the development server, but only those who have changed registered ip in hosts.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2018-02-02
@HeadOnFire

Well, since humanly doing dev / staging / production is not an option, then the following options come to mind:
1. If the sites are on different servers, put a load balancer in front of them. Send all traffic to production, and developers by IP - to a copy. The SSL certificate will need to be transferred to the balancer, of course.
2. If the sites are physically on the same server - configure Nginx / Apache or whatever you have for different IPs, look in a different document root. Send everyone to the sales folder, and your IP - to the clone.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question