Urgent.News

What's breaking now, across thousands of outlets.

Tech

Installing OpenLiteSpeed on Ubuntu 22.04

OpenLiteSpeed is a free, open-source, high-performance web server with HTTP/2 and HTTP/3 support, native PHP handling, and a graphical admin console for managing virtual hosts. This guide installs it on Ubuntu 22.04, creates a virtual host with a custom web root, and secures it with a real TLS certificate. Prerequisites: an Ubuntu 22.04 instance, non-root sudo user, a domain A record (e.g.…

OpenLiteSpeed is a free, open-source web server supporting HTTP/2 and HTTP/3, PHP, and a graphical admin console. This guide installs it on Ubuntu 22.04, creates a virtual host with custom web root, and secures it with a TLS certificate. Prerequisites include an Ubuntu 22.04 instance, non-root sudo user, and a domain A record.

To install OpenLiteSpeed, use the official setup script: wget the script, run it with sudo, and install the package with sudo apt. The service runs as lshttpd.service and can be started, enabled, and checked with systemctl.

Access the admin console on port 7080 using the default password located at /usr/local/lsws/admin/password. Set a custom admin password, allow port 7080, and visit the console URL. Move the default listener to standard HTTP by editing the listener settings.

Create a new virtual host by making directories for the site and setting permissions. Log into the console, add a new virtual host with your domain, and set the document root. Save the configuration when prompted. Access the new virtual host, enable compression, and configure logs.

Add rewrite rules, configure listeners, and add the domain to the virtual host mappings. Save the changes and restart the service. Create a test HTML file, allow ports 80 and 443, and visit the domain to confirm the page loads. Secure the site with Let's Encrypt using certbot, generate a certificate, and add it to the HTTPS listener. Repeat the process for additional virtual hosts and automate certificate renewal.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Wednesday 26 August →