Alias /phpMyAdmin /srv/www/html/phpMyAdmin AddExternalAuth pwauth /usr/sbin/pwauth SetExternalAuthMethod pwauth pipe # force https RewriteEngine On RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # require auth AuthType Basic AuthName "phpMyAdmin" AuthBasicProvider external AuthExternal pwauth Require valid-user # this is to force the default fpm, so we don't end up trying to use a virtualhosts jailed fpm which won't work SetHandler "proxy:unix:/etc/alternatives/php-fpm.sock|fcgi://localhost"