====== apache設定ファイル ======
===== Sample Code =====
#
# WordPress
#
SSLRequireSSL
Options None
AllowOverride All
Order Deny,Allow
# Allow from all
# Allow from 127.0.0.1
# Allow from 123.123.123.123 124.124.124.124
AuthName "WordPress Access"
AuthType Basic
AuthUserFile /var/www/vhosts/wordpress/htpasswd.users
Require valid-user
Alias /wordpress/var/www/vhosts/wordpress
===== 解説 =====
* SSLRequireSSL\\ httpsのみ接続を許可する
* Options None
* AllowOverride All\\ .htaccessを有効にする
* AuthName "WordPress Access"
* AuthType Basic
* AuthUserFile /var/www/vhosts/wordpress/htpasswd.users
* Require valid-user
===== パスワードファイル生成 =====
# htpasswd -cm /var/www/vhosts/wordpress/htpasswd.users editor
New password: *****
Re-type new password: *****
Adding password for user editor
# less /var/www/vhosts/wordpress/htpasswd.users
editor:$apr1$qwst8xCo$dmavjxuPRDsKc6785yINR/