Only some of what is in the default mod_jk.conf file can go in a
virtualhost block.
For example, I have a conf file that I include inside my virtual hosts
block that looks like this:
JkMountFile /etc/apache2/coldfusion/uriworkermap.properties
AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf
Alias /CFIDE “/Applications/ColdFusion11/cfusion/wwwroot/CFIDE”
<Directory “/Applications/ColdFusion11/cfusion/wwwroot/CFIDE”>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
<Files ~ “.hbmxml$”>
Require all denied
DirectoryIndex index.cfm index.cfml index.html
then i globally include another conf file that looks like this:
LoadModule jk_module
“/Applications/ColdFusion11/config/wsconfig/1/mod_jk.so”
JkWorkersFile /etc/apache2/tomcat/workers.properties
JkShmFile /etc/apache2/tomcat/jk_shm
JKIPRestrictionFile /etc/apache2/tomcat/iprestriction.properties
custom environment variables
JkEnvVar REDIRECT_URL
JkEnvVar REDIRECT_REMOTE_HOST
JkEnvVar REDIRECT_PATH
JkEnvVar REDIRECT_QUERY_STRING
JkEnvVar REDIRECT_HTTP_ACCEPT
JkEnvVar REDIRECT_HTTP_USER_AGENT
JkEnvVar REDIRECT_REMOTE_ADDR
JkEnvVar REDIRECT_SERVER_NAME
JkEnvVar REDIRECT_SERVER_PORT
JkEnvVar REDIRECT_SERVER_SOFTWARE
JkLogFile /etc/apache2/tomcat/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
This allows me to configure each virtual host to use CF or not.
Then I have another conf file that I include in virtual hosts that should
use Railo/Lucee which uses mod_cfml and looks like this:
DirectoryIndex index.cfm index.html index.cfml
<Proxy >
Require local
ProxyPreserveHost On
ProxyPassMatch ^/(.+.cf[cm])(/.)?$ ajp://localhost:8009/$1$2
ProxyPassMatch ^/flashservices/gateway(/.)?$ ajp://localhost:8009/
flashservices/gateway/$1$2
ProxyPassMatch ^/flex2gateway(/.)?$ ajp://localhost:8009/flex2gateway/$1$2
ProxyPassMatch ^/rest(/.*)?$ ajp://localhost:8009/rest/$1$2
PerlRequire /private/etc/apache2/railo/mod_cfml.pm
PerlHeaderParserHandler mod_cfml
PerlSetVar LogHeaders false
PerlSetVar LogHandlers false
PerlSetVar CFMLHandlers “.cfm .cfc .cfml”
Hopefully this helps youOn Thursday, March 19, 2015 at 12:53:04 PM UTC-4, Brian Lang wrote:
I am running the built-in Apache 2.4 in OS X Yosemite.
What is the “appropriate connector info” that I should put into each
virtual host where I want to run ACF?
I tried simply moving the Include “/private/etc/apache2/mod_jk.conf”
directive into the VHost file. If I put it outside the block,
then it’s included in the first VHost file that gets loaded and works for
every Vhost. If I put it inside the block, Apache configtest
tells me:
AH00526: Syntax error on line 4 of /private/etc/apache2/mod_jk.conf:
JkWorkersFile cannot occur within section
I’m new to configuring Apache beyond the very basics, so please be gentle
On Thursday, 19 March 2015 04:06:04 UTC-7, Andrew Myers wrote:
It’s definitely possible. However I suggest (if you’re not already doing
so) that you install ACF as a war on “vanilla” tomcat. ACF uses its own
version of mod_jk which non-standard and therefore incompatible with the
version you’d use with Lucee.
Alternatively you can use the ACF version of mod_jk and use mod_proxy_ajp
For Lucee, but I have found mod_jk to be a better solution in my personal
experience (in particular if you make use of rewrite rules it’s much easier
with mod_jk versus mod_amp_proxy).
In either case you should remove that include from the http.conf and put
the appropriate connector info in the virtual host block for each instance
- otherwise everything will go to the ACF instance.
Shout out if you need more info - I’ve done this a bunch of times
recently and it’s all fresh in my mind at the the moment.
Andy