Hi All,
I recently switched to Mac, and am running El Cap. I have installed ColdFusion 10 developer edition, with internal web server, which is currently Tomcat 7.0.64. I have installed all updates to the ColdFusion server. The CF Administrator on locahost works fine, and i set up port forwarding so that calls in the browser (port 80) are forwarded to the default CF/Tomcat configured port of 8500. This is all working fine.
The way i've worked in windows was pretty straightforward - if i had a website www.example.com, i would set up a local name in HOSTS called www-example-com, and create that host in IIS. This naming convention has been followed for over 30 websites, and has worked well, and i wish to duplicate it with my local CF/Tomcat configuration.
I am editing the file /Applications/ColdFusion10/cfusion/runtime/conf/server.xml, and thought that simply adding another block would do the trick, but instead i get an error when i try to start ColdFusion up. Without my added block, it works fine. I have provided my current server.xml file below, with my added block. The error I see during startup is:
WARNING: Catalina.start using /Applications/ColdFusion10/cfusion/runtime/conf/server.xml
org.xml.sax.SAXParseException: Element type "Valve" must be followed by either attribute specifications, ">" or "/>".
I also understand that editing server.xml directly is not recommended, and in fact it would be nice to have each site's/host's XML file for their Tomcat configuration exist somewhere in their individual directory structure.
My planned directory structure for each site is:
/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 to avoid possible permissions issues, i placed my first web application under the directory that appears in my added host below.
So what do i need to do to get the configuration i'm looking for? Or am i editing the wrong file(s) altogether, considering tomcat is bundled with CF? (I don't think that matters, since it's still using the same server.xml file and i don't think they've screwed 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 "%r" %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 "%r" %s %b" resolveHosts="false"/>
</Host>
<!-- END: the block i tried to add -->
</Engine>
</Service>
</Server>
Marc Funaro
<Host name="www-example-com" appBase="webapps"
unpackWARs="false" autoDeploy="false">
<Context path="" docBase="/Applications/ColdFusion10/cfusion/www-example-com/www" />
</Host>
--
You received this message because you are subscribed to the Google Groups "Central New York ColdFusion Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfugcny+u...@googlegroups.com.
To post to this group, send email to cfu...@googlegroups.com.
Visit this group at https://groups.google.com/group/cfugcny.
For more options, visit https://groups.google.com/d/optout.
Thanks Pete,
I just installed CF10 Dev edition with internal web server, thinking that it would be fast and easy.
I tried every combination of what you said below already, including making sure my XML file was valid. The error message really is a bogus one, it seems, as I literally copied those sections from working areas in the file and simply modified the parameters. No foreign/hidden characters/fancy quotes issues, etc.
I got close when I removed the Valve tag – at least it would accept the file and start up. But entering http://www-example-com in my browser just led to a 404. I’d have thought someone would have needed to do this already and had a process I could rip off, but I guess not. I had also read that on a default Tomcat install, additional xml files might be at play, but who knows. I really want to make the switch but this has sucked up a LOT of hours.
Should I be trying ColdFusion 11 instead, you think? My production environment is still CF10, but if I can dev locally like I want with 11, I’d try it…
sudo apachectl start
Where does Tomcat figure into the equation, if I use the built-in apache install? Turning off the port forwarding is easy ‘nough of course. Should I uninstall CF, get apache running, then re-install CF?
Also, does anyone know if “apptacular” is still a viable plugin for CFBuilder? I just downloaded CFB3, and I see reference to that plug on the start page, but it doesn’t seem to go anywhere. I could really use a quick scaffolding app right now, as I’m behind on something and that would give me a jump start…