多个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名称即可。
阅读(388) | 评论(0) | 转发(0) |