2016-07-04 7 views
0

Bitbucketリポジトリ経由でGrav CMS(http://getgrav.org)ベースのWebサイトをAzureにデプロイした後、「このディレクトリまたはページを表示する権限がありません」というメッセージが表示されます。私はサイトを閲覧しようとするとき。私はまだ設定を変更していません。Grav CMSをAzureにデプロイ

答えて

5

Azureで実行されているPHPアプリケーションはIIS上でホストされているため、IISでURL書き換えモードを設定していないために問題が発生します。

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
     <defaultDocument> 
      <files> 
       <remove value="index.php" /> 
       <add value="index.php" /> 
      </files> 
     </defaultDocument> 
     <rewrite> 
      <rules> 
       <rule name="request_filename" stopProcessing="true"> 
        <match url="." ignoreCase="false" /> 
        <conditions logicalGrouping="MatchAll"> 
         <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> 
         <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> 
        </conditions> 
        <action type="Rewrite" url="index.php" /> 
       </rule> 
       <rule name="user_accounts" stopProcessing="true"> 
        <match url="^user/accounts/(.*)$" ignoreCase="false" /> 
        <action type="Redirect" url="error" redirectType="Permanent" /> 
       </rule> 
       <rule name="user_config" stopProcessing="true"> 
        <match url="^user/config/(.*)$" ignoreCase="false" /> 
        <action type="Redirect" url="error" redirectType="Permanent" /> 
       </rule> 
       <rule name="user_error_redirect" stopProcessing="true"> 
        <match url="^user/(.*)\.(txt|md|html|php|yaml|json|twig|sh|bat)$" ignoreCase="false" /> 
        <action type="Redirect" url="error" redirectType="Permanent" /> 
       </rule> 
       <rule name="cache" stopProcessing="true"> 
        <match url="^cache/(.*)" ignoreCase="false" /> 
        <action type="Redirect" url="error" redirectType="Permanent" /> 
       </rule> 
       <rule name="bin" stopProcessing="true"> 
        <match url="^bin/(.*)$" ignoreCase="false" /> 
        <action type="Redirect" url="error" redirectType="Permanent" /> 
       </rule> 
       <rule name="backup" stopProcessing="true"> 
        <match url="^backup/(.*)" ignoreCase="false" /> 
        <action type="Redirect" url="error" redirectType="Permanent" /> 
       </rule> 
       <rule name="system" stopProcessing="true"> 
        <match url="^system/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$" ignoreCase="false" /> 
        <action type="Redirect" url="error" redirectType="Permanent" /> 
       </rule> 
       <rule name="vendor" stopProcessing="true"> 
        <match url="^vendor/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$" ignoreCase="false" /> 
        <action type="Redirect" url="error" redirectType="Permanent" /> 
       </rule> 
      </rules> 
     </rewrite> 
    </system.webServer> 
    <system.web> 
     <httpRuntime requestPathInvalidCharacters="&lt;,&gt;,*,%,&amp;,\,?" /> 
    </system.web> 
</configuration> 

そして紺碧のアプリケーションでそれをデプロイします

は、以下の内容で、アプリケーションのルートディレクトリにweb.configという名前のファイルを作成するようにしてください。また、この設定ファイルは、グラビアアプリケーションのwebserver-configsフォルダにあります。または、githubでhttps://github.com/Vivalldi/grav/blob/develop/webserver-configs/web.configを参照することもできます。

さらに詳しいことがありましたら、お気軽にお知らせください。

+0

私はアプリケーションのルートにweb.configファイルを追加しましたが、それでも動作しませんでした。私はここの指示に従っています。 https://getgrav.org/blog/grav-on-azure。注意:私はrootにweb.configを持っていますが、webserver-configsフォルダにはもう1つのweb.configがあります。 – user2721794

+0

独自のリポジトリを使用していますか?問題を再現するためにあなたのリポジトリを提供することは便利ですか? –

+0

はい私はここにありますhttps://bitbucket.org/vics_linq/damblaise – user2721794

関連する問題