apache+htpasswd
来源:互联网 发布:ubuntu切换打字法 编辑:程序博客网 时间:2024/04/28 16:45
基于虚拟主机的密码访问:
1、在配置文件中添加:
NameVirtualHost 192.168.0.3:8080
NameVirtualHost 192.168.0.3:8081
Listen 8081
Listen 8080
<VirtualHost 192.168.0.3:8080>
DocumentRoot /usr/local/apache/htdocs/web1
ServerName 192.168.0.3:8080
<Location />
Order deny,allow
Allow from all
Deny from all
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /usr/local/apache/passwd/passwords
Require user rong
</Location>
</VirtualHost>
<VirtualHost 192.168.0.3:8081>
DocumentRoot /usr/local/apache/htdocs/web2
ServerName 192.168.0.3:8081
<Location />
Order deny,allow
Allow from all
Deny from all
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /usr/local/apache/passwd/passwords
Require user rong2
</Location>
</VirtualHost>
2、执行命令:添加2个用户:
#htpasswd /usr/local/apache/passwd/passwords rong
New password:
Re-type new password:
Adding password for user rong
#htpasswd /usr/local/apache/passwd/passwords rong2
New password:
Re-type new password:
Adding password for user rong2
本文出自 “Mr_Z” 博客,请务必保留此出处http://zhangrong.blog.51cto.com/2196532/986501
- apache+htpasswd
- apache htpasswd
- Apache htpasswd
- apache htpasswd 命令
- apache htpasswd选项参数
- Apache htpasswd命令
- apache htpasswd 命令
- apache htpasswd命令用法
- 使用apache htpasswd命令
- apache htpasswd 命令
- apache命令htpasswd生成AuthUserFile
- apache htpasswd命令用法详解
- Linux -apache - htpasswd命令详解
- Linux -apache - htpasswd命令详解
- Apache htpasswd命令用法详解
- apache命令htpasswd生成AuthUserFile
- 用Apache htpasswd管理SVN帐户
- 用Apache htpasswd管理SVN帐户
- shell转义符学习笔记
- shell退出和退出状态学习笔记
- 一些shell脚本。
- LINUX set 和 shopt
- 一个简要的正则表达式介绍
- apache+htpasswd
- dsh批量管理linux服务器
- sed 用法
- CentOS内核升级
- Sublime Text 2 设置文件详解
- joc3 例子
- shell 十三问?
- 查看linux硬件信息
- Linux find