[Tutorial] How to secure OLS/LSWS webadmin console with valid SSL certficate. — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberHosting

[Tutorial] How to secure OLS/LSWS webadmin console with valid SSL certficate.

Hi,

This is a guide for how to secure OLS/LSWS webadmin console with a valid SSL cert (e.g. Let's Encrypt cert of your website.)

1. verify the cert is working properly by access your site.

2. login to server SSH , navigate to "/etc/letsencrypt/live" , all Let's Encrypt cert are stored there.

3. now go to the folder of domain you want to use to secure webadmin.

you will see 3 files

cert.pem, fullchain.pem and privkey.pem
[[email protected] ]# ls -l /etc/letsencrypt/live/example.me
Total 12
-rw-r--r-- 1 root root 1903 Mar 26 12:02 cert.pem
-rw-r--r-- 1 root root 3551 Mar 26 12:02 fullchain.pem
-rw------- 1 root root 1675 Mar 26 12:02 privkey.pem
4. now navigate to "/usr/local/lsws/admin/conf" , you will see

webadmin.crt and webadmin.key

these are cert and key for webadmin https

we just need to replace the webadmin.key/crt with LE ones.
[[email protected] ]# cat /etc/letsencrypt/live/example.me/fullchain.pem > /usr/local/lsws/admin/conf/webadmin.crt
[[email protected] ]# cat /etc/letsencrypt/live/example.me/privkey.pem > /usr/local/lsws/admin/conf/webadmin.key
now restart it to make it effect.

`systemctl restart lsws`

access https://DOMAIN.COM:7080 you should now see it's valid and secure.

:)

Comments

  • Works great! :smile: thanks for the guide
  • For me the webadmin cert and key were actually in another subdirectory:

    /usr/local/lsws/admin/conf/cert/

    and named simply admin.crt and admin.key

    Apart from that the instructions are super simple and worked perfectly :-)
  • I am Newbie and use Linode WEBLISH.
    I have no way to put the command everything in the line of SSH.

    "[[email protected] ]# cat /etc/letsencrypt/live/example.me/fullchain.pem > /usr/local/lsws/admin/conf/webadmin.crt

    [[email protected] ]# cat /etc/letsencrypt/live/example.me/privkey.pem > /usr/local/lsws/admin/conf/webadmin.key"

    Can somebody help me, please?
  • If you do not have ssh access you can change it manually in the ols webadmin itself.
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    https://www.cyberhosting.org
    You can now earn with the Cyberhosting affiliate scheme. Join today
    https://www.cyberhosting.org/affiliates/
  • edited June 14
    guys, I have upgraded the cyber panel to 2.0.1 after that install SpamAssassin then mail scanner then apply the given method and access the lsws admin link error refuse to connect what I can do
  • neither of those is connected in anyway to lsws admin.

    try restarting the service

    systemctl restart lsws
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
    https://www.cyberhosting.org
    You can now earn with the Cyberhosting affiliate scheme. Join today
    https://www.cyberhosting.org/affiliates/
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!