Installing Lucee on Windows with XAMPP (Apache2) without IIS/Boncode - problem with port

I’ve never changed anything there.

Port 8888 is pure http, while port 8009 is used for the binary AJP connector.

Can you try changing the connector to use http reverse proxy? Try changing the code to:

ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://127.0.0.1:8888/$1$2`

What happens?

Also, I’d try installing Lucee without mod_cfml first. Don’t know if that would mess your installation.

1 Like

Hi and thanks for the advice!

When I change that line and restart everything it makes no difference.

I was thinking maybe I could just copy my entire previous `httpd.conf and server.xml from my previous working installation that I backed up?

Also, isn’t there at least one place where you have to enter the sever name so that the SSL works?

Thanks again !

After spending several full days (3) and countless hours (I have no hair left to pull out), I have decided to forget the latest version of Lucee and Xampp and go back to what worked. I thought I could get it working but even once I had it partially running, I was getting VERY strange errors that never arose before with the old versions. Situations where obvious datetime variables for example were interpreted as QUERIES by the latest versions of Lucee and threw errors. It’s overwhelming.

I simply have no more time or patience to throw at this.

Xampp version 7.2.4 (from 2018) and Lucee 5.2.6.60.

Those version were working perfectly for my needs and the ONLY reason I tried an update is because it looked so easy and was offered in the server admin.

I would offer strong humble advice to anyone not 100% proficient in Java programming to forgo updates and if your install is working don’t fix it like I did.

All the best and I have nothing but respect for each and every individual who gave their time for this platform. When it works it’s stellar. I’m sure that if I were a more learned Java programmer I could make these newer version work but that just isn’t in the cards for me.

Thank you much for your kind assistance Andreas. This fruitless voyage stops here. Tired, frustrated and convinced I simply will never be able to get these newer versions working properly. :slight_smile:
Back to what worked (for me)

Sorry to hear, that it seems not working for you.
I´m not exactly sure, whats the problem on your side (maybe a combination of secret + secretRequired is not working?).
Could it also be possible that your lucee is not running and another lucee is running on 8888/8009?

On my side its working with xampp (apache 2.4.53) + Lucee 5.3.9.141 + mod_cfml + ajp.
I just unziped xampp and lucee-express (but windows installer show work the same) and then followed the installation guide from mod_cfml - Installation - Apache on Windows

If you want i can send you a portable version of this setup.

Also i guess you are not using xampp in production!? Because xampp is a dev-setup with unsecure settings. There you should use a default apache installation.

1 Like

Hi David!

Thank you for your kind reply.
You are correct, it’s not in a production environment but I use it extensively for projects both at home and related to work projects.

Last night before I “gave up” I will say that I almost had it working but I could never quite get the problem where I had to add 8888 after the host on every URL request to go away. Other than that I could get it really close.

For now I reinstalled the older versions mentioned above and I’m back in business again.
I did have to tweak the Lucee Server settings to ALWAYS refresh the page cache to get it to completely work other wise for some reason I have to refresh each page at least once after loading to get it full loaded properly. I have no idea why. Never had to do it before.

At one point last night before I gave up I had intended to seek PAID help to get it finished but had no idea had to go about that.

Anyway, I’ve been a cfml user for decades and Lucee is wonderful and I’ve even traded conversation with Gert once or twice. What a brilliant and great person he is.

All is good for now.
Thank you and Andreas again. I may try again one day wit the never versions.

All the best

1 Like

So I did an installation of Lucee with Xampp without any issues. I strongly suspect that you have installed XAMPP with Tomcat, not understanding that Tomcat also comes within the Lucee installer with already all the settings you need to run Lucee. Maybe you were trying to change configs at XAMPPs Tomcat configs, not Lucee’s Tomcat configs. Here is a full Step by Step Guide, that I’ll be adding to the Lucee docs soon. Please try that and post back any feedback or issues you might face. It shouldn’t take more than 20 minutes.

  1. Step: Make sure you don’t have IIS feature installed or IIS running on your Windows, because it will conflict with your Apache webserver. Also, Lucee installer will try to detect the webserver automatically, so make sure you have no webserver installed and running before doing the following steps. As far as I know, the Lucee installer won’t find Apache2 on windows (I know some of the Lucee dev team like @Zackster have the desire to make that work on Windows Apache2, but they are really working very hard doing other very important things with Lucee core). So, the Lucee installer will let everything in that xampl apache2 setup untouched.
  2. Step: Download XAMPP for Windows at https://www.apachefriends.org/de/download.html
  3. Step: Right-click the XAMPP installer and run it as administrator
  4. Step: Install everything you neetd but NOT Tomcat(!!!): Tomcat will come from the Lucee Installer
  5. Step: Open the XAMPP Control Pannel and start Apache Webserver. Then check if the Apache Server is running fine by navigating to http://localhost. You should see the “XAMPP Welcome Page”
  6. Step: Download Lucee Installer for Windows at https://download.lucee.org/
  7. Step: Right-click the Lucee installer and run it as administrator
  8. Step: Accept the terms of services and click next
  9. Step: Define the installation directory, e.g. C:\lucee and click next
  10. Step: If the installer asks you to use the existing Java installation, make sure to “Install the bundled JRE” and click next. The reason is that you may have a Java version installed that isn’t supported by Lucee. Installing the bundled JRE ensures you’ll be running a dedicated preshipped JRE for your Lucee and Tomcat.
  11. Step: Define the password for your Lucee Administrator and click next
  12. Step: Define the Memory you want to give your JVM for Lucee and click next
  13. Step: Keep the default for Tomcat ports and next and click next
  14. Step: Make sure to keep “Yes, Start Lucee at Boot Time”. This will install Tomcat/Lucee as a Service
  15. Step: Make sure to UNTICK “Install the IIS connector”, because you won’t be using IIS, but Apache that came with XAMPP
  16. Step: When being asked to open the Lucee Welcome page, just click finish and you will be directed to the Lucee Welcome Page

In the above steps you installed Apache2 and Lucee with Tomcat, but you didn’t connect them. So let’s connect it:

  1. Step: Open the ajp config file at “C:\xampp\apache\conf\extra\httpd-ajp.conf” and add the following lines to the bottom:
ProxyPreserveHost On
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ ajp://127.0.0.1:8009/$1$2
ProxyPassMatch ^/(.+\.cfml)(/.*)?$ ajp://127.0.0.1:8009/$1$2
# optional mappings
#ProxyPassMatch ^/flex2gateway/(.*)$ ajp://127.0.0.1:8009/flex2gateway/$1
#ProxyPassMatch ^/messagebroker/(.*)$ ajp://127.0.0.1:8009/messagebroker/$1
#ProxyPassMatch ^/flashservices/gateway(.*)$ ajp://127.0.0.1:8009/flashservices/gateway$1
#ProxyPassMatch ^/openamf/gateway/(.*)$ ajp://127.0.0.1:8009/openamf/gateway/$1
#ProxyPassMatch ^/rest/(.*)$ ajp://127.0.0.1:8009/rest/$1
ProxyPassReverse / ajp://127.0.0.1:8009/
  1. Step: Make sure to set as comment any additional proxyPass directives that may conflict with the cfml proxypass above. I didn’t find any, but I’m telling just to make sure anybody else keep that in mind
  2. Step: Try openeing http://localhost. You will see a Tomcat 403 Forbidden Page. That means apache2 webserver is connected correctly to AJP, but AJP isn’t configured properly at Tomcat. The cause of this is, because Tomcat is installed with a secretRequired by default.
  3. Step: Make sure, that your XAMPP comes with an Apache2 server that already supports secret to AJP. Accoring their docs, that is from 2.4.42 and later (https://httpd.apache.org/docs/2.4/mod/mod_proxy_ajp.html)
    You can find you installed Apache2 Version by reading C:\xampp\readme_en.txt. By time of writing of this setup guide, the Apache2 version bundled with XAMP is Apache 2.4.53, so we will configure the secret in the following steps.
  4. Step: Open the apache ajp config file at “C:\xampp\apache\conf\extra\httpd-ajp.conf” and add the secret (we will use the string “MySecretPassword” in this example) to your active proxPass directive like so:
ProxyPreserveHost On
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ ajp://127.0.0.1:8009/$1$2 secret=MySecretPassword
ProxyPassMatch ^/(.+\.cfml)(/.*)?$ ajp://127.0.0.1:8009/$1$2 secret=MySecretPassword
# optional mappings
#ProxyPassMatch ^/flex2gateway/(.*)$ ajp://127.0.0.1:8009/flex2gateway/$1
#ProxyPassMatch ^/messagebroker/(.*)$ ajp://127.0.0.1:8009/messagebroker/$1
#ProxyPassMatch ^/flashservices/gateway(.*)$ ajp://127.0.0.1:8009/flashservices/gateway$1
#ProxyPassMatch ^/openamf/gateway/(.*)$ ajp://127.0.0.1:8009/openamf/gateway/$1
#ProxyPassMatch ^/rest/(.*)$ ajp://127.0.0.1:8009/rest/$1
ProxyPassReverse / ajp://127.0.0.1:8009/ secret=MySecretPassword

Step 22: Open the Tomcat configuration file at C:\lucee\tomcat\conf\server.xml, find string ‘8009’ in that file. You will be directed to the connectors directive tag and change that connector directive for port 8009 like so:

<!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector protocol="AJP/1.3"
	    port="8009"
	    secret="MySecretPassword"
	    secretRequired="true"
               redirectPort="8443" />
  1. Step: Restart Tomcat/Lucee in your windows services and wait Tomcat to start and create all the contexts
  2. Step: Restart Apache2 from within your XAMP control pannel
  3. Step: Try opening http://localost and you’ll see the cfm page being delivered, but the static files will fail to load making the page look ugly without images and css. That’s because you need to adapt your configuraion in such a manner, that your “wwwroot” works in Apache2 but also in Tomcat
  4. Step: Open httpd.config at “C:\xampp\apache\conf\httpd.conf” and find the string ‘DocumentRoot’.
  5. Step: Change the document root directive from “C:/xampp/htdocs” and your directory directive to Lucees default localhost directory like so:
DocumentRoot "C:\lucee\tomcat\webapps\ROOT"
<Directory "C:\lucee\tomcat\webapps\ROOT"> 
  1. Step: Restart Apache2 from within your XAMP control pannel
  2. Step: Open http://localhost/index.cfm and you should see the Lucee welcome page reendered with all static file.

If you only open http://localhost/ you will see a directory listing. But that is a well know apache2 configuration. You should make the index.cfm your default page. However, I won’t show this here, because it’s already well documented, and secondly it depends on your own app.

Also, I would’n install mod_cfml on a local development like that. I’d do that manually. If it is a must please try following the mod_cfml instructions at https://viviotech.github.io/mod_cfml/install-win-apache.html

If you are still facing problems, please post back here.

I’ve also changed the threads title, so it is better searchable for Lucee/Xamp issues on Windows all over the net.

3 Likes

I just saw this I’m gusseting a year (or two later?)

Still building new PC’s that I need to install Lucee and Xampp on and still running into issues but this will help.
Thank you very much! This is a work that will be of ongoing invaluable help.
MUCH appreciated Andreas.

By the way.
In the case mentioned in the OP of this thread.
I ended up uninstalling that version and went back to 5.2.6.60 and everything worked instantly with only the need to install mod_cfml.so, the shared key and maybe a few other small twerks.

All the help on this one is still appreciated even a year or more later.

1 Like

@LuceeInTheSky Thanks for all your feedback!!! I appreciate any type of post back.

After you’ve faced all those issues (and hearing about other PHP devs experimenting cfml), I’ve pull requested a little instruction guide to the official lucee docs as a contribution. Would be great if you could quickly check that, just to be sure it’s easy to follow and without issues. Here it is: