Skip to content

Instantly share code, notes, and snippets.

@jamiejackson
Last active September 25, 2015 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamiejackson/ba6545737901e503be18 to your computer and use it in GitHub Desktop.
Save jamiejackson/ba6545737901e503be18 to your computer and use it in GitHub Desktop.
Upgrade from Perl-Based ModCFML in Lucee on Ubuntu
#!/usr/bin/env bash
# install module compiling prerequisite
sudo apt-get install apache2-threaded-dev
# get/compile/place new module
cd /tmp
wget -O mod_cfml-master.zip https://github.com/utdream/mod_cfml/archive/master.zip
unzip mod_cfml-master.zip
cd ./mod_cfml-master/C
sudo make
sudo make install
# add module to available modules
echo "LoadModule modcfml_module /usr/lib/apache2/modules/mod_cfml.so" \
| sudo tee /etc/apache2/mods-available/mod_cfml.load
# add module conf
echo \
'<IfModule modcfml_module.c>
CFMLHandlers ".cfm .cfc .cfml"
ModCFML_SharedKey "secret key also set in the Tomcat valve config"
# Optional, all for logging and debugging:
# LogHeaders true
# LogHandlers true
# LogAliases true
# VDirHeader false
</IfModule>
' \
| sudo tee /etc/apache2/mods-available/mod_cfml.conf
# enable module
sudo a2enmod mod_cfml
# remove perl version
sudo /opt/lucee/sys/remove_mod_cfml.sh
# restart apache
sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment