SSR Errror: Failed to load key file

#1
I want to access ols web panel on a ssl. https://serverip:7080

I am following this tutorial to setup ssl on server IP.

https://openlitespeed.org/kb/ssl-setup/

I am getting these errors

https://prnt.sc/po5dyv

[SSL] Config SSL Context with Certificate File: /usr/local/lsws/conf/server.csr and Key File:/usr/local/lsws/conf/server.key get SSL error: error:0900006e:pEM routines:OPENSSL_internal:NO_START_LINE:Expecting: CERTIFICATEerror:0900006e:pEM routines:OPENSSL_internal:NO_START_LINE:Expecting: CERTIFICATEerror:10000009:SSL routines:OPENSSL_internal:pEM routines

ERROR[config:server:listener:ssl:ssl] failed to create new SSLContext for *:7080

Sometimes I also get

ERRORFailed to load key file /usr/local/lsws/conf/server.key and cert file /usr/local/lsws/conf/server.csr

https://prnt.sc/po5el5

I have made sure keys are there. I wonder what am I doing wrong?

Thank you.
 
#2
turned out I was using server .csr instead of crt. I figured that part out now. but when I try to create a listened on serverIP that is secure it says ssl is already in use.

I see below config is already added in

listener adminListener{
address *:7080
secure 1
keyFile $SERVER_ROOT/admin/conf/webadmin.key
certFile $SERVER_ROOT/admin/conf/webadmin.crt
clientVerify 0
}

when I try to add a listener for that port inside of openlitespeed I get an error saying certificate already in use and access to server ip:7080 still stays non secure.
 
#6
Hey Dave,

I know it made to work with ssl by default but it shows the ssl connection as unsecure. I am trying to make it so it is a secure connection on port 7080
 
#9
my quest to make access to openlitespeed webserver continues. Here are the updates.

I went to this settings and tried to install a correct ssl certificate to this listener
https://prnt.sc/pox0x8

I am using ssl certificate now with symbolic links.

ln -s /etc/letsencrypt/live/ols.domain.com/fullchain.pem /usr/local/lsws/admin/conf/webadmin.crt
ln -s /etc/letsencrypt/live/ols.domain.com/privkey.pem /usr/local/lsws/admin/conf/webadmin.key

I set it to accept the ssl protocols
https://prnt.sc/pox1kh

Restarted the panel. But it still stays unsecure... https://prnt.sc/pox1vb

Can someone please help me figure out how can access ols webpanel on a secure connection? Please.
 

David

Active Member
#14
Please check what you set in your
admin/conf/admin_config.conf

For my test server, I set to
Code:
listener adminListener {
  address                 *:7080
  secure                  1
  keyFile                 $SERVER_ROOT/admin/conf//privkey.pem
  certFile                $SERVER_ROOT/admin/conf/fullchain.pem
  certChain               1
  clientVerify            0
}
which is actually default and it works.
 
#15
that's exactly what I have and it just does not want to load the page. Moment I add domain to the equation page just keeps timing out. It will always load the web panel on server ip though.
 
Top