There is a service running on port 8529 on my system (host) and I want to query its API via a PHP script from inside the XAMPP VM. How can I open the port and allow it to access the service? It would be kind of a reverse port forwarding, where a request to localhost:8529
inside the VM should be forwarded to the host:
Host (macOS) Guest (Debian)
------------------ ------------------
| localhost:8080 | --> | localhost:80 | Web Server (Apache)
| localhost:8529 | <-- | localhost:8529 | Other Service
------------------ ------------------
Alternatively, could I grant the VM access to the host LAN in order to access the host IP 192.168.178.22
?
(I am unable to reach the service under http://192.168.178.22:8529
despite being bound to 0.0.0.0:8529
however, only localhost:8529
works?!)
Setup / Environment:
I installed the virtual machine version of XAMPP (xampp-osx-7.4.4-0-vm.dmg
) on my MacBook Air (macOS Catalina), started the services (IP address 192.168.64.2
), mounted the /opt/lampp
volume, and enabled port forwarding for localhost:8080 -> 80 (Over SSH)
. I can reach the XAMPP dashboard in a browser at http://localhost:8080
and http://192.168.64.2:80
.
Clicking Open Terminal in the XAMPP app opens a command line for the guest system. It reveals that the VM solution is by Bitnami and the OS is Linux debian 4.9.0-11-amd64. It doesn't appear to be what Bitnami calls Server Console however. How can I actually manage the VM?