2016-07-04 3 views
0

Bitbucket 저장소를 통해 Grav CMS (http://getgrav.org) 기반 웹 사이트를 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. NB : 루트에 web.config가 있지만 webserver-configs 폴더에 또 다른 web.config가 있습니다. – user2721794

+0

나만의 저장소를 사용합니까? 문제를 재현 할 수있는 저장소를 제공하는 것이 편리합니까? –

+0

예, 여기 있습니다 https://bitbucket.org/vics_linq/damblaise – user2721794

관련 문제