-1

I am migrating a set of live, production PHP websites to a new Server and am testing the migrated sites from my laptop by editing the hosts file so that for selected domains, all browsers use the new server's IP address instead of the one they would find using DNS.

But I have a problem: some sites use CURL to get data from other sites on the same server (sometimes these are subdomains, sometimes they aren't). What happens is that the CURL call is to the version of the other site on the current server and not the new one.

I was wondering if there is a setting on my new server that would work like a Windows/MacOS hosts file.

Annabel
  • 103
  • 1

1 Answers1

2

I was wondering if there is a setting on my new server that would work like a Windows/MacOS hosts file.

Yes, that would be the /etc/hosts file.

user9517
  • 115,471
  • 20
  • 215
  • 297