Remote access yii serve


(marcoc) #1

hi all i’m a total noob of yii, i have follow the guide to configure yii2 (basic), but i find a problem where i run the command “php yii serve --port=8888” the app is accesibile only from localhost, if i try to connect from another pc to my webserver i cannot reach the site, but if i try to open another site it works, is there a config file where i can say to yii serve to allow remote connection?
tks for the help


(Alexander Makarov) #2
/**
 * Runs PHP built-in web server.
 *
 * In order to access server from remote machines use 0.0.0.0:8000. That is especially useful when running server in
 * a virtual machine.

so

./yii serve 0.0.0.0 --port=8888