简体   繁体   English

如何在Mac OS上启用HTTPS连接?

[英]How can I enable a HTTPS connection on my Mac OS?

I am developing a Ruby on Rails application on my Mac OS with "Snow Leopard" 10.6.5 and for this I need to use locally a Hypertext Transfer Protocol Secure (HTTPS) connection. 我正在Mac OS上使用“ Snow Leopard” 10.6.5开发Ruby on Rails应用程序,为此,我需要在本地使用超文本传输​​协议安全 (HTTPS)连接。

How can I set my machine to do that? 如何设置我的机器来做到这一点? What I have to install? 我必须安装什么?

I presume you're using the built-in web server enabled when you "enable web sharing". 我假设您正在使用“启用网络共享”时启用的内置网络服务器。 That server is Apache, so google for "enable SSL in Apache". 该服务器是Apache,因此Google要求“在Apache中启用SSL”。

Short form is that it's easy to do but you need a an x509 certificate, a "cert"; 简短的形式是,它很容易实现,但是您需要一个x509证书,一个“ cert”证书; a self-generated cert will work but you'll have to tell your browser to trust it. 自行生成的证书可以使用,但是您必须告诉浏览器信任它。

Back when I last set up my server, I found Apple´s documentation to be very helpful: 上一次设置服务器时,我发现Apple的文档非常有帮助:

http://developer.apple.com/internet/serverside/modssl.html http://developer.apple.com/internet/serverside/modssl.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM