Setup Lucee with OPS (LiteSpeed)

Do you happen to have a simple instruction list or better yet, an example config file for simple self-hosted OLS + Lucee config (no WP or Cyberpanel hosting, nor Docker)?

1 Like

Do you want to host just one domain on the instance?

Negative. I intend to run multiple domains under one instance of OpenLiteSpeed as a web server that sends just the CFM requests to (also 1 instance of) Lucee app server, both installed “natively” (directly) without the need of Docker, WP or anything else. Why complicate it more than this?

I found an online Apache httpd config file converter to oLSWS, but it doesn’t do it very well beyond basic virtualhosts listing. So if you happen to have a functioning config file, I would really appreciate it. Thank you.

If you want to host more than one site in Lucee, you’ll need to mimic the mod_cfml headers in your Litespeed server and make sure you have the Mod CFML Tomcat valve installed on the Lucee side.

If your goal is just the simplest server setup possible, have you considered CommandBox? It has the web server built in for you (based on JBoss Undertow) and you can activate ModCFML as a built in feature and spoof the headers all within your server.json file. It does have a few limitations currently, such as if you need different SSL certs per host, etc.

Also, I moved this to a new topic.

1 Like

UPDATE: SUCCESS! Managed to make Lucee work with OpenLiteSpeed, no CommandBox needed, no Docker, clean, simple and purely “vanilla” via port localhost:8009
(will be also testing UDS connection once Tomcat gets upgraded to Java 17 in Lucee)


Screenshot 2023-08-29 at 00-47-00 LiteSpeed WebAdmin Console

The only thing that bugs me is why we need to configure the Virtual Hosts in Tomcat’s server.xml as well, when it should be just an internal script processing request from OLS <~> Tomcat AJP ?
(web server & Lucee on the same machine)

<Host name="mysite1.com" appBase="webapps">
   <Context path="" docBase="/srv/webroot/mysite1.com/www">
   <Alias>*.mysite1.com</Alias>
</Host>

<Host name="mysite2.com" appBase="webapps">
   <Context path="" docBase="/srv/webroot/mysite2.com/www">
   <Alias>*.mysite2.com</Alias>
   <Alias>*.mysite3.com</Alias>
</Host>

I expect this to change hopefully once UDS becomes available with Java 17 implemented?
It is really impractical to manage 2 virtual host configuration files for the exact same path & files.
Any easier way? Or perhaps to automatically update the server.xml in Tomcat via the Litespeed admin?

Normally you would to handle that with mod_cfml. (mod_cfml - Homepage)
This module creates automatically the tomcat context for you from your webserver (apache/iis/nginx) vhost.

Im not sure if there anything exists for the openlitespeed server. Probably not, since openlitespeed is not that much used by the people.
Also im not sure what exactly you mean by UDS in java 17? But i guess that this is something which is not related to the tomcat context directly.

UDS = Unix Domain Socket - a much faster and modern method of connecting (OpenLiteSpeed) to the App servers (PHP / Tomcat via Java NIO) and even databases (Postgres / MySQL), for which you would need a native JRE 16 at least or a 3rd party solution like the JUDS library or JUNIX socket

1 Like