Hello, I have an application on a bluehost VPS server (Linux centos)
It works on
http://lev.jsb.mybluehost.me:10001/ with no problem but no security.
I am trying to upload the page
https://lev.jsb.mybluehost.me:10004 using the same certificate that I have in
https://lev.jsb.mybluehost.me
I bought that certificate at ssl.com, it is not the original from bluehost
The page code is:
Sub AppStart (Args() As String)
srvr.Initialize("srvr")
srvr.AddWebSocket("/ws", "leaflet")
srvr.AddHandler("/tableHelper", "TableHelper", False)
srvr.Port = 10001
ConfigureSSL(10004)
srvr.Start
StartMessageLoop
End Sub
Public Sub Filter(req As ServletRequest, resp As ServletResponse) As Boolean
If req.Secure Then
Return True
Else
resp.SendRedirect(req.FullRequestURI.Replace("http:", "https:") _
.Replace(srvr.Port, srvr.SslPort))
Return False
End If
End Sub
Private Sub ConfigureSSL (SslPort As Int)
'example of SSL connector configuration
Dim ssl As SslConfiguration
ssl.Initialize
Log (File.DirApp)
ssl.SetKeyStorePath(File.DirApp, "/www/certs/jetty.keystore") 'path to keystore file
ssl.KeyStorePassword = "123456"
ssl.KeyManagerPassword = "123456"
srvr.SetSslConfiguration(ssl, SslPort)
'add filter to redirect all traffic from http to https (optional)
'srvr.AddFilter("/*", "HttpsFilter", False)
End Sub
The certificate is:
The code for register the certificate is:
keytool -keysize 2048 -genkey -alias jetty -keyalg RSA -keystore jetty.keystore
keytool -certreq -keyalg RSA -alias jetty -file lev.jsb.mybluehost.me.csr -keystore jetty.keystore
keytool -import -trustcacerts -alias AddTrustExternalCARoot -file addtrustexternalcaroot.crt -keystore jetty.keystore
keytool -import -trustcacerts -alias COMODORSAAddTrustCA -file comodorsaaddtrustca.crt -keystore jetty.keystore
keytool -import -trustcacerts -alias COMODORSADomainValidationSecureServerCA -file COMODORSADomainValidationSecureServerCA.crt -keystore jetty.keystore
keytool -import -trustcacerts -alias Recosfa -file lev.jsb.mybluehost.me.crt -keystore jetty.keystore