如何为Mac设置Apache的SSL,以便我可以在IE8上测试跨域iFrame [英] how to set up SSL for Apache for a Mac so I can test Cross Domain iFrame on IE8

查看:97
本文介绍了如何为Mac设置Apache的SSL,以便我可以在IE8上测试跨域iFrame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用标准的自签名ssl mods将Apache设置为我的http.conf,这在我的Mac上本地工作,但当我尝试从我的Windows机器上使用IE8访问它时似乎没有像证书一样。

I set up Apache on with the standard self-signed ssl mods to my http.conf, and this is working locally on my mac, but when I try to access it from my windows machine with IE8 it doesn't seem to like the certificate.

我试图将证书导入Windows - > Internet Options模式,但这似乎不适用于访问iFrame交叉域。 IE显示页面底部的黄色警报警告iFrame,但不加载该域中的其他文件。在我接受警报后,页面重新加载并发生同样的事情。

I've tried to import the certificate into the Windows -> Internet Options modal, but that just doesn't seem to work for accessing the iFrame cross domain. IE shows that yellow alert at the bottom of the page warning about an iFrame, but doesn't load the other files from that domain. After I accept the alert, the page reloads and the same thing occurs.

在生产中,这适用于真实的证书。

In production this works with the real certs.

关于我的开发环境和我的证书可能出现什么问题的任何想法?

Any ideas on what might be wrong with my development environment and my certs?

更新

我在管理员模式下打开了命令行并刷新了缓存。没有帮助。
我能够ping通域名并获得正确的IP。

I opened the command-line in admin mode and flushed the cache. No help. I am able to ping the domain name and get the correct IP back.

IE报告:本网站提供的安全证书是为一个不同的网站地址。

更新2

http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI

上面的文章涉及从一台机器(Mac OSX)运行两台SSL服务器的一些关键问题。无论如何学习基于NameBased的SSLVirtualHosts和SNI,我不认为这是我遇到的问题,但它可能是相关的。 IE报告服务器域和证书不匹配。所以我想知道这是否与我使用两个SSL域的全局证书有关。

The above article touches on some of the key problems with running two SSL servers off of one machine (Mac OSX). However learning something about NameBased SSLVirtualHosts and SNI, I don't think it's the problem I am having, but it might be related. IE is reporting that the server domain and the cert don't match. So I wonder if this is related to me using a global cert for both SSL domains.

更新3 (解决方案)

https:// serverfault。 com / questions / 393363 / mismatched-address-error-on-self-signed-ssl-certtificate

事实证明通用名称证书是错误的,这使得证书可以在FF和Chrome中运行,但不能在IE8,IE9,IE10中运行。在生成新证书作为通配符后,我可以通过SNI访问所有基于NameBased的SSL虚拟主机。所以将你的公共名称设置为 *。YourDomain.tld ,你会没事的。

It turns out that the common name for the certificate was wrong, which allowed the certificate to work in FF, and Chrome, but not in IE8, IE9, IE10. After generating a new certificate as a wild card, I was able access all of the NameBased SSL Virtual Hosts via SNI. so set your common name to *.YourDomain.tld and you will be fine.

推荐答案

我遇到的问题是证书中指定的公共名称不是我托管的域名的正确域名。相反,我使用的是公司名称的通用名称,这根本不是域名。

The problem I was having is that the Common Name specified in the certificate was not a proper domain name for the domains I was hosting. Instead I was using a 'common name' for our company name, which was not a domain name at all.

如果您要生成自签名证书,您可能会想要使用公共名称,如* .domain.tld来生成 star.domian.tld.key star.domain.tld.crt

If you are going to generate a self signed certificate you might want to use a Common Name like *.domain.tld to generate your star.domian.tld.key and star.domain.tld.crt

这篇关于如何为Mac设置Apache的SSL,以便我可以在IE8上测试跨域iFrame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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