Deye
Deye

Reputation: 29

How to access a symfony 4 local project from another computer using the same network

I'm currently working on a symfony 4 project and I would like to test it out on another computer that use the same network my project is run withe the symfony server on localhost:8000. I am using Wamp. How can i do this?

Upvotes: 0

Views: 2284

Answers (1)

Rémi Girard
Rémi Girard

Reputation: 581

From your local computer you access the app via:

http://localhost:8000

To access your app from another client on your network your just have to replace localhost with the IP address of your server. To get the ip adress of your server you have to launch 'cmd' and type ipconfig like explained here: https://www.digitalcitizen.life/find-ip-address-windows

Then you can access web app from your other computer with the address which will look something like this:

http://192.168.1.1:8000

Replace (192.168.1.1 with the IP adress).

If it doesn't work, make sure your web app is working locally on your server with http://localhost:8000.

If it still doesn't work you can try to change the port of your server. You probably start the web app with :

php bin/console server:start

You can try to stop the server :

php bin/console server:stop

Then start it on the "usual" web port:

php bin/console server:start *:80

Here you can find the details on how to use the php built-in web server: https://symfony.com/doc/current/setup/built_in_web_server.html

If it still doesn't work I can advice you to try to deactivate your firewall to see if it's blocking your web app : https://windowsinstructed.com/disable-windows-firewall-windows/

Upvotes: 1

Related Questions