这是愚蠢的荒谬,这是多么困难的设置。我已经尝试了3天了。梳理互联网和这个网站的帮助,但没有任何工作。
我想要的概念很简单。我想要一个带有ssl的inets httpd服务器。让服务器启动和运行是没有问题的...反正不是ssl。当ssl被添加进去的时候,它就不工作了。
不要问是什么错误,有很多错误,它们会根据我对配置所做的更改而改变。主要是浏览器错误,说证书没有给予做这个或那个的权限,或者如果做了更改,一系列错误和进程在erlang shell中崩溃。
我只是想知道1)我需要什么ssl证书,2)它们需要什么格式,3)在httpd服务器端,我需要什么ssl配置选项。
没有类似Apache的配置或配置文件。我想要的配置选项,这样做的编程。
如果有人能帮上忙,我洗耳恭听。
2条答案
按热度按时间8xiog9wr1#
Using Erlang R16B03 the following setup works for me:
The
cert
(server.crt) andkey
(server.key) files can be generated with:Taken from https://devcenter.heroku.com/articles/ssl-certificate-self
Assuming a
index.html
file exists indocument_root
the urlhttps://localhost:22443/index.html
should be accessible.ubby3x7f2#
This worked for me using linux OTP release 22 and windows OTP release 23:
https://127.0.0.1:9999/db/api:get
Of course my cert was not signed (had to add an exception for that in Firefox) and in windows it seems that my connection was just reset.
However curl worked for both cases and it managed to establish a connection
curl -v -k https://127.0.0.1:9999/db/api:get
It worked after I used 127.0.0.1 instead of localhost and added the modules part:
After that I got some TLS notice reports from the server and the reason it doesn't seem to work in Windows is that:
My small code just increments a counter.
EDIT:
Will make it possible to do get commands through the webbrowser, seems it defaults to an old tls version.