Letsencrypt ssl certificate not working subdomain with port number

installed erp application with customised port 8090 and configure letsencrypt ssl certificate
for
https://erp.domain.com:8090 its not working in browser but
without port number the above erpnext subdomain works fine
i.e erp.domain.com:8090 with customised port with ssl not working , without mentioning port number erp.domain.com works fine for letsencrypt ssl certificate , any clues to solve the issue to fix letsencrypt ssl certificate for erpnext subdomain with custom port

1 Like

Hello :slightly_smiling_face:

There is a strong likelihood that your apache configuration simply lacks the necessary SSL/TLS directives in the VirtualHost listening on port 8090.

SSL/TLS Strong Encryption: How-To - Apache HTTP Server Version 2.4

I incorrectly analyzed a sample domain. Silly me.

...and if the virtual host configuration @griffin mentioned isn't what's going on, how about telling us what's happening? "Not working" only tells us that what you expect to happen, and what's actually happening, aren't the same. But what is happening?

2 Likes

my webserver is nginx and the error is

ERR_SSL_PROTOCOL_ERROR

and the nginx log file says - - [23/Feb/2021:07:23:40 +0000] “\x16\x03\x01\x02\x00\x01\x00\x01\xFC\x03\x03\xB7\xBFi\x04\xE8\x98\xB4\x1F\xCDNM8\x99R\x10\x1D]1\xB7\xC6}\x19\x01y\x91ct\x8CSVfH ao\xCF84\x96\xC08\xE2\xDA(\xB2\x91~\xDEX\x15ZC\x17a\xA2\xC6\xBCC?v\xCD\xDE\x12$\xC6\x00 \xAA\xAA\x13\x01\x13\x02\x13\x03\xC0+\xC0/\xC0,\xC00\xCC\xA9\xCC\xA8\xC0\x13\xC0\x14\x00\x9C\x00\x9D\x00/\x005\x01\x00\x01\x93ZZ\x00\x00\x00\x00\x00\x11\x00\x0F\x00\x00\x0Cerp.hashq.in\x00\x17\x00\x00\xFF\x01\x00\x01\x00\x00” 400 182 “-” “-”

Hi @tkdhanasekar

your domain name is required if you want help.

PS: There

is your domain name. So checking https://erp.hashq.in:8090/ your error is:

SSL_ERROR_RX_RECORD_TOO_LONG

So your error message is incomplete, that's one reason the domain name is always required.

The error says: Your port 8090 is a http port, not a https port.

-->> Wrong configuration, change that.

2 Likes

my domain name is https://hashq.in works fine
subdomain https://erp.hashq.in:8090 not working
error msg ERR_SSL_PROTOCOL_ERROR
but https://erp.hashq.in works fine

I concur completely with @JuergenAuer. It is clear that erp.hashq.in:8090 is configured for http and not https.

Simply visit https://erp.hashq.in:8090/ and http://erp.hashq.in:8090/ then observe which one shows an error and which one is working.

1 Like

So this goes back to what @griffin initially said--your virtual host configuration is incorrect--even if he linked to instructions for the wrong webserver (if you'd answered the questions you were presented with when you started this topic, he would have known better). Fix it. But be aware that you can't serve both http and https on the same port. You may want to serve http on 8090 and https on 8091, for example. Or, better yet, keep them on the standard ports rather than running on non-standard ports.

3 Likes

OT: It's possible to use both protocols with the same port.

Software like

are able to do that.

So only one port is required to run such a software via http and https. See VestaCP: http has a redirect to https, https + / redirects to /login/

3 Likes

To reconcile these observations, we could say that some software has clever tricks to allow this, but most web servers won't make it straightforward to do this out-of-the-box.

1 Like