【发布时间】:2016-03-17 07:34:31
【问题描述】:
这里需要一些指示!
我已成功将我的应用程序部署到 Amazon Web Services 上的弹性 beanstalk 上,但我的根目录有问题,基本上是它运行的 /web,我如何更改它以便应用程序直接运行网址?
我之前尝试过将 symphony 应用程序部署到 azure 并使用 web.config 文件。我可以在这里做同样的事情吗?
Azure 的 web.config 看起来像这样:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<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>
任何建议都会很棒,所以提前感谢您的帮助! :)
【问题讨论】:
标签: php symfony amazon-web-services amazon-elastic-beanstalk