Question

Running LAMP in VirtualBox, can't visit IP address on host pc.

Posted May 29, 2015 3.1k views
Server Optimization

I’m currently running LAMP with gui in VirtualBox. Ive installed phpmyadmin as well. Visiting my IP address and phpmyadmin works in the web browser in the gui in VirtualBox just fine. But i don’t really want a gui with LAMP. I only want the terminal. But i want to be able to use phpmyadmin with my host PC. When i try this it dosen’t work. Why is that? is there something i can do to solve this?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

By default a new VirtualBox machine will have it’s network interface set to NAT. If you switch this to a bridged adapter, other computers on your local network will be able to access it and it will reach out to your router for it’s own IP. As long as you haven’t set a static IP address you should be able to power off your VM, change this setting and power back on. Your VM will now have a new IP address on the same subnet as your host system and should be reachable via a browser.

Submit an Answer