ColdFusion 10 developer, Tomcat 7.0.64 and several websites

I recently switched to Mac and I am running El Cap. I installed the ColdFusion 10 developer version with an internal web server, which is currently Tomcat 7.0.64. I installed all the updates on the ColdFusion server. The CF admin at locahost works fine, and I set up port forwarding so that calls in the browser (port 80) are redirected to the standard CF / Tomcat port with a setting of 8500. All this works fine.

The way I worked in windows was pretty simple. If I had the site www.example.com, I would set the local name in HOSTS called www-example-com and create this site in IIS. This naming convention has been followed for more than 30 websites and works well, and I want to duplicate it with my local CF / Tomcat configuration.

I am editing the file / Applications / ColdFusion 10 / cfusion / runtime / conf / server.xml and thought that just adding another <Host> block would do the trick. Instead, I get an error when I try to start ColdFusion. Without my added block, it works great. I have provided my current server.xml file below, with my block added. Error during startup:

WARNING: Catalina.start using / Applications / ColdFusion 10 / cfusion / runtime / conf / server.xml org.xml.sax.SAXParseException: The element type "Valve" must be followed by the specifications for the attributes ">" or "]".

I also understand that editing server.xml directly is not recommended, and in fact it would be nice if the XML / file of each site / host for their configuration of Tomcat existed somewhere in their separate directory structure.

My planned directory structure for each site:

  /Sites/www-example-com /Sites/www-example-com/files/private (not web accessible; subdirectories for various private files the site may use, including perhaps tomcat xml config files, etc) /Sites/www-example-com/files/public (virtual directory, mapped to appear directly under web root) /Sites/www-example-com/www (the root web application directory) 

But in order to avoid possible permission problems, I placed my first web application under the directory that appears on my added node below.

So what do I need to do to get the configuration I'm looking for? Or am I editing the wrong file at all, given that tomcat is related to CF? (I don’t think this is important because it still uses the same server.xml file, and I don’t think they messed up Tomcat in any way.)

 <?xml version="1.0" encoding="UTF-8"?> <Server port="8007" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> <Listener className="org.apache.catalina.core.JasperListener" /> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <GlobalNamingResources> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> </GlobalNamingResources> <Service name="Catalina"> <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="150" minSpareThreads="4" /> <Connector executor="tomcatThreadPool" maxThreads="50" port="8500" protocol="org.apache.coyote.http11.Http11Protocol" connectionTimeout="20000" redirectPort="8445" /> <Connector port="8012" protocol="AJP/1.3" redirectPort="8445" tomcatAuthentication="false" /> <Engine name="Catalina" defaultHost="localhost" jvmRoute="cfusion"> <Realm className="org.apache.catalina.realm.LockOutRealm"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" /> </Realm> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" resolveHosts="false" /> </Host> <!-- START: the block i tried to add --> <Host name="www-example-com" appBase="/Applications/ColdFusion10/cfusion/www-example-com/www" unpackWARs="false" autoDeploy="false"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" resolveHosts="false" /> </Host> <!-- END: the block i tried to add --> </Engine> </Service> </Server> 
+7
coldfusion xml tomcat apache coldfusion-10
source share
1 answer

I finished installing Lucee and Tomcat as a package, and then found information on how to configure tomcat for multiple hosts. the answer (in addition to ensuring that Mac-native apache and tomcat were connected) was for each entry so that it looked like this (do not notice the VALVE entry - not allowed or necessary):

 <Host name="www-demo-dev" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Context path="" docBase="/Users/me/sites/www-demo-dev/www" /> <Alias>www-demoalias-dev.10.10.10.10.xip.io</Alias> </Host> 

There is a lot to download Mac-Apache + tomcat + lucee!

+2
source share

All Articles