Reach localhost 127.0.0.1 Aptana Studio preview from Guest?

Discussions about using Windows guests in VirtualBox.
Post Reply
OraOra
Posts: 81
Joined: 20. Jul 2014, 22:16
Primary OS: Other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: .

Reach localhost 127.0.0.1 Aptana Studio preview from Guest?

Post by OraOra »

Using Aptana Studio on Windows 7 host and trying to preview the code for sites in various IE VMs in IE on the Guest.

Aptana Studio sends the preview to http://127.0.0.1:8020/NAME_OF_PROJECT and this can be opened in all browsers on the host just fine for real life testing.

How can I make the Guest find this localhost address (127.0.0.1) or better how can I "trick" the Guest into believing that the actual host's localhost address is actually its own instead of, what naturally is the case, 127.0.0.1 being the localhost of the Guest or any OS really.

So basically I somehow need to send 127.0.0.1 to the guest or tell the guest that 127.0.0.1 is to be found on the host instead of on the guest.

I found this is Aptana Studio preferences but I would not exactly know how to tell it to send the preview to the Guest.

Image

Could I add the IP of the Guest in the Proxy bypass section perhaps?

Would that be the ip of the Guest's network adapter obtainable through ipconfig on the Guest?

Any ideas if this could work?

Much appreciated, trying to set all this up for testing code in, well yes you got that right, various versions of IE.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Reach localhost 127.0.0.1 Aptana Studio preview from Gue

Post by Perryg »

Have you tried entering the hosts IP address in the guest browser?

Note: not the local loopback.
OraOra
Posts: 81
Joined: 20. Jul 2014, 22:16
Primary OS: Other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: .

Re: Reach localhost 127.0.0.1 Aptana Studio preview from Gue

Post by OraOra »

"Internet Explorer cannot display the webpage" is what I get when entering the IP address the host has to the outside net as well as on the local network, the one starting with 192.168...

Though I am using a VPN and have also tried entering the IP of the TAP Adapter what results in giving me search results via Bing of this TAP Adapter's IP address.

All this means turning off the VPN, turning off the outside net and tweaking the software firewall till I guess shares between the guest and host are working fine, since I assume when shares (not shared folders from VirtualBox but Windows shared folders) are working the browser should also be able to check the hosts IP address, 192.168.., given I have allowed incoming connections from the guest on the port Aptana Studio uses.

Then I can start with turning on the outside net for the host and tweak the wall more, make sure shares and a local network are working and if all this is fine I guess I can start using the VPN and of course more tweaking the wall while constantly keeping an eye on the network between guest and host.

I wonder if other people just upload the development code to the client's chosen web host and protect the site in development with a user and pass and access it from outside or if they really go through all the tuning and tweaking to enable access to the hosts IP.

Also when firing up the IE VM there were at least a good dozen IPs virtualbox.exe "needed" to contact, either MS or Akamai or some telecom company, to actually open the browser and start working correctly. Closing those connections resulted in the VM being aborted. Guess MS is making sure people are not using the VM longer than the trial period and also check that the default registration info can be controlled by MS. I can understand that though what is the point when you can just revert back to an older snapshot and renew the trial period?? MS even writes about this on the VM help pdf linked in above post..

Any ways, happy to get going at this, bit of networking should be fine and definitely prefer doing this local rather than FTP the code up to the webhost and then check through and outside connection.

Any suggestions to helpful topics about this?

Should I rather try going through the Aptana Studio prefs with the Proxy bypass and point that to the guest IP or try with making the guest find the hosts outside IP or in this case the internal one on the network given by the router, 192.168...?

Here we go...
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Reach localhost 127.0.0.1 Aptana Studio preview from Gue

Post by BillG »

127.0.0.1 is an IPv4 loopback address. It simply means "this machine" so it will use the browser on the host.

