LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 784|回复: 6

关于apache ssl加密的问题

[复制链接]
发表于 2006-3-19 18:57:31 | 显示全部楼层 |阅读模式
<VirtualHost _default_:443>

#   General setup for the virtual host
DocumentRoot "/var/www"
ServerName 192.168.133.3:443
ServerAdmin you@example.com
ErrorLog /usr/local/apache2/logs/error_log
TransferLog /usr/local/apache2/logs/access_log


也就是只能加密/var/www下的网页了。
要加密的网页在其他目录怎么办?
发表于 2006-3-19 23:19:09 | 显示全部楼层
没理解,,解释一下?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-20 10:12:17 | 显示全部楼层
我的意思是在虚拟主机中怎么进行ssl加密,因为网页处于不同的目录中,可以复制一段下来,一样可以进行加密,以尝试成功,更改一下ssl.conf:

DocumentRoot "/var/www/XXX"
ServerName 192.168.133.3:443
ServerAdmin you@example.com
ErrorLog /usr/local/apache2/logs/error_log
TransferLog /usr/local/apache2/logs/access_log




DocumentRoot "/var/www/YYY"
ServerName 192.168.133.3:443
ServerAdmin you@example.com
ErrorLog /usr/local/apache2/logs/error_log
TransferLog /usr/local/apache2/logs/access_log

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
SSLEngine on
回复 支持 反对

使用道具 举报

发表于 2006-3-20 13:45:30 | 显示全部楼层
据我所知 在VH下部支持ssl加密
回复 支持 反对

使用道具 举报

发表于 2006-3-20 19:40:33 | 显示全部楼层
我记得:

鉴于 SSL/HTTPS 的特征,以 IP 区别的 VH 才可以用 SSL,以DNS 区别的不可以。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-21 12:45:16 | 显示全部楼层
这是vhost.conf

<VirtualHost 192.168.133.3:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot /var/www/liuqing
    ServerName www.liuqing.com
    ErrorLog logs/dummy-host2.example.com-error_log
    CustomLog logs/dummy-host2.example.com-access_log common
</VirtualHost>

<VirtualHost 192.168.133.3:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot /var/www/linux
    ServerName www.linuxlinux.com
    ErrorLog logs/dummy-host2.example.com-error_log
    CustomLog logs/dummy-host2.example.com-access_log common
</VirtualHost>
域名的虚拟主机
回复 支持 反对

使用道具 举报

发表于 2006-3-22 00:44:27 | 显示全部楼层
我说了,以 IP 区别的才可以,,以域名区别的不可以。。不用浪费时间了。

Apache 的文档 Virtual Host部分 提到:
Name-based virtual hosting cannot be used with SSL secure servers because of the nature of the SSL protocol.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表