Turns out I'm trying to mount a https web server and when I try it I get an error, the code is as follows:
with this code generate the certificate:
require 'webrick'
require 'webrick/https'
cert_name = [
%w[CN localhost],
]
server = WEBrick::HTTPServer.new(:Port => 8000,
:SSLEnable => true,
:SSLCertName => cert_name)
After generating it, edit the file and put this:
require 'webrick'
require 'webrick/https'
require 'openssl'
cert = OpenSSL::X509::Certificate.new File.read '/path/to/cert.pem'
pkey = OpenSSL::PKey::RSA.new File.read '/path/to/pkey.pem'
server = WEBrick::HTTPServer.new(:Port => 8000,
:SSLEnable => true,
:SSLCertificate => cert,
:SSLPrivateKey => pkey)
and I get this error:
./Servidorweb.rb:11:in 'read': No such file or directory @ rb_sysopen - /path/to/cert.pem (Errno::ENOENT)
from ./Servidorweb.rb:11:in '<main>'
Does anyone know what can be done? probe with port 9000 and also gives me error