如何安装了mod_ssl为Apache httpd的? [英] How to install mod_ssl for Apache httpd?

查看:353
本文介绍了如何安装了mod_ssl为Apache httpd的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

确定

因此​​,我安装apache httpd的前一段时间,最近回来给它尝试建立SSL得到它提供几种不同的Tomcat服务器。

So I installed Apache httpd a while ago and have recently come back to it to try setup SSL and get it serving several different tomcat servers.

目前我有两个完全独立的Tomcat实例提供高达略有不同的版本(一个用于开发,一个用于演示说)我的web应用到两个不同的端口;
    mydomain.com:8081和mydomain.com:8082

At the moment I have two completely separate tomcat instances serving up to slightly different versions (one for dev and one for demo say) my web app to two different ports; mydomain.com:8081 and mydomain.com:8082

我已经成功(回月)使用的mod_jk获得的httpd服务同样的Tomcat实例来 HTTP:// WWW。 mydomain.com:8090/dev http://www.mydomain.com:8090/demo ( 8090因为我已经有了8080通过码头在这个阶段使用以下code在httpd.conf中运行)另一个应用程序;

I've successfully (back in Jan) used mod_jk to get httpd to serve those same tomcat instances to http://www.mydomain.com:8090/dev and http://www.mydomain.com:8090/demo (8090 cos I've got another app running on 8080 via Jetty at this stage) using the following code in httpd.conf;

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug

<VirtualHost *:8090>
    JkMount /devd* tomcatDev
    JkMount /demo* tomcatDemo
</VirtualHost>

什么我没有试图做的是启用SSL

What I'm not trying to do is enable SSL

我添加以下内容的httpd.conf

I've added the following to httpd.conf

Listen 443
<VirtualHost _default_:443>
    JkMount /dev* tomcatDev
    JkMount /demo* tomcatDemo
    SSLEngine on
    SSLCertificateFile "/opt/httpd/conf/localhost.crt"
    SSLCertificateKeyFile "/opt/httpd/conf/keystore.key"
</VirtualHost>

但是,当我试图重新启动Apache以apachectl中重启(是关闭其他应用程序,我提到所以也没有玩具与HTTPS连接后)我不断得到错误;

But when I try to restart Apache with "apachectl restart" (yes after shutting down that other app I mentioned so it doesn't toy with https connections) I continuously get the error;

命令无效的SSLEngine,也许不包括在服务器配置中的模块拼写错误或定义。httpd的不运行,尝试启动

我看了在的httpd /模块目录确实没有了mod_ssl,只有mod_jk.so和httpd.exp。

I've looked in the httpd/modules dir and indeed there is no mod_ssl, only mod_jk.so and httpd.exp.

我用yum安装mod_ssl的尝试,它说,它已安装。事实上,我可以找到mod_ssl.so在/ usr / lib中/的httpd /模块,但是这是不是路径的地方,我已经安装的httpd这是/ opt / httpd和实际上/ usr / lib目录/ httpd的只含有模块目录

I've tried using yum to install mod_ssl, it says its already installed. Indeed I can locate mod_ssl.so in /usr/lib/httpd/modules but this is NOT the path to where I've installed httpd which is /opt/httpd and in fact /usr/lib/httpd contains nothing but the modules dir.

谁能告诉我如何正确安装了mod_ssl我安装httpd的位置,所以我可以突破这个错误:

Can anyone tell me how to install mod_ssl properly for my installed location of httpd so I can get past this error:

推荐答案

任何其他的LoadModule 命令中的 / usr / lib目录引用模块/的httpd /模块文件夹?如果是这样,你应该罚款只是添加的LoadModule ssl_module /usr/lib/httpd/modules/mod_ssl.so 你的conf文件。

Are any other LoadModule commands referencing modules in the /usr/lib/httpd/modules folder? If so, you should be fine just adding LoadModule ssl_module /usr/lib/httpd/modules/mod_ssl.so to your conf file.

否则,你要复制的 mod_ssl.so 文件的任何目录正在从加载的其他模块,并引用它。

Otherwise, you'll want to copy the mod_ssl.so file to whatever directory the other modules are being loaded from and reference it there.

这篇关于如何安装了mod_ssl为Apache httpd的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