获取SSL与OSX阿帕奇/乘客上班 [英] Getting SSL to work with Apache/Passenger on OSX

查看:151
本文介绍了获取SSL与OSX阿帕奇/乘客上班的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Apache /乘客自己​​的计算机上,但需要添加SSL支持(东西不是通过控制面板曝光)。我在生产前已经这样做了,但由于某些原因,我似乎无法得到它在OSX工作。

I use apache/passenger on my development machine, but need to add SSL support (something which isn't exposed through the control panel). I've done this before in production, but for some reason I can't seem to get it work on OSX.

我已经按照步骤至今都从默认的Apache安装OSX:

The steps I've followed so far are from a default apache osx install:


  1. 安装的乘客和乘客preference窗格。

  2. 添加我的Rails应用程序(这工作)

  3. 创建我的ca.key,server.crt和server.key作为苹果详细网站

  1. Install passenger and passenger preference pane.
  2. Add my rails app (this works)
  3. Create my ca.key, server.crt and server.key as detailed on the apple website.

在这一点上,我需要开始编辑了Apache的configs,所以我说:

At this point I need to start editing the apache configs, so I added:

# Apache knows to listen on port 443 for ssl requests.
Listen 443
Listen 80

我想我会尝试先编辑乘客preF窗格中生成的配置使一切工作正常,当我补充一下:

I thought I'd try editing the passenger pref pane generated config first to get everything working, when I add:

它开始看起来像这样

<VirtualHost *:80>
  ServerName myapp.local
  DocumentRoot "/Users/jonnii/programming/ruby/myapp/public"
  RailsEnv development
  <Directory "/Users/jonnii/programming/ruby/myapp/public">
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

然后我的追加的这样的:

<VirtualHost *:443>
  ServerName myapp.local
  DocumentRoot "/Users/jonnii/programming/ruby/myapp/public"
  RailsEnv development
  <directory "/Users/jonnii/programming/ruby/myapp/public">
    Order allow,deny
    Allow from all
  </directory>

  # SSL Configuration
  SSLEngine on
  SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
  SSLOptions +FakeBasicAuth +ExportCertData +StdEnvVars +StrictRequire

  #Self Signed certificates
  SSLCertificateFile /private/etc/apache2/ssl.key/server.crt
  SSLCertificateKeyFile /private/etc/apache2/ssl.key/server.key
  SSLCertificateChainFile /private/etc/apache2/ssl.key/ca.crt

  SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0

</VirtualHost>

所有引用的文件存在(我翻了一番检查了),但现在当我重新启动我的Apache我甚至不能得到 myapp.local 。然而阿帕奇仍可服务器的默认页面,当我点击它的共享preference面板。

The files referenced all exist (I doubled checked that), but now when I restart my apache I can't even get to myapp.local. However apache can still server the default page when I click on it in the sharing preference panel.

任何帮助将大大AP preciated。

Any help would be greatly appreciated.

推荐答案

我认为Apache不支持虚拟主机的SSL。你可能有其他SSL虚拟主机条目的地方,这是越来越来代替。删除和它应该工作。

I think Apache doesn't support virtual hosts for SSL. You probably have another SSL virtual host entry somewhere, which is getting used instead. Remove that and it should work.

这篇关于获取SSL与OSX阿帕奇/乘客上班的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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