AuthName "User Authentication Required!" AuthType Basic Require valid-user #登録ユーザーであれば可 AuthUserFile /path/to/.htpasswd #パスワードファイルの場所 $ cd /path/to $ su # htpasswd -c .htpasswd user1 New password: Re-type new password:
AuthName "User Authentication Required!" AuthType Digest Require valid-user #登録ユーザーであれば可 AuthDigestFile /path/to/.htpasswd #パスワードファイルの場所 $ cd /path/to $ su # htdigest -c .htpasswd test user1 New password: Re-type new password:
order deny,allow deny from all
<Files ~ "^?.ht"> deny from all </Files>
<Files ~ "\.(dat|idx|inc)$"> deny from all </Files>
order deny,allow deny from all allow from <自分の使うIPアドレス範囲>(ホスト名でも可)
AddType application/x-httpd-php .inc
<Directory "/usr/local/apache/htdocs"> Options Indexes Includes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/usr/local/apache/htdocs"> Options Includes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory>