Chinaunix首页 | 论坛 | 博客
  • 博客访问: 238046
  • 博文数量: 79
  • 博客积分: 1942
  • 博客等级: 上尉
  • 技术积分: 910
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-19 16:17
文章分类

全部博文(79)

文章存档

2011年(1)

2010年(50)

2009年(28)

分类: LINUX

2010-05-24 17:22:23

多个vhost需要添加vhost web验证
 
批量添加vhost配置文件
 
[root@test extra]# sed '/Options/r th.txt' httpd-vhosts32.conf |sed 's/AllowOverride All//g'|sed 's/Order allow,deny//g'|sed 's/Allow from all//g' >>tmp.conf
 
th.txt 文件内容:
 AuthName "tel me you passwd"
  AllowOverride AuthConfig
   AuthType Basic
  AuthUserFile /usr/local/apache/passwd/.htpasswd
require valid-user
 
 
最后把tmp.conf mv成vhost名称即可。
阅读(347) | 评论(0) | 转发(0) |
0

上一篇:shell+飞信实现网站监控

下一篇:find范例

给主人留下些什么吧!~~