Setup: Remove fcgi from apache URL

This commit is contained in:
Michael Friedrich 2019-01-08 11:38:51 +01:00
parent 26c6ce3e55
commit f7248324f4
2 changed files with 10 additions and 4 deletions

View File

@ -39,6 +39,13 @@ abstract class Webserver
*/ */
protected $fpmUri; protected $fpmUri;
/**
* Enable to pass requests to FPM
*
* @var bool
*/
protected $enableFpm = false;
/** /**
* Create instance by type name * Create instance by type name
* *

View File

@ -10,8 +10,7 @@ use Icinga\Module\Setup\Webserver;
*/ */
class Apache extends Webserver class Apache extends Webserver
{ {
protected $fpmUri = 'fcgi://127.0.0.1:9000'; protected $fpmUri = '127.0.0.1:9000';
protected $enableFpm = false;
protected function getTemplate() protected function getTemplate()
{ {
@ -72,7 +71,7 @@ Alias {urlPath} "{documentRoot}"
# # Forward PHP requests to FPM # # Forward PHP requests to FPM
# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 # SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
# <FilesMatch "\.php$"> # <FilesMatch "\.php$">
# SetHandler "proxy:{fpmUri}" # SetHandler "proxy:fcgi://{fpmUri}"
# ErrorDocument 503 {urlPath}/error_unavailable.html # ErrorDocument 503 {urlPath}/error_unavailable.html
# </FilesMatch> # </FilesMatch>
# </IfVersion> # </IfVersion>
@ -132,7 +131,7 @@ Alias {urlPath} "{documentRoot}"
# Forward PHP requests to FPM # Forward PHP requests to FPM
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
<FilesMatch "\.php$"> <FilesMatch "\.php$">
SetHandler "proxy:{fpmUri}" SetHandler "proxy:fcgi://{fpmUri}"
ErrorDocument 503 {urlPath}/error_unavailable.html ErrorDocument 503 {urlPath}/error_unavailable.html
</FilesMatch> </FilesMatch>
</IfVersion> </IfVersion>