Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to serve a symfony app on 192.168.x.x?

Tags:

symfony

When I launch the command php app/console server:run my application is served on localhost:8000 and isn't accessible with my local ip address 192.168.0.41:8000.

How can I do that?

I'm under MacOSX Maverick and I don't want to use apache or nginx. I just want a simple step by step to do it with the PHP built-in embedded server.

Thanks for your help.

like image 394
Franck Anso Avatar asked May 21 '14 09:05

Franck Anso


2 Answers

for Symfony 4 you can run

php -S 127.0.0.1:8000 -t public
like image 72
pedram shabani Avatar answered Oct 16 '22 14:10

pedram shabani


If someone search the command is:

php app/console server:run 0.0.0.0:8000
like image 36
Franck Anso Avatar answered Oct 16 '22 13:10

Franck Anso