目次
<Directory /PATH/htdocs/html/> 〜中略〜 AllowOverride All order deny,allow deny from all allow from 192.168.0.0/255.255.255.0 </Directory>
<Directory /PATH/htdocs/html/> 〜中略〜 AllowOverride All order allow,deny allow from all deny from 192.168.0.0/255.255.255.0 </Directory>
<Directory /PATH/htdocs/html/blog/> Options Indexes FollowSymLinks AllowOverride All <Files login.php> order deny,allow deny from all allow from 192.168.0.0/255.255.255.0 </Files> </Directory>
<Directory /PATH/htdocs/html/blog/> Options Indexes FollowSymLinks AllowOverride All <Files login.php> order allow,deny allow from all deny from 192.168.0.0/255.255.255.0 </Files> </Directory>
管理者画面のログインページ(wp-login.php)への攻撃対策として、同ファイルと管理者画面のコンテンツへのアクセスを制限する設定例。
## Word Press Admin Page Security <Directory /PATH/htdocs/html/blog/wp-admin/> Options Indexes FollowSymLinks AllowOverride All order deny,allow deny from all allow from 192.168.0.0/255.255.255.0 </Directory> <Directory /PATH/htdocs/html/blog/> Options Indexes FollowSymLinks AllowOverride All <Files wp-login.php> order deny,allow deny from all allow from 192.168.0.0/255.255.255.0 </Files> </Directory>
サーバ内からのAPIアクセスに対してBASIC認証を掛けない場合の設定例。
<Directory "/PATH"> Options FollowSymLinks AllowOverride all AuthUserFile [PASSWORD FILE] AuthGroupFile /dev/null AuthName "Member Only" AuthType Basic require valid-user Order allow,deny Allow from 127.0.0.1 Satisfy Any </Directory>