Symfony 3部署到Azure-路由问题


Symfony 3 Deploying to Azure - Route Problems

我创建了一个项目,现在我正在尝试部署到Azure。

从很多问题开始。。。我无法使用bitbucket进行部署。。。Azure每次都会返回一个错误,表示缓存目录中的文件有错误。。。我清除了目录并显示了相同的错误。

我使用FTP上传。

现在,我遇到了这个问题:

这是我的网址:

http://attrative.azurewebsites.net/

什么都没发生。。。我需要使用完整的路径:

http://attrative.azurewebsites.net/web/app.php

好的,好的,工作。。。但登录时,我使用的路由名称="plataforma",登录时,Symfony重定向到以下路径:

http://attrative.azurewebsites.net/plataforma

在localhost上,它运行得很好。。。但在azure上,如果我手动将url更改为:,它就会起作用

http://attrative.azurewebsites.net/web/app.php/plataforma

我该如何解决这个问题?还有一种方法可以使用git进行部署吗?我在这个链接上遵循了教程,但没有成功:

Symfony Cookbook-部署到Microsoft Azure网站云

谢谢你的提示。。。

感谢@Gary Liu-MSFT。

他提供了一个文件链接,我在那里找到了这个链接:

Git-symfony azure版

在这个链接上,我得到了这个web.config文件:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <defaultDocument enabled="true">
            <files>
                <clear />
                <add value="app.php" />
            </files>
        </defaultDocument>
        <rewrite>
            <rules>
                <clear />
                <rule name="blockAccessToPublic" patternSyntax="Wildcard" stopProcessing="true">
                    <match url="*" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{URL}" pattern="/web/*" />
                    </conditions>
                    <action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied." />
                </rule>
                <rule name="RewriteAssetsToPublic" stopProcessing="true">
                    <match url="^(.*)('.css|'.js|'.jpg|'.png|'.gif)$" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    </conditions>
                    <action type="Rewrite" url="web/{R:0}" />
                </rule>
                <rule name="RewriteRequestsToPublic" stopProcessing="true">
                    <match url="^(.*)$" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                    </conditions>
                    <action type="Rewrite" url="web/app.php/{R:0}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

只需放在根文件夹和ta da!!!!

问题解决了!!!