Jump to content

can i make a virtual machine the localhost on my computer


ajoo

Recommended Posts

Hi all,

 

I have a linux VM on my Windows computer and I use that for testing. I also have a xampp installed on my Windows machine and that is the default local host for the windows machine. 

 

So is it possible for me to make the VM act as a localhost for the windows machine as well? If so,  how? I hope that my question is clear.

 

I need to do this since I it's difficult to debug my flash files as the rest of the project is on the VM. I don't want to take move all the stuff back into the windows machine just to test the flash files there. 

 

Thanks all !

 

 

Link to comment
Share on other sites

To follow up on Kickens suggestion, here are instructions for how to find the Windows hosts file. It's just a text file so notepad or any other text editor will do.

 

I don't know what virtualization tech you are using, but they all have ways of sharing folders. This is the typical way that people develop. All your source is in a shared folder, so you can edit and see the results reflected by the serving of content from the VM.

 

The hosts file is a nice way to do that, but if you do follow that I would suggest you use a domain.tld. This is due to the issues that can occur with cookies when you don't use a "normal" domain name.

 

The special reserved tld's in RFC2606 are: .test, .example, .invalid and .localhost. I will use something like:

 

192.168.168.4  www.someproject.test
Link to comment
Share on other sites

Hi, Thanks Kicken & Gizmola,

 

Thanks for the reply and suggestions.  I am. in fact, already doing as suggested by you both. 

 

The problem lies with flash files that (i think) can be run only in the windows environment.To test locally on flash therefore I needed to work in windows and so needed the localhost on windows. 

 

In any case, I have eventually ported portions of the code in windows and am able to test locally now using localhost. 

 

Thanks very much !

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.