Use laravel on azure webapp

雨燕双飞 提交于 2019-12-02 12:50:16

问题


My project is developed with larval, then i am trying to use azure for web server.

I am copying folder laravel in C:\inetpub\wwwroot\laravel5. Next I run php artisan serve.

Then I test on http://localhost:8000/index (test on remote websever). It's ok.

But if I access my url for example http://bobdict.cloudapp.net/index, it say page not found.

What is the problem?

I am a newbie for this, sorry.


回答1:


It seems you are using IIS to host your PHP application on Azure VM.

As the entrance of laravel application locates in public folder in the root directory of the application. You can test to browse http://bobdict.cloudapp.net/public/index to test whether you have deploy laravel application successfully. Then to config URL rewrite for friendly URL pattern. You can create the web.config manually in your root directory of your application. You can refer to http://blog.qbotx.com/basic-laravel-5-on-microsoft-azure-part-1/ for the content of web.config.




回答2:


in azure portal configure docroot to wwwroot/laravel5/public



来源:https://stackoverflow.com/questions/36962678/use-laravel-on-azure-webapp

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