/var/www/html doesn't seem to work with OpenLiteSpeed?

open4biz

Verified User
Joined
Mar 22, 2009
Messages
124
Hi All,

I'm trying to triangulate an issue with a new DA install which manifested when I tried to spin up a Let's Encrypt certificate for the hostname of the server. I can curl it:

Code:
root@servername:/var/www/html# curl -I -L -k -X GET http://servername.com/.well-known/acme-challenge/test.txt
HTTP/1.1 200 OK
etag: "a-6014b920-18174a;;;"
last-modified: Sat, 30 Jan 2021 01:40:48 GMT
content-type: text/plain
content-length: 10
accept-ranges: bytes
date: Sat, 30 Jan 2021 02:08:40 GMT
server: LiteSpeed
connection: Keep-Alive

But I can't seem to serve the test file through OpenLiteSpeed. The shared server apps (e.g. Roundcube, phpMyAdmin) in the same directory tree don't come up either.

It looks like maybe OLS isn't configured to use the /var/www/html directory as its default web folder? Not sure. I'm really scratching my head at this point.

Other things I've tried: I worked through the Manually debugging /.well-known/acme-challenge/letsencrypt_12345 how-to. I can hit the OLS control panel on the serve in read-only mode. TCP ports 80 and 443 open on both CSF and Oracle Cloud's egress security rules. I thought it could be firewall thing as well, which is why I tore into this document and this page.

Thank you for any help in advance!
 
Last edited:
Well this proved to be a hairball because the symptoms had me diving down rabbit holes, trying to eliminate one possibility after another:
  1. Was there was a problem with the Oracle Cloud instance's security list (firewall) ingress rules? (Pro tip:
  2. Was there a problem with ConfigServer Firewall or how it was set up?
  3. Were there any other firewalls running, which might have been installed with the Oracle Cloud Compute Instance's ubuntu image?
  4. Was OpenLiteSpeed running correctly and listening to the right ports?
  5. Was /etc/hosts set up correctly?
After many, many hours chasing all the potential leads a second dive into this webserver error

[ERROR] Hostname [*] on listener [x.x.x.x:80] is mapped to virtual host [x.x.x.x], can't map to virtual host [hostname]!

produced the solution needed because an Oracle Cloud compute instance is a LAN installation.

As such I might suggest the DA LAN installation script(s) include this for OLS so no one has to pull their hair as I did.

Cheers
 
It would happen on any provider which tucks away slices behind a network address table (NAT), which is pretty rare. Most providers assign you an IP address which is directly exposed to the internet.
 
Back
Top