ユーザ用ツール

サイト用ツール


apache:configure

apache設定ファイル

Sample Code

#
# WordPress
#
<Directory "/var/www/vhosts/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
</Directory>

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/
apache/configure.txt · 最終更新: 2014/04/04 02:18 by clownclown

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki