-ベーシック認証をかけたいディレクトリに.htaccessと.htpasswdを設置 -そのディレクトリ配下のディレクトリ全てにベーシック認証がかかる -.htaccessの一行目のpath..の部分はドメインからの相対パス -.htpasswdの:左は、ID。:右は暗号化されたpw。pwの暗号化は、http://www.luft.co.jp/cgi/htpasswd.php
Created
October 9, 2018 06:40
-
-
Save k-ish/b3dcc4fe79a086cd187fe8b975885f1a to your computer and use it in GitHub Desktop.
ベーシック認証の設定
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AuthUserFile /home/path../.htpasswd | |
AuthGroupFile /dev/null | |
AuthName "Input ID and Password." | |
AuthType Basic | |
require valid-user | |
<Files ~ "^.(htpasswd|htaccess)$"> | |
deny from all | |
</Files> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
best:FS5DJ5U4pKCNI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment