/healthcheck.phpを除いてBasic認証を設定する
# vi /etc/httpd/conf.d/allBasicAuth.conf <Location /> Satisfy Any AuthType Basic AuthName "Login" AuthUserFile /var/www/html/.htpasswd Require valid-user SetEnvIf Request_URI "/healthcheck.php" healthcheck Order Deny,Allow Deny from all Allow from env=healthcheck </Location>
Basic認証ファイル設置
# cd /var/www/html # htpasswd -c .htpasswd yuu3
反映
# httpd -t # systemctl restart httpd