how to setup and access OLS Web admin?

#1
I just deployed openlitespeed-wordpress on GCP and want to setup SSL. I'm stuck at accessing the OLS WebAdmin.

So far here's what I know that need to be done (appreciate if anyone can point out any mistakes)

1. SSH from VM instances

2. install Certbot to get Let's Encrypt cert
Code:
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot
2. Get the certificate and chain
Code:
/etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem
/etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem
3. Configure OpenLiteSpeed for SSL - STUCK
 
#3
Thanks Eric! For Step #3, it states "An interactive script that runs will first prompt you for your domain or subdomain."

Is there a command to run this script? My steps before this V(M Instances > connect via SSH) just brings me to a prompt screen

I managed to access OLS webadmin thanks for this!
 

Cold-Egg

Administrator
#7
You probably complete it before. If not, download the script and add +x permission to it, then run it.

Code:
wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/domainsetup.sh
chmod +x domainsetup.sh
./domainsetup.sh
 
#8
Hi Eric, I verified my email, but get this error now:

Code:
The following error was encountered:
[Errno 13] Permission denied: '/var/log/letsencrypt/.certbot.lock'
Either run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.
Oops, something went wrong...
 
#10
Hi Eric, I managed to create my cert using

certbot certonly --webroot -w /var/www/html/ -d example.com -d www.example.com

Have also gone through :Step 4. Set SSL for HTTPS
and Step 5. Redirect HTTP to HTTPS

What are my next steps?

Do I have to go into WordPress Address (URL) and Site Address (URL) and change it from http > https?

Many thanks!
 
#11
Hi Eric, I've used the Really Simple SSL plugin on Wordpress and now it's secured! Should there be anything else about SSL that I should do/best practices?
 

Cold-Egg

Administrator
#12
Yes you can " go into WordPress Address (URL) and Site Address (URL) and change it from http > https ".

Since you already have the HTTP/HTTPS available and force HTTPS, I don't think you need very simple SSL more.
 

Cold-Egg

Administrator
#16
Check with command:
Code:
grep 'certbot -q renew' /etc/cron.d/certbot
This is default certbot rule.
Code:
0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew
If renew set for litespeed, should looks like this:
Code:
0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew --deploy-hook "/usr/local/lsws/bin/lswsctrl restart"
 
#17
Wow thanks Eric! I input the command

Code:
grep 'certbot -q renew' /etc/cron.d/certbot
and it returned

Code:
0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew
This means auto-renew is not set, correct?
 
Top