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


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/
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/ > /usr/local/lsws/admin/conf/webadmin.crt
[[email protected] ]# cat /etc/letsencrypt/live/ > /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.



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!