Help with moving a WordPress OLS VM to Docker containers

#1
Hello,

I'm moving a WordPress site using OpenLitespeed from an EC2 instance to Docker containers (based on openlitespeed:1.7.19-lsphp81), which will run on Amazon ECS. I'm using an external database for the site.

1. After moving the application to ECS, I want to be sure the Litespeed configuration with the current settings is transferred from the current site to the containers. Which files from the current Litespeed configuration should I move to the containers to ensure the website will work properly?

2. My other question is regarding certificates. I'll use certificates from AWS ACM with a Load Balancer (ALB) so the HTTPS listener will terminate the SSL connections and pass the decrypted traffic to LiteSpeed over HTTP. In this case, how should the certificates be set up for the Litespeed HTTPS listener? Which paths should I set up for the Certificate and Private Key files?

Thanks in advance.
 

Cold-Egg

Administrator
#2
1. The OLS Docker container uses the Virtual host template by default, so you might want to configure it manually.
2. My guess is, to let ALB take care of the HTTP/HTTPS, and your back-end service connection via HTTP only.

Note, that you might need to overcome the cache problem for multiple instances under the ALB, because ALB does not recognize those LiteSpeed cache headers, it won't purge backend cache at the same time. Setup a cache folder sync may be a good idea.
 
#3
@Cold-Egg, thank you for your suggestions.

I moved only these files, and the containers are working fine:
- /usr/local/lsws/conf/example.crt
- /usr/local/lsws/conf/example.key
- /usr/local/lsws/httpd_config.conf
- /usr/local/lsws/vhosts/wordpress/vhconf.conf
- /usr/local/lsws/admin/conf/admin_config.conf
- /usr/local/lsws/htpasswd
 
Top