首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > Apache >

在apache上经过mod_ssl配置https

2012-07-16 
在apache上通过mod_ssl配置https?1.编辑/usr/local/apache2/conf/httpd.conf#Include conf/extra/httpd-ss

在apache上通过mod_ssl配置https


?1.编辑/usr/local/apache2/conf/httpd.conf

#Include conf/extra/httpd-ssl.conf 去掉#号或者最后添加一行

?

?2.编辑/usr/local/apache2/conf/extra/httpd-ssl.conf

?

?

?

添加SSLRandomSeed startup builtinSSLRandomSeed connect builtin

?

?

3.修改虚拟机路径:

<VirtualHost *:443>#   General setup for the virtual hostDocumentRoot "/usr/local/www/test"ServerName www.test.com:443ServerAdmin test@test.comErrorLog "/var/log/httpd-error.log"TransferLog "/var/log/httpd-access.log"

?
4.设置存放证书路径

?

?

SSLCertificateFile /usr/local/apache2/conf/ssl/public.crtSSLCertificateKeyFile /usr/local/apache2/conf/ssl/private.keySSLCACertificateFile /usr/local/apache2/conf/ssl/verisign.crt

?

?

?

?

配置完毕后重启apache,通过netstat -ntlp? 查看443端口已经启用。
访问https://xxxx.xxx.com 后却报404跳转到错误页面去了,经过查看apache,jboss日志后发现没有请求转发到后端jboss。

发现原来没有用mod_jk配置请求的转发。


5.在http-ssl.conf配置请求转发。
JkMount /*.* router 必须添加否则无法使apache与jboss(tomcat)转发请求。必须添加到<VirtualHost *:443>之后,

</VirtualHost>之前的位置。
就算在你的http.conf或者mod_jk.conf文件中已经配置JkMount /*.*router,也不会生效的,所以需要重新配置一下。

JkMount /channel/* worker1JkMount /editor-admin/* worker2JkMount /*.up worker2JkMount /*.jsp worker2JKMount /servlet/* worker2

?

?

?

?

?

热点排行