| >> HOME >> FC5 MENU >> Webページパスワード制限 (.htpasswd .htaccess) |
 |
|
|
|
|
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# vi /etc/httpd/conf/httpd.conf
:
:
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
Options Includes ExecCGI FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
</Directory>
:
:
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# service httpd restart
httpdを停止中: [ OK ]
httpd を起動中: [ OK ]
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# htpasswd -c /etc/httpd/conf/.htpasswd user1
New password: xxxxxxx
Re-type new password: xxxxxxx
Adding password for user user1
|
|
|
| |
|
|
| |
[root@linux ~]# htpasswd /etc/httpd/conf/.htpasswd user2
New password: xxxxxxx
Re-type new password: xxxxxxx
Adding password for user user2
|
|
|
| |
|
|
| |
[root@linux ~]# cat /etc/httpd/conf/.htpasswd
user1:VP.rJ3ky/nVRg
user2:cuW/zSNEtkuK.
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# vi /var/www/html/security/.htaccess
AuthUserFile /etc/httpd/conf/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter your UserName and password"
AuthType Basic
require valid-user
|
|
|
| |
|
|
| |
[root@linux ~]# vi /var/www/html/security/.htaccess
AuthUserFile /etc/httpd/conf/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter your UserName and password"
AuthType Basic
require user user1
|
|
|
| |
|
|
| |
[root@linux ~]# vi /var/www/html/security/.htaccess
SSLRequireSSL
AuthUserFile /etc/httpd/conf/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter your UserName and password"
AuthType Basic
require valid-user
|
|
|
|
|
|
| |
|
|
| |  |
|
 |
|
 |
 |