I never did such an installation on Linux, but I’d bet it’s pretty the same as shown here with windows
I’d make sure to not have any apache2 preinstalled and also, make sure to not install Tomcat with XAMPP installation because it’s better to install it with the Lucee Linux installer.
After several attempts, I was able to get Lucee installed on XAMPP. Here’s what I’ve done:
Download and install XAMPP for Linux
Download Lucee Linux Installer
2.1.When installing Lucee, make sure to UNCHECK “Yes, Install Apache Connector”
Once Lucee installation is completed, copy mod_cfml.so from /opt/lucee/sys/mod_cfml/ubuntu-httpd24-x64 to /opt/lampp/modules
Open text editor to modify /opt/lampp/httpd.conf
5.1. Uncomment Include etc/extra/httpd-vhosts.conf (Need it to set up a new site later)
5.2. Paste the followings to the bottom of httpd.conf file
5.3. Make sure the ModCFML_SharedKey matches the one in /opt/lucee/tomcat/conf/server.xml
Set up a new site in /var/www
6.1. Create folder(s) and a test CFM file. In this example, I created a folder “foobar”; and inside it, there is another folder “wwwroot”. In “wwwroot”, I created a test file “index.cfm”
6.2. Open text editor to modify /opt/lampp/etc/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin admin@foobar.com
ServerName foobar
DocumentRoot /var/www/foobar/wwwroot/
Alias /assets /var/www/foobar/wwwroot/includes/assets
DirectoryIndex index.cfm index.htm index.html
<Directory "/var/www/foobar/wwwroot">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</virtualhost>
BONUS: Set up a rewrite rule for ColdBox framework
7.1. Create a file .htaccess in “wwwroot”; and paste the following:
RewriteEngine on
#if this call related to adminstrators or non rewrite folders, you can add more here.
RewriteCond %{REQUEST_URI} ^/(.*(CFIDE|cfide|CFFormGateway|jrunscripts|railo-context|lucee|mapping-tag|fckeditor)).*$
RewriteRule ^(.*)$ - [NC,L]
#Images, css, javascript and docs, add your own extensions if needed.
RewriteCond %{REQUEST_URI} \.(bmp|gif|jpe?g|png|css|js|txt|xls|ico|swf)$
RewriteRule ^(.*)$ - [NC,L]
#The ColdBox index.cfm/{path_info} rules.
RewriteRule ^$ index.cfm [QSA,NS]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.cfm/%{REQUEST_URI} [QSA,L,NS]