Support FPM config for Apache < 2.4 generated via icingacli
This commit is contained in:
parent
ae86dd2987
commit
754963ac11
|
@ -10,14 +10,19 @@ use Icinga\Module\Setup\Webserver;
|
|||
*/
|
||||
class Apache extends Webserver
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function getTemplate()
|
||||
{
|
||||
return <<<'EOD'
|
||||
Alias {urlPath} "{documentRoot}"
|
||||
|
||||
# Remove comments if you want to use PHP FPM and your Apache version is older than 2.4
|
||||
#<IfVersion < 2.4>
|
||||
# # Forward PHP requests to FPM
|
||||
# <LocationMatch "^{urlPath}/(.*\.php)$">
|
||||
# ProxyPassMatch "fcgi://127.0.0.1:9000/{documentRoot}/$1"
|
||||
# </LocationMatch>
|
||||
#</IfVersion>
|
||||
|
||||
<Directory "{documentRoot}">
|
||||
Options SymLinksIfOwnerMatch
|
||||
AllowOverride None
|
||||
|
@ -55,13 +60,15 @@ Alias {urlPath} "{documentRoot}"
|
|||
DirectoryIndex error_norewrite.html
|
||||
ErrorDocument 404 {urlPath}/error_norewrite.html
|
||||
</IfModule>
|
||||
|
||||
# forwarding PHP requests to FPM
|
||||
# remove comments if you want to use FPM
|
||||
#<FilesMatch "\.php$">
|
||||
# SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||
# ErrorDocument 503 {urlPath}/error_unavailable.html
|
||||
#</FilesMatch>
|
||||
|
||||
# Remove comments if you want to use PHP FPM and your Apache version is greater than or equal to 2.4
|
||||
# <IfVersion >= 2.4>
|
||||
# # Forward PHP requests to FPM
|
||||
# <FilesMatch "\.php$">
|
||||
# SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||
# ErrorDocument 503 {urlPath}/error_unavailable.html
|
||||
# </FilesMatch>
|
||||
# </IfVersion>
|
||||
</Directory>
|
||||
EOD;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue