Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

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

5 Answers 5

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

127.0.0.1 www.mysite.com
share|improve this answer
    
Thank you! That worked perfectly. –  JasonLib Jan 20 '10 at 14:20

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.

share|improve this answer

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.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.