vhost-stack/etc/apache2/conf-available/phpMyAdmin.conf

28 lines
739 B
Plaintext
Raw Normal View History

2021-04-04 13:28:22 -07:00
Alias /phpMyAdmin /srv/www/html/phpMyAdmin
AddExternalAuth pwauth /usr/sbin/pwauth
SetExternalAuthMethod pwauth pipe
<Location /phpMyAdmin>
2024-03-21 16:00:52 -07:00
# force https
<If "%{HTTPS} != 'on'">
RewriteEngine On
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</If>
# require auth
<Else>
AuthType Basic
AuthName "phpMyAdmin"
AuthBasicProvider external
AuthExternal pwauth
Require valid-user
</Else>
2021-04-04 13:28:22 -07:00
</Location>
2022-07-18 19:05:51 -07:00
# this is to force the default fpm, so we don't end up trying to use a virtualhosts jailed fpm which won't work
<Directory "/srv/www/html/phpMyAdmin">
<FilesMatch ".+\.ph(ar|p|tml)$">
2023-03-03 10:42:13 -08:00
SetHandler "proxy:unix:/etc/alternatives/php-fpm.sock|fcgi://localhost"
2022-07-18 19:05:51 -07:00
</FilesMatch>
</Directory>