Apache.php (icingaweb2-2.11.3) | : | Apache.php (icingaweb2-2.11.4) | ||
---|---|---|---|---|
skipping to change at line 19 | skipping to change at line 19 | |||
* Generate Apache 2.x configuration | * Generate Apache 2.x configuration | |||
*/ | */ | |||
class Apache extends Webserver | class Apache extends Webserver | |||
{ | { | |||
protected $fpmUri = '127.0.0.1:9000'; | protected $fpmUri = '127.0.0.1:9000'; | |||
protected function getTemplate() | protected function getTemplate() | |||
{ | { | |||
if (! $this->enableFpm) { | if (! $this->enableFpm) { | |||
return <<<'EOD' | return <<<'EOD' | |||
Alias {urlPath} "{documentRoot}" | Alias {urlPath} "{aliasDocumentRoot}" | |||
# Remove comments if you want to use PHP FPM and your Apache version is older th an 2.4 | # Remove comments if you want to use PHP FPM and your Apache version is older th an 2.4 | |||
#<IfVersion < 2.4> | #<IfVersion < 2.4> | |||
# # Forward PHP requests to FPM | # # Forward PHP requests to FPM | |||
# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | # SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | |||
# <LocationMatch "^{urlPath}/(.*\.php)$"> | # <LocationMatch "^{urlPath}/(.*\.php)$"> | |||
# ProxyPassMatch "fcgi://{fpmUri}/{documentRoot}/$1" | # ProxyPassMatch "fcgi://{fpmUri}/{documentRoot}/$1" | |||
# </LocationMatch> | # </LocationMatch> | |||
#</IfVersion> | #</IfVersion> | |||
skipping to change at line 82 | skipping to change at line 82 | |||
# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | # SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | |||
# <FilesMatch "\.php$"> | # <FilesMatch "\.php$"> | |||
# SetHandler "proxy:fcgi://{fpmUri}" | # SetHandler "proxy:fcgi://{fpmUri}" | |||
# ErrorDocument 503 {urlPath}/error_unavailable.html | # ErrorDocument 503 {urlPath}/error_unavailable.html | |||
# </FilesMatch> | # </FilesMatch> | |||
# </IfVersion> | # </IfVersion> | |||
</Directory> | </Directory> | |||
EOD; | EOD; | |||
} else { | } else { | |||
return <<<'EOD' | return <<<'EOD' | |||
Alias {urlPath} "{documentRoot}" | Alias {urlPath} "{aliasDocumentRoot}" | |||
<IfVersion < 2.4> | <IfVersion < 2.4> | |||
# Forward PHP requests to FPM | # Forward PHP requests to FPM | |||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 | |||
<LocationMatch "^{urlPath}/(.*\.php)$"> | <LocationMatch "^{urlPath}/(.*\.php)$"> | |||
ProxyPassMatch "fcgi://{fpmUri}/{documentRoot}/$1" | ProxyPassMatch "fcgi://{fpmUri}/{documentRoot}/$1" | |||
</LocationMatch> | </LocationMatch> | |||
</IfVersion> | </IfVersion> | |||
<Directory "{documentRoot}"> | <Directory "{documentRoot}"> | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |