Laravel Dusk: The correct localhost port for APP_URL on a remote server?

前提是你 提交于 2019-12-23 03:39:06

问题


I am trying to install Dusk on Laravel at a REMOTE host and at some point I need to change the .env file like this

APP_URL=http://localhost:8000

Another tutorial suggested something like

APP_URL=http://localhost:9515

For a remote host, do I need to put "http://localhost:????" and if I need how do I find the port number? I not do I just leave it as "/"?

By the way, I have tested several options and non have worked so far so but I am not sure what causes it so I am trying to pint point the problem.


回答1:


Set the APP_URL to the same URL you are using in the browser for your local development environment. This can be http://localhost but also a custom URL:

APP_URL=http://dusk.local

For Laravel Homestead you can manage your sites within your Homestead.yaml file.

The APP_URL is somehow important as commands from the terminal require this information as pointed out in detail in this answer.

The port 9515 is the default port number of the Selenium server URL as provided in DuskTestCase.php. There's no need to change it at the beginning as it should work out of the box.

By default, the ports are forwarded to your Homestead environment.



来源:https://stackoverflow.com/questions/45306147/laravel-dusk-the-correct-localhost-port-for-app-url-on-a-remote-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!