零零社区|百姓的网上家园-互动交流平台!(0.0)=^_^=(00社区)

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz

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

2013-4-7 11:00| 发布者: 123456000000| 查看: 9| 评论: 0

摘要: 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 ...
 

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配置即可。


路过

雷人

握手

鲜花

鸡蛋

相关阅读

发表评论

最新评论

相关分类


Archiver|手机版|小黑屋|00社区

GMT+8, 2023-1-31 10:50 , Processed in 0.041903 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部