OpenLiteSpeed is a free web server that is fast, secure, and easy to use. It is developed by LiteSpeed Technologies and is compatible with Apache configuration files, which makes it easy to install and migrate from other web servers like Apache and Nginx. OpenLiteSpeed is extremely fast, capable of handling a large number of requests in a short amount of time and scaling easily. It is secure, providing many features for protection against attacks and also provides tools for optimizing websites. OpenLiteSpeed also has a large number of modules and plugins that can be used to add additional functionality to the web server.
OpenLiteSpeed (AlmaLinux 8)
- OS: almalinux 8
Description
Software included
Package | Version |
---|---|
OpenLitespeed | latest |
PHP | 8.1 |
Docker | 3.20.10 |
Docker compose | 2.12.2 |
containerd.io | 1.6.10 |
Initial start of the service
This application uses Docker to provide faster startup of the accompanying software (OpenLiteSpeed) and direct use. This eliminates the need to familiarize yourself with its specifics in terms of configuration and installation. To start working directly with the application, all you need to do is visit the IP address assigned to your virtual machine in your browser to view your new OpenLiteSpeed installation.
Note: By default, OpenLiteSpeed can be accessed directly by IP address. To start using OpenLiteSpeed with your real domain, you first need to point the domain in question to your IP address and change the settings for where OpenLiteSpeed opens from through its admin panel.
Quick settings and frequently asked questions
- Logging into the cloud service is done using an SSH key or password that you have specified.
- Docker is installed as recommended by the official docker documentation.
- The standard
docker
anddocker compose
commands are now available in this application. - When the virtual machine is first started, it takes a few minutes before a Docker container containing Wordpress and OpenLitespeed is started.
- OpenLiteSpeed data is set to be persistent and is located in
/opt/ols/ols-docker/sites/localhost/html/
. - The installation also has PHPMyAdmin which you can access on port 8080 or 8443.
Setting OpenLitespeed Webadmin password
By default, after startup the OpenLitespeed password for access to its panel is not set. We recommend changing it as soon as you start your service. The replacement is done with the following commands:
cd /opt/ols/ols-docker/
bash bin/webadmin.sh password # Replace 'password' with the password you want to set
After changing your password, you can access your OpenLitespeed panel on port 7080 with the user admin
.
Add and remove a new site
Adding a new site is done using the following commands:
cd /opt/ols/ols-docker/
bash bin/domain.sh --add example.com # Replace 'example.com' with the domain you want to add
cd /opt/ols/ols-docker/
bash bin/domain.sh --del example.com # Replace 'example.com' with the domain you want to remove
Letsencrypt
If you want to use Letsencrypt, you need to do an initial installation, this is done with the following command:
cd /opt/ols/ols-docker/
bash /bin/acme.sh --install --email user@example.com # Replace 'user@example.com' with your email address
After initial installation, we can issue a new certificate:
cd /opt/ols/ols-docker/
bash bin/acme.sh --domain example.com # Replace 'example.com' with the domain for which you are issuing a certificate. It should already be pointed to your IP address
Other useful parameters:
- [-r, --renew]: Renewing a specific domain, optional -D or --domain parameter to specify the domain name. To force a renewal, use the -f parameter.
- [-R, --renew-all]: Renew all domains if possible. To force a renewal, use the -f parameter.
- [-f, -F, --force]: Force a renewal.
- [-v, --revoke]: Domain certificate revocation.
- [-V, --remove]: Remove domain from Letsencrypt configuration.
Updating the web server
cd /opt/ols/ols-docker/
bash bin/webadmin.sh --upgrade
Working with Docker
The organization of this application is entirely done using Docker. In this way, we can provide you with ready-made applications faster. In addition, their configuration is more flexible and quite controllable. To be able to control this application, however, you need to know some basic Docker functionalities and features.
Restarting all services
Restarting the database and the Docker container that contains Open LiteSpeed itself, along with the rest of the software, can be done in two ways:
- By restarting the entire virtual machine
- Restarting the Docker containers, which is the faster option. To do this, access your machine via SSH, and run the following commands:
sudo su -
cd /opt/ols/ols-docker/
docker compose restart
Recreating Docker containers
Recreation of a docker container may be necessary if you've changed the configuration inside the docker-compose.yml
file. If there are changes, please follow these steps:
cd /opt/ols/ols-docker/
docker compose stop
docker compose up -d
Checking the status of the Docker application
To check, you need to run the following commands:
sudo su -
docker ps -a
Please pay attention to the STATUS
column. It should show how long the service has been running, for example Up X minutes
. If the status is Restarting
then you need to check what is wrong with the application. In such a case, you can check by following the application logs as follows:
- Get the application's name that you can see in the
NAMES
column from the output of thedocker ps -a
command. View the logs with thedocker logs <NAME>
command, whereis the name of the container.