I doubt that any of the options you list will do you any good. Using the IP address of the vm should work, but that assumes that this address is reachable and that will depend on how you have configured your network. If the guest has a host only connection to the host it should work no matter what else you have configured.
Bill
OraOra
Posts: 81
Joined: 20. Jul 2014, 22:16
Primary OS: Other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: .

Re: Reach localhost 127.0.0.1 Aptana Studio preview from Gue

Post by OraOra »

BillG wrote:127.0.0.1 is an IPv4 loopback address. It simply means "this machine" so it will use the browser on the host.

I doubt that any of the options you list will do you any good. Using the IP address of the vm should work, but that assumes that this address is reachable and that will depend on how you have configured your network. If the guest has a host only connection to the host it should work no matter what else you have configured.
You mean using the IP address of the guest VM in Aptana Network Connection prefs and sending the site preview to that address?

When loading the site in any browser it "asks" for the code from the server, so asking from the code on the local machine, localhost, the guest, won't reap results since there is no code to get from it, or what did you mean?

I think it needs to ask for the host machine and this is what I meant when writing "..the browser (on the guest) should also be able to check the hosts IP address, 192.168..," as opposed to check its own localhost address.

Also, just for people into IE testing with VMs, I think if you have a decent base VM just make snapshots and upgrade IE to the various versions you want to test and make a snapshot again, then you can test the version you need to have and also avoid having multiple VMs. Another thing would be a linked clone but for just having IE one version higher in the linked clone I think a snapshot also suffices.

Can anyone tell me, can I run multiple linked clones from one VM/VHD at the same time? Just thinking of later on, perhaps being able to quickly see the site in various versions or IE, let's say 8, 9 10 and 11, and instead of running and closing the corresponding VM with the IE version I need, I could just run them all at the same time (given there is enough RAM etc).
OraOra
Posts: 81
Joined: 20. Jul 2014, 22:16
Primary OS: Other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: .

Re: Reach localhost 127.0.0.1 Aptana Studio preview from Gue

Post by OraOra »

As far as reaching the localhost from the VM goes, Aptana Studio can be set to use the VirtualBox Host-Only Network Adapter as a web server to display the preview.

When changing the settings from localhost to the Host-Only Network adapter in Aptana Studio it worked out of the box while keeping the guest in a Host-Only network.

If anyone needs more info just ask, the settings are so straight forward that you will need no networking knowledge to get this going. I was already looking at setting up WAMP and all sorts of stuff when searching for "Aptana Studio Web Server" gave the right info.

Last bits: Can anyone tell me, can I run multiple linked clones from one VM/VHD at the same time? Just thinking of later on, perhaps being able to quickly see the site in various versions or IE, let's say 8, 9 10 and 11, and instead of running and closing the corresponding VM with the IE version I need, I could just run them all at the same time (given there is enough RAM etc). Thanks.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Reach localhost 127.0.0.1 Aptana Studio preview from Gue

Post by BillG »

OK. If the host is acting as a web server you would access the page from the guest by using the host's "host-only" adapter IP instead of 127.0.0.1 . By default that is 192.168.56.1 .
Bill
OraOra
Posts: 81
Joined: 20. Jul 2014, 22:16
Primary OS: Other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: .

Re: Reach localhost 127.0.0.1 Aptana Studio preview from Gue

Post by OraOra »

Yes of course the host is acting as a web server since also on the host the code/sites are viewable in the browser on the ports chosen, this is 8020-8079 is my case, so they have to be served to be available on those ports at least. The aim was to see this from the guest as well where the various versions of IE are running and so I thought I need to check the host's localhost from the guest, though only later it came to me that the host actually needs to serve and hence be a web server and you would not believe it but Aptana Studio actually already has each of the attached virtual and physical network adapters IPs scanned and ready to serve the site/code on those from a drop down menu, so selecting the VirtualBox Host-Only adapter is what I did and it worked straight away. Back to debugging for IE 8 and IE 9, aarghh..
Post Reply