Merge pull request #3183 from Icinga/doc/apache-fpm
Support basic auth on PHP-FPM
This commit is contained in:
commit
644cf0f1c3
|
@ -18,6 +18,7 @@ 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
|
||||
# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
# <LocationMatch "^{urlPath}/(.*\.php)$">
|
||||
# ProxyPassMatch "fcgi://127.0.0.1:9000/{documentRoot}/$1"
|
||||
# </LocationMatch>
|
||||
|
@ -61,9 +62,11 @@ Alias {urlPath} "{documentRoot}"
|
|||
ErrorDocument 404 {urlPath}/error_norewrite.html
|
||||
</IfModule>
|
||||
|
||||
# Remove comments if you want to use PHP FPM and your Apache version is greater than or equal to 2.4
|
||||
# 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
|
||||
# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
# <FilesMatch "\.php$">
|
||||
# SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||
# ErrorDocument 503 {urlPath}/error_unavailable.html
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
Alias /icingaweb2 "/usr/share/icingaweb2/public"
|
||||
|
||||
# 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
|
||||
# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
# <LocationMatch "^{urlPath}/(.*\.php)$">
|
||||
# ProxyPassMatch "fcgi://127.0.0.1:9000/{documentRoot}/$1"
|
||||
# </LocationMatch>
|
||||
#</IfVersion>
|
||||
|
||||
<Directory "/usr/share/icingaweb2/public">
|
||||
Options SymLinksIfOwnerMatch
|
||||
AllowOverride None
|
||||
|
@ -38,10 +47,14 @@ Alias /icingaweb2 "/usr/share/icingaweb2/public"
|
|||
ErrorDocument 404 /icingaweb2/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 /icingaweb2/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
|
||||
# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
# <FilesMatch "\.php$">
|
||||
# SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||
# ErrorDocument 503 {urlPath}/error_unavailable.html
|
||||
# </FilesMatch>
|
||||
# </IfVersion>
|
||||
</Directory>
|
||||
|
|
|
@ -2,6 +2,7 @@ Alias /icingaweb2 "/usr/share/icingaweb2/public"
|
|||
|
||||
<IfVersion < 2.4>
|
||||
# Forward PHP requests to FPM
|
||||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
<LocationMatch "^/icingaweb2/(.*\.php)$">
|
||||
ProxyPassMatch "fcgi://127.0.0.1:9000/usr/share/icingaweb2/public/$1"
|
||||
</LocationMatch>
|
||||
|
@ -47,6 +48,7 @@ Alias /icingaweb2 "/usr/share/icingaweb2/public"
|
|||
|
||||
<IfVersion >= 2.4>
|
||||
# Forward PHP requests to FPM
|
||||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
<FilesMatch "\.php$">
|
||||
SetHandler "proxy:fcgi://127.0.0.1:9000"
|
||||
ErrorDocument 503 /icingaweb2/error_unavailable.html
|
||||
|
|
Loading…
Reference in New Issue