Make virtualized PhpED's DBG work with host browser |
Site Admin
|
there are two possible cases:
1)You run Apache under VmWare. In this case, depending on the VMWare network settings, you can access to Apache either through VMWare NAT'd, or bridged, or shared adapter. In other words, no special actions are required to access Apache in the vm, except firewall rules. Once you get an access, you can run debugger by adding DBGSESSID (see FAQ on how to run debug sessions), feel free to add scriplets in the browser to simplify the process (I'm not sure if safari supports them). 2) You run Apache under Mac. It's a bit harder, but still possible. "Host only" setting for the network won't work because in this case vm won't see your host network, only host will see it. You need either bridge or NAT. In both cases software under VM will see your Apache in the host and therefore it's not hard to spcify URL in the project settings and so forth. Let know what particular problems urged you to use ssh tunneling in such a trivial environment? (I know, networks settings aren't that trivial but anyway?) |
||||||||||||
_________________ The PHP IDE team |
Veteran
|
I don't think I made myself clear, as this isn't quite that trivial . Perhaps a diagram would be more helpful.... The web server resides on Server B, which I can only get to via SSH through Server A. From the VM, with it in bridge mode, I can use the debugger by creating a double remote tunnel. However, I want to access the web site from a browser on the Mac side, but still have the debugger talk to PhpED inside the VM. I was thinking I might be able to do this by setting up the dual tunnel for DBG on the Mac side, and then use its firewall to forward packets coming in on 7869 to the VM's IP address. Will this work? Is there an easier way? |
||||||||||||||
|
Site Admin
|
Well, you can forward mac's TCP/80 port to the web using one tunnel.
user@mac# ssh -L<macip>:80:<webip>:80 if you need 80th on the vm, you can do this either through another tunnel: user@vm# ssh -L<vmip>:80:<webip>:80 or work with mac's tunnelled TCP/80 directly: (it means use mac's bridged ip in the URL when you invoke it on the VM) Regarding debugger, you'd need tunnel that will forward web's 7869/TCP to your vm.: user@vm# ssh -R<vmip>:7869:<webip>:7869 I'm not sure why would you need "double-tunnels". |
||||||||||||
_________________ The PHP IDE team |
Veteran
|
It started working when I turned off the custom port debugger option in PhpED. Which doesn't make a lot of sense to me, but there you go.
So here's the setup I ended up with. All I need to do to get DBG working as I want is this in XP (well, an equivalent of this using SecureCRT, since XP lacks SSH): % ssh PublicBox -R 7869:localhost:7869 ssh PrivateBox -R 7869:localhost:7869 Then when I connect to the site using a browser on the Mac side (working through a tunnel established on the Mac side for the HTTP traffic), the debugger requests go to XP as desired. Yea! When I want to use a browser on the XP side, with the same tunnels set up, I needed to have the custom port debugger setting turned on. But using a browser on the Mac side didn't work until I turned it off. <shrug> If you know a way to accomplish this in a way that will only do encryption once, that'd be great. I think I could use port forwarding in the firewall, but that's not an option on the PublicBox machine. |
||||||||||||
|
Site Admin
|
I'm not sure which is what.Is PublicBox Mac? Is PrivateBox your site? or what?
You don't need to change debugger settings, they would be all the same while working with this site, regardless you run browser under Mac or XP. On the Mac site, you need to specify DBGSESSID in the browser url. It should contain localhost to make debugger on the site connecting to the local tunnel point (for example DBGSESSID=1@127.0.0.1:7869) On the XP side, custom host/port for the debugger play their role (you'd have the same 127.0.0.1 7869 there) and it will form appropriate DBGSESSID for you in the browser URL. |
||||||||||||||||
_________________ The PHP IDE team |
Veteran
|
PublicBox is the server in front of the firewall; PrivateBox is the server behind the firewall. PrivateBox is the one with the web server, so to get to it, I have to ssh from the Mac to PublicBox, and then from PublicBox to PrivateBox.
I think that last part may have played a role in the confusion... I didn't realize how that worked. Though, I'm still not completely clear why it started working with I turned off the custom host/port setting in PhpED. |
||||||||||||||||||
|
Site Admin
|
from the web perspectives you're connecting to it from localhost point (it's sshd does this for you because of tunnel) and therefore debugger connects back at the "client" address (which is localhost) on 7869/TCP port and this is fine. |
||||||||||||||
_________________ The PHP IDE team |
Make virtualized PhpED's DBG work with host browser |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by