在Windows Azure上的Web应用程序laravel 5.1 [英] laravel 5.1 on windows azure web application
问题描述
我要部署在我的 Azure中的
Web应用程序 laravel
应用
I want to deploy a laravel
app on my azure
web application
但返回此错误
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred.
我知道我的的web.config
是设置错误。
我搜索一些资源也解决不了我的问题...
I search some resource also can't resolve my question ...
<一个href=\"http://blog.bobbyallen.me/2015/06/26/configuring-and-hosting-laravel-5-x-applications-on-windows-azure/\" rel=\"nofollow\">http://blog.bobbyallen.me/2015/06/26/configuring-and-hosting-laravel-5-x-applications-on-windows-azure/
推荐答案
事实上,Azure的Web站点的根目录是网站\\ wwwroot文件
,当我们从GitHub部署项目Azure的Web应用程序,天青会自动将项目移动到根路径网站\\ wwwroot文件
。所以,没有必要改变的根目录。
Actually, Azure Web site’s root directory is site\wwwroot
, when we are deploying projects from Github to Azure Web Apps, Azure will automatically move the project to the root path site\wwwroot
. So it is not necessary to change the root directory.
在我的身边,我克隆你的项目,由混帐它部署在Azure上,并浏览了网址&LT; SITE_NAME取代。 azurewebsites.net/public
检查项目。我得到关于该项目无法找到文件供应商/ autoload.php
的错误信息,所以它看起来像该项目是缺少的依赖。
On my side, I cloned your project, deployed it on Azure by git, and browsed the URL <site_name>. azurewebsites.net/public
to check project. I got the error message about the project couldn’t find the file vendor/autoload.php
, so it looks like the project was lack of dependence.
我安装的作曲家如您在KUDU控制台站点只要告诉文章。网址应为的https://&LT; your_site_name&GT; .scm.azurewebsites.net /
(第一次安装作曲家,我们需要重新启动控制台网站)
I installed composer as the article you provided told in KUDU Console site. The URL should be https://<your_site_name>.scm.azurewebsites.net/
(first installed composer, we need to restart the console site).
然后点击调试控制台=> CMD 在控制台网站在命令行工具来输入,更改目录的标题导航到 D:\\家\\网站\\ wwwroot文件
及运行作曲安装
,安装完成后,我们在浏览&LT; SITE_NAME&GT ;。.azurewebsites.net /公共
再次,它工作得很好。
Then click "Debug console"=>"CMD" at the header navigation of the console site to enter in command line tool, change directory to D:\home\site\wwwroot
and run composer install
, after finishing installation, we browse <site_name>.azurewebsites.net/public
again, and it works well.
要设置URL重写删除公共
,我们可以简单地修改网站\\ wwwroot文件
为网站\\ wwwroot的\\ PUBLIC
在虚拟应用程序和目录在Azure的门户网站部分。
To set the URL rewrite to remove the "public
", we can simply modify "site\wwwroot
" to "site\wwwroot\public
" at virtual applications and directories section in Azure portal.
此外,您可能希望PHP项目在测试过程中显示详细的错误。默认情况下,的display_errors
关闭时,我们可以简单的创建一个名为 .user.ini
文件根目录和WIRTE的display_errors =上
在此文件中。请仔细阅读<一href=\"https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/#how-to-change-the-built-in-php-configurations\"相对=nofollow>了解更多信息这篇文章。
In addition you may want PHP project to show detailed errors during testing. By default, "display_errors
" is off, we can simply create a file named ".user.ini
" in the root directory and wirte "display_errors = on
" in this file. Please read this article for more information.
这篇关于在Windows Azure上的Web应用程序laravel 5.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!