"/home/vcap/app/httpd/conf/extra/httpd-php.conf"의 두 판 사이의 차이

 
6번째 줄: 6번째 줄:
DirectoryIndex index.php index.html index.htm
DirectoryIndex index.php index.html index.htm


Define fcgi-listener fcgi://127.0.0.1:9000${HOME}/htdocs
Define fcgi-listener fcgi://#{PHP_FPM_LISTEN}${HOME}/#{WEBDIR}


<Proxy "${fcgi-listener}">
<Proxy "${fcgi-listener}">
17번째 줄: 17번째 줄:
</Proxy>
</Proxy>


<Directory "${HOME}/htdocs">
<Directory "${HOME}/#{WEBDIR}">
   <Files *.php>
   <Files *.php>
       <If "-f %{REQUEST_FILENAME}"> # make sure the file exists so that if not, Apache will show its 404 page and not FPM
       <If "-f %{REQUEST_FILENAME}"> # make sure the file exists so that if not, Apache will show its 404 page and not FPM
           SetHandler proxy:fcgi://127.0.0.1:9000
           SetHandler proxy:fcgi://#{PHP_FPM_LISTEN}
       </If>
       </If>
   </Files>
   </Files>

2017년 5월 23일 (화) 16:24 기준 최신판

1 개요[ | ]

/home/vcap/app/httpd/conf/extra/httpd-php.conf
~/app/httpd/conf/extra/httpd-php.conf
DirectoryIndex index.php index.html index.htm

Define fcgi-listener fcgi://#{PHP_FPM_LISTEN}${HOME}/#{WEBDIR}

<Proxy "${fcgi-listener}">
    # Noop ProxySet directive, disablereuse=On is the default value.
    # If we don't have a ProxySet, this <Proxy> isn't handled
    # correctly and everything breaks.

    # NOTE: Setting retry to avoid cached HTTP 503 (See https://www.pivotaltracker.com/story/show/103840940)
    ProxySet disablereuse=On retry=0
</Proxy>

<Directory "${HOME}/#{WEBDIR}">
  <Files *.php>
      <If "-f %{REQUEST_FILENAME}"> # make sure the file exists so that if not, Apache will show its 404 page and not FPM
          SetHandler proxy:fcgi://#{PHP_FPM_LISTEN}
      </If>
  </Files>
</Directory>

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}