0

I'm using VirtualBox for a Debian 9 VM. Laravel, Apache, SQL, PHP install went fine. Laravel Development Server has started successfully with this message.

Laravel development server started: http://127.0.0.1:8000

I cannot access the page with Firefox in Windows. Based on the example I was going by I should be able to go to http://debian-vm/lara_app/public, where debian-vm is my VM's hostname. After installing PHP and Apache, I can surf to http://debian-vm from Firefox in windows and see the info page for that. I can even surf to http://debian-vm/lara_app and see a directory listing but the lara_app/public site produces nothing. Have I missed a step? The /public directory contains a css folder, a js folder, some icons, a web.config file and an index.php file but it will not show me anything.

1 Answer 1

0

The message says that you can access the server at 127.0.0.1 port 8000. So trying to access the server on the default http port (80) will not work.

If the server socket is bound to any address, you should be able to access it at http://debian-vm:8000/ assuming that debian-vm is the name or the IP address of the VM.

If the server socket is bound to 127.0.0.1, then it is a little more tricky. The easiest ways then is to use a SSH connection into the VM and tunnel a port to 127.0.0.1:8000. If you use port 8000 as the source for the tunnel, you can access the server at http://127.0.0.1:8000 from your local computer. Of course this works also if the server is bound to any address.

1
  • In this case, I wasn't serving properly. After a little more research I learned to specify a host from the command. Working now! Thanks very much! Jun 9, 2019 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.