黑客防线,在攻与防的对立统一中寻求突破!2001年创刊的黑客技术专业刊物!

设为首页
收藏本站
联系我们
网站导航

黑客文章 - 工具使用 - 浏览 - Linux操作系统下Apache配置虚拟主机+SSL

Linux操作系统下Apache配置虚拟主机+SSL

黑客 发布日期:2008-6-15 1:16:53 共有 259 人次浏览
来源:赛迪网 作者:korn

 

1.下载httpd软件,编译Apache:

 

./configure --enable-ssl(使之支持SSL)

 

make

 

make install

 

2.httpd.conf中把#Include conf/exta..vhosts.conf前的#去掉

 

在vhosts.conf中配置:

 

DocumentRoot:usr/local/w1

 

ServerName:www.shnu1.cn

 

order deny,allow

 

allow from all

 

(添加访问网页的权限)

 

3.windows的system32下的hosts文件中添加:

 

10.10.134.26 www.w1.com

 

10.10.134.26 www.w2.com

 

4. 在w1和w2文件夹下分别创建w1.htm和w2.htm

 

5. 重启Apache:usr/local/apache2/bin/apachecl1 restart

 

6.IE地址栏分别输入w1.com和w2.com,测试w1.htm和w2.htm

 

7.生成证书

 

cd /usr/local/apache2/conf

 

openssl req -new -x509 -nodes -out server.crt -keyout server.key

 

httpd.conf中打开httpd-ssl.conf配置即可。

所属分类: 工具使用     网摘收藏: Google 雅虎 百度 POCO 365key 和讯 天极