force https for phpMyAdmin access
This commit is contained in:
parent
96c4af6453
commit
c6ad245c89
|
@ -4,11 +4,19 @@ AddExternalAuth pwauth /usr/sbin/pwauth
|
||||||
SetExternalAuthMethod pwauth pipe
|
SetExternalAuthMethod pwauth pipe
|
||||||
|
|
||||||
<Location /phpMyAdmin>
|
<Location /phpMyAdmin>
|
||||||
AuthType Basic
|
# force https
|
||||||
AuthName "phpMyAdmin"
|
<If "%{HTTPS} != 'on'">
|
||||||
AuthBasicProvider external
|
RewriteEngine On
|
||||||
AuthExternal pwauth
|
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||||
Require valid-user
|
</If>
|
||||||
|
# require auth
|
||||||
|
<Else>
|
||||||
|
AuthType Basic
|
||||||
|
AuthName "phpMyAdmin"
|
||||||
|
AuthBasicProvider external
|
||||||
|
AuthExternal pwauth
|
||||||
|
Require valid-user
|
||||||
|
</Else>
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
# this is to force the default fpm, so we don't end up trying to use a virtualhosts jailed fpm which won't work
|
# this is to force the default fpm, so we don't end up trying to use a virtualhosts jailed fpm which won't work
|
||||||
|
|
Loading…
Reference in New Issue
Block a user