Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->网络应用 ->正文

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

来源: 作者:Webmaster 时间:2008-08-18 点击: [收藏] [投稿]

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全球同步推首个Linux桌面开源项目   下一篇:Linux Enterprise 5.0 ftp/ssh配置问题

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号