1

This is a rather hard question to ask as I am not sure what is is called. Basically I own a license for a product, which is licensed to one of my domains (eg. www.mysite.com). The problem is I need to test things locally before I make changes on my public website but I can't install it on my localhost because its Zend encrypted and only works on one domain name. I basically want my localhost server to believe that "www.mysite.com" is located on my localhost instead of trying to connect to it on the internet. Is this possible? I know it was with Windows, but I can't seem to find how to do this with Linux.

Thanks!

migrated from stackoverflow.com Jan 21 '10 at 9:45

This question came from our site for professional and enthusiast programmers.

  • Theyh don't offer a development license you can install? That would be very strange. – T.J. Crowder Jan 20 '10 at 12:51
6

You could put a line in your /etc/hosts like this:

127.0.0.1 www.mysite.com
2

If you are using Apache, you want to make a VirtualHost called "www.mysite.com" and then add "www.mysite.com" to /etc/hosts such as

127.0.0.1 localhost www.mysite.com

Then hit http://www.mysite.com in your browser and the virual host should handle the request locally. See this Apache documentation for more details.

1

If I understand correctly, all you have to do is to edit /etc/hosts. You should add that line:

127.0.0.1 mysite.com www.mysite.com

Then www.mysite.com will be resolved to 127.0.0.1 which is your machine.

0

not sure about linux but try updating your hosts file to add 127.0.0.1 to point to Your.Public.Domain.You.Want.ToSpoof

0

You could temporarily override the domain name in your /etc/hosts file on your linux box. If you assign the domain for the www.mysite.com to be your localhost IP, it would reroute all traffic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy