Installing Lucee for development environment with Apache web server on Windows environment
Development with Lucee server installed on Windows 10 is the fastest way to start. No virtualbox or docker setup is required, just native Windows applications.
Download Apache web server (officially Apache HTTPD) compiled for 64-bit Windows from Apache Lounge.
Unzip it to default folder C:\Apache24
. Other folder is also legal, I only warn not to use folder with Unicode name or name containing spaces.
With CMD or Powershell navigate to /bin folder under Apache folder. Run command to install Apache web server as Windows service.
.\httpd.exe -k install
Start Apache service with Windows Service Manager
Navigate to http://localhost
and see default HTML page served.
Download Lucee server from official download page. Select stable version with installer.
Run installer and let it do stuff. I recommend using short name for Lucee server folder, like C:\lucee
.
Installer will set up Tomcat as Windows service Apache Tomcat Lucee
and configure it to run Lucee server.
Navigate to http://localhost:8888
to see Lucee start page served. Port 8888 is used by Tomcat's internal web-server and is configured by default.
While it's possible to develop using Tomcat's web server on port 8888, it's better to use Apache front end to serve static files and only pass .cfm
files to Lucee server.
Uncomment mod_proxy
Apache module and instruct Apache to 'reverse-proxy' requests for .cfm
pages to Lucee.
If you going to use virtual hosts, allow mod_cfml
module to automatically instruct Tomcat about changes in virtual hosts config.
Module mod_cfml
will be automatically installed with Lucee and necessary changes be made in Tomcat's server.xml
and Apache's httpd.conf
.
If not, download the module and manually install mod_cfml
both to Tomcat and Apache.
Both Tomcat and Apache will use mod_cfml
to connect, make sure that same shared key is used.
Portion of Apache configuration file for Lucee server:
# from httpd.conf <IfModule mod_proxy.c> ProxyPreserveHost On ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://127.0.0.1:8888/$1$2 ProxyPassMatch ^/(.+\.cfchart)(/.*)?$ http://127.0.0.1:8888/$1$2 ProxyPassMatch ^/(.+\.cfml)(/.*)?$ http://127.0.0.1:8888/$1$2 ProxyPassReverse / http://127.0.0.1:8888/ </IfModule> LoadModule modcfml_module modules/mod_cfml.so CFMLHandlers ".cfm .cfc .cfml" ModCFML_SharedKey "913ad0850e311df337d765e1d966357bd77e275030648ff90bd59283d3cb6258"
Navigate to http://localhost/lucee/admin/server.cfm
to make sure Apache is now serving files on port 80.