<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Jamie Krug&apos;s ColdFusion Blog</title>
			<link>http://jamiekrug.com/blog/index.cfm</link>
			<description>Jamie Krug&apos;s ColdFusion blog, regarding ColdFusion/CFML and other programming adventures as well as some learning experiences. EDB: Event Driven Blogging (in the event that I actually have something worth sharing:)</description>
			<language>en-us</language>
			<pubDate>Thu, 17 May 2012 23:04:21 -0400</pubDate>
			<lastBuildDate>Mon, 17 Jan 2011 16:52:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>jamie@jamiekrug.com</managingEditor>
			<webMaster>jamie@jamiekrug.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>jamie@jamiekrug.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			<itunes:image href="" />
			<image>
				<url></url>
				<title>Jamie Krug&apos;s ColdFusion Blog</title>
				<link>http://jamiekrug.com/blog/index.cfm</link>
			</image>
			<itunes:explicit>no</itunes:explicit>
			
			
			
			
			
			<item>
				<title>Go To OpenCF Summit!</title>
				<link>http://jamiekrug.com/blog/index.cfm/2011/1/17/go-to-opencf-summit</link>
				<description>
				
				&lt;p&gt;
	I&apos;ve been meaning to post about &lt;a href=&quot;http://opencfsummit.org/&quot;&gt;OpenCF Summit&lt;/a&gt; for a few weeks.
	If you haven&apos;t already heard about it OpenCF Summit, it&apos;s home page describes is as follows:
&lt;/p&gt;
&lt;blockquote&gt;
	OpenCF Summit is a community gathering focused exclusively on advancing free and open source software in the CFML community.&lt;br /&gt;&lt;br /&gt;
	If you&apos;re interested in diving into the free software CFML engines,  learning more about the free software movement, and interacting with the most progressive thinkers in the CFML community, OpenCF Summit is for you!
&lt;/blockquote&gt;
&lt;p&gt;
	A couple recent blog posts finally prompted me to write up this post...
&lt;/p&gt;
&lt;p&gt;
	First, &lt;a href=&quot;http://www.silverwareconsulting.com/&quot;&gt;Bob Silverberg&lt;/a&gt; recently posted &lt;a href=&quot;http://www.silverwareconsulting.com/index.cfm/2011/1/13/Why-Contribute-to-Open-Source-Projects&quot;&gt;&lt;em&gt;Why Contribute to Open Source Projects?&lt;/em&gt;&lt;/a&gt;
	If you&apos;ve ever wondered about the answer to this question, or if you just haven&apos;t had time to participate or learn more about open source software projects, I highly recommend reading Bob&apos;s post!
	It gets my +1 all around--I wholeheartedly agree on all points, and I can&apos;t think of anything he&apos;s left out.
&lt;/p&gt;
&lt;p&gt;
	Second, as if the OpenCF Summit registration wasn&apos;t already incredibly reasonably priced, it was &lt;a href=&quot;http://blog.opencfsummit.org/opencf-summit-price-reduction-from-199-to-30&quot;&gt;just lowered to $30&lt;/a&gt;--it&apos;s a steal!
	From the beginning, the OpenCF Summit organizers have aimed to keep costs down, and they&apos;ve really delivered.
	I&apos;ll highlight a few quick thoughts about why I&apos;m super excited to be attending and speaking at OpenCF Summit, but I also encourage you to check out the &lt;a href=&quot;http://blog.opencfsummit.org/&quot;&gt;OpenCF Summit blog&lt;/a&gt;,
		which contains numerous posts about what the conference is all about, what it has to offer, and how you can participate and enjoy.
&lt;/p&gt;
&lt;p&gt;
	For all of the reasons &lt;a href=&quot;http://www.silverwareconsulting.com/index.cfm/2011/1/13/Why-Contribute-to-Open-Source-Projects&quot;&gt;outlined by Bob&lt;/a&gt;,
		I&apos;m quite passionate about open source software, and I truly enjoy participating--be it bug reports, coding, documentation or just good forum discussions.
	For all that makes technology conferences awesome (great opportunities for learning, sharing, networking, and just having a great time with great people), I&apos;m passionate about attending whenever I can.
	So, when I first heard about OpenCF Summit, it sounded like a geek&apos;s dream come true :P I planned to attend, without question.
&lt;/p&gt;
&lt;p&gt;
	To make things even more exciting, I submitted a topic to present, and I&apos;m honored to have had it accepted: &lt;a href=&quot;http://opencfsummit.org/index.cfm/schedule/sessions/complete-foss-cfml-development-stack/&quot;&gt;&lt;em&gt;Complete FOSS CFML Development Stack&lt;/em&gt;&lt;/a&gt;.
	I just think it&apos;s fantastic that we, as CFML developers, have the option to develop on a completely free and open source software stack--from operating system to version control system!
	Better yet, there are numerous options in every category (operating system, Web server, application server, CFML engine, database engine, IDE, VCS, etc.).
	I&apos;ve been developing with &lt;a href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt; as my primary desktop operating system for well over two years now, and I love it, so I&apos;m very excited to share my experience.
&lt;/p&gt;
&lt;p&gt;
	To be clear, I haven&apos;t been strictly FOSS only, but in the spirit of the conference, I thought this might be a nice topic, because you &lt;em&gt;can&lt;/em&gt; be a strictly FOSS CFML developer, should you choose.
	As great as &lt;a href=&quot;http://cfeclipse.org/&quot;&gt;CFEclipse&lt;/a&gt; is (and &lt;a href=&quot;http://eclipse.org/&quot;&gt;Eclipse&lt;/a&gt;, in general), there&apos;s no Flex support for Linux.
	On the commercial side, as great as &lt;a href=&quot;http://www.adobe.com/products/coldfusion/cfbuilder/features/&quot;&gt;ColdFusion Builder&lt;/a&gt; sounds, there&apos;s no Linux support.
	I&apos;ve been using &lt;a href=&quot;http://www.jetbrains.com/idea/&quot;&gt;IntelliJ IDEA&lt;/a&gt; as my primary IDE for a while now, because it&apos;s a fantastic IDE, in general, and it supports CFML, Flex and Groovy development very well.
	While there is a free and open source version of IntelliJ (Community Edition), the non-free commercial Ultimate Edition is required for CFML and Flex support.
	It&apos;s very reasonably priced and pays for itself in development efficiency almost immediately. That said, I still like to support CFEclipse and use it on a number of personal projects.
	As for CFML engines, I&apos;m a huge advocate of the CFML development community, and I like to spread the love ;-)
	I enjoy the best of &lt;a href=&quot;http://www.adobe.com/products/coldfusion/&quot;&gt;Adobe ColdFusion&lt;/a&gt;, &lt;a href=&quot;http://www.openbluedragon.org/&quot;&gt;OpenBD&lt;/a&gt; and &lt;a href=&quot;http://www.getrailo.org/&quot;&gt;Railo&lt;/a&gt; whenever I have the chance!
&lt;/p&gt;
&lt;h3&gt;You Too, Should Attend OpenCF Summit!&lt;/h3&gt;
&lt;p&gt;
	Why? Well, as I&apos;ve mentioned, it&apos;s a whole lot of &lt;em&gt;fun&lt;/em&gt; to attend conferences, and the amount you&apos;ll learn from conference sessions, unconference sessions, hallway conversations, dinner and after-hours conversations, is just incredible.
	That much holds true for just about any decent conference, and considering the large number of incredibly smart, kind and generous folks involved in OpenCF Summit, it&apos;s a no-brainer.
	If you&apos;re at all new or curious about the many wonderful open source projects in the CFML community, this is the best place in the world to learn more and get involved right now.
	If you&apos;re already a big fan of open source and CFML, well, this is basically a Disney World trip for the OSS geek in you.
&lt;/p&gt;
&lt;p&gt;
	There&apos;s a great looking &lt;a href=&quot;http://opencfsummit.org/index.cfm/schedule/&quot;&gt;schedule&lt;/a&gt;.
	There&apos;s a great group of &lt;a href=&quot;http://opencfsummit.org/index.cfm/speakers/&quot;&gt;speakers&lt;/a&gt;, and I know of many great attendees that will be fun to converse with too.
	There&apos;s a great group of &lt;a href=&quot;http://opencfsummit.org/index.cfm/partners/&quot;&gt;partners&lt;/a&gt; sponsoring the event.
	There&apos;s a community hackfest planned, an unconference room, Pecha Kucha and BOFs.
&lt;/p&gt;
&lt;p&gt;
	How about networking? Are you looking for more professional connections? Is your company looking for another qualified team member? This is the place to be!
	I, for one, am looking to hire a couple passionate programmers right now, so if you&apos;re looking for a great opportunity, find me at the conference! (Or, better yet, &lt;a href=&quot;http://jamiekrug.com/blog/contact.cfm&quot;&gt;contact me&lt;/a&gt; now.)
&lt;/p&gt;
&lt;p&gt;
	And if all the usual conference goodness and a great group of people isn&apos;t enough to get you psyched, read up on the &lt;a href=&quot;http://blog.opencfsummit.org/&quot;&gt;OpenCF Summit blog posts&lt;/a&gt; for other exciting stuff.
	So, come and join the fun in Texas, Feb 21-23. I hope to see you there.
&lt;/p&gt;
				
				</description>
						
				
				<category>CFML</category>				
				
				<category>Conferences</category>				
				
				<pubDate>Mon, 17 Jan 2011 16:52:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2011/1/17/go-to-opencf-summit</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Railo Access DSN on 64-bit Windows</title>
				<link>http://jamiekrug.com/blog/index.cfm/2010/10/14/railo-access-dsn-64-bit-windows</link>
				<description>
				
				I just wanted to post a quick note about this, as it was not the least bit obvious. I was helping to configure an old CFML application, which used an MS Access database, on a Windows Server 2008 RC2 (64-bit)/Apache 2.2/Tomcat 7/Railo 3.1 setup. This was being migrated from a 32-bit Windows server to a 64-bit Windows server.

Before I continue, let me first make a few suggestions. If you&apos;re building a new CFML application, I&apos;d first recommend deploying (or at least coding to allow for deploying) to a Linux server using either MySQL or PostgreSQL databases. Linux servers are stable, secure, fast and cheap. MySQL and PostgreSQL databases can be used on just about any platform. If you prefer Windows servers (or have no choice), I&apos;d still suggest MySQL or PostgreSQL databases, as they could be easily migrated to Linux in the future (Apache HTTPD also runs great on just about any OS). If you prefer to use (or must use) a Microsoft database, use SQL Server--not Access. There&apos;s an Express edition available, which is much more suited for a Web application database than Access, and there is much better 64-bit driver support.

Okay, so if you must go with an Access database on 64-bit Windows, the problem with using an Access database for a CFML application on a 64-bit Windows server... On 32-bit Windows it&apos;s quite simple to connect Railo to an Access database: use the Windows ODBC Admin to create a System DSN that points to your Access database file, and then create a Railo data source using the JDBC-ODBC bridge option. Unfortunately, on Windows Server 2008 64-bit, the ODBC Admin does not even show an Access driver option. If you Google around for a solution, you&apos;ll be tempted (as I was) to use the &quot;secret&quot; 32-bit ODBC Admin tool, which is located at %systemdrive%\Windows\SysWOW64\odbcad32.exe (the default 64-bit admin is at %systemdrive%\Windows\System32\odbcad32.exe--yes, Microsoft put the 32-bit tool under a directory containing &quot;64&quot; and the 64-bit admin under a directory containing &quot;32&quot; and both file names contain a &quot;32&quot;--nice). If you use this admin tool, you&apos;ll be able to create a System DSN for your Access database using a 32-bit driver, however, it will not work with the JDBC-ODBC bridge, because Railo/Tomcat a 64-bit application (running on a 64-bit JVM).

Finally I discovered that Microsoft has finally released 64-bit ODBC driver support, so &lt;strong&gt;the real solution is...&lt;/strong&gt; Go &lt;a href=&quot;http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&amp;FamilyID=c06b8369-60dd-4b64-a44b-84b371ede16d&quot;&gt;here&lt;/a&gt; and download and run the AccessDatabaseEngine_X64.exe installer on your 64-bit Windows server. Now you can simply open the usual 64-bit DSN/ODBC admin tool (under Administrative Tools, I believe) and create a System DSN for your Access database (a driver is actually available there now). The Railo JDBC-ODBC bridge datasource type will now work.
				
				</description>
						
				
				<category>Railo</category>				
				
				<category>Windows</category>				
				
				<pubDate>Thu, 14 Oct 2010 11:14:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2010/10/14/railo-access-dsn-64-bit-windows</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>CFML on Tomcat via Apache AJP Proxy, Redux</title>
				<link>http://jamiekrug.com/blog/index.cfm/2010/8/31/cfml-tomcat-apache-ajp-proxy-redux</link>
				<description>
				
				I often use &lt;a href=&quot;http://tomcat.apache.org/&quot;&gt;Tomcat&lt;/a&gt; as my servlet container to power my CFML apps (works great for &lt;a href=&quot;http://www.adobe.com/products/coldfusion/&quot;&gt;ColdFusion&lt;/a&gt;, &lt;a href=&quot;http://www.openbluedragon.org/&quot;&gt;Open BlueDragon&lt;/a&gt; and &lt;a href=&quot;http://www.getrailo.org/&quot;&gt;Railo&lt;/a&gt;!). I&apos;ve been perfectly happy with the power and flexibility of using Apache HTTPD&apos;s mod_rewrite with an AJP proxy, as &lt;a href=&quot;http://corfield.org/blog/post.cfm/Railo_for_Dummies_Part_IV_Appendix&quot;&gt;Sean Corfield has detailed&lt;/a&gt;. Then, after repeating a lot of rewrite rules in all of my virtual host definitions, I decided to merely place the following in my main Apache configuration file:

&lt;code&gt;&lt;Proxy *&gt;
    Allow from 127.0.0.1
&lt;/Proxy&gt;
ProxyPreserveHost On
ProxyPassMatch  ^/(.+\.cf[cm])(/.*)?$  ajp://localhost:8009/$1$2&lt;/code&gt;

That&apos;s it! Now, any Apache virtual hosts for CFML application can be defined as simple as this:

&lt;code&gt;&lt;VirtualHost *:80&gt;
    ServerName myrockinapp
    DocumentRoot /var/www/myrockinapp
    DirectoryIndex index.cfm
&lt;/VirtualHost&gt;&lt;/code&gt;

I can still easily add URL rewriting to my Apache virtual hosts. For example, when using &lt;a href=&quot;http://www.getmura.com/&quot;&gt;Mura CMS&lt;/a&gt; I often set the properties siteIdInURLs=0 and indexFileInURLs=0 to make super clean looking URLs (with no siteID or index.cfm in the URLs). This then of course requires a rewrite rule to ensure the proper requests are passed to Tomcat, which is as simple as adding these lines to your virtual host (or an .htaccess file in your Web root):

&lt;code&gt;RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^([a-zA-Z0-9/-]+)$ /index.cfm%{REQUEST_URI} [PT]&lt;/code&gt;

Makes all the configuration I used in &lt;a href=&quot;http://jamiekrug.com/blog/index.cfm/2009/5/22/url-rewrite-goodies-for-apache-tomcat-railo-and-mura-cms&quot;&gt;this post&lt;/a&gt; look a bit silly now :P

Also, if you&apos;re interested in a clean, production-worthy server setup running on &lt;a href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt; 10.04 with Railo, Tomcat, Apache and MySQL, I have this fairly well documented in &lt;a href=&quot;http://docs.google.com/View?id=dchcmx7_70dqhqgsdw&quot;&gt;this Google Doc&lt;/a&gt;.
				
				</description>
						
				
				<category>CFML</category>				
				
				<category>Tomcat</category>				
				
				<category>Open BlueDragon</category>				
				
				<category>ColdFusion</category>				
				
				<category>Mura CMS</category>				
				
				<category>Railo</category>				
				
				<category>Apache</category>				
				
				<pubDate>Tue, 31 Aug 2010 22:27:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2010/8/31/cfml-tomcat-apache-ajp-proxy-redux</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Git Global Ignores, Can Be Overridden</title>
				<link>http://jamiekrug.com/blog/index.cfm/2010/5/27/git-global-ignores-can-be-overridden</link>
				<description>
				
				First off, I&apos;m loving &lt;a href=&quot;http://git-scm.com/&quot;&gt;Git&lt;/a&gt; (fast/awesome/free/open-source distributed version control system). If you haven&apos;t already, check it out!

I&apos;d like to briefly mention how to ignore certain files from version control, both by project and globally. I&apos;d also like to confirm that it&apos;s very easy to add files to version control, which are normally globally ignored.

Git makes it simple to ignore certain files/directories/patterns from version control by creating a .gitignore file in your project root, and optionally in any sub-directory. Check out the &lt;a href=&quot;http://www.kernel.org/pub/software/scm/git/docs/gitignore.html&quot;&gt;gitignore docs page&lt;/a&gt; for more.

That said, I quickly found myself ignoring the same patterns for every repository. Fortunately, Git also makes it easy to globally ignore patterns. You just set a global config property of core.excludesfile to tell Git where to look for a global gitignore file. The following two commands take care of setting the property and creating a file with a few popular ignore patterns.

&lt;code&gt;git config --global core.excludesfile ~/.gitignore
printf &quot;.project\n*.iml\n.idea/\nWEB-INF/\n&quot; &gt;&gt; ~/.gitignore&lt;/code&gt;

The above commands will work on both Linux and Mac. Windows users will likely want to locate a global .gitignore file in some common user settings directory. You can then create/edit the text file any way you&apos;d like.

For me, on &lt;a href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu Linux&lt;/a&gt;, I end up with a /home/jkrug/.gitignore file that looks like this:

&lt;code&gt;.project
*.iml
.idea/
WEB-INF/&lt;/code&gt;

You can also manually edit your .gitignore file, of course, and add comments if you&apos;d like:

&lt;code&gt;# Eclipse project files
.project

# IntelliJ IDEA project files
*.iml
.idea/

# Java WAR directories
WEB-INF/&lt;/code&gt;

Now here&apos;s the bonus: if you have one repository in which you&apos;d like to add a file that is globally ignored to version control, you can do so. Simply use a standard add command with a -f flag, e.g.,

&lt;code&gt;git add -f WEB-INF/web.xml&lt;/code&gt;

The global ignores are especially useful to me when I &lt;a href=&quot;http://help.github.com/forking/&quot;&gt;fork a project&lt;/a&gt; that may not have an ignore for my primary IDE&apos;s (&lt;a href=&quot;http://www.jetbrains.com/idea/&quot;&gt;IntelliJ IDEA&lt;/a&gt;) configuration files. And when I have a custom project in which I&apos;d like to add one of those global ignores--no problem!

Happy versioned coding :)
				
				</description>
						
				
				<category>Git</category>				
				
				<category>Ubuntu</category>				
				
				<pubDate>Thu, 27 May 2010 11:06:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2010/5/27/git-global-ignores-can-be-overridden</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>cf.Objective() 2010: Intro to JEE Servlet Containers for ColdFusion Developers</title>
				<link>http://jamiekrug.com/blog/index.cfm/2010/1/27/cf-objective-2010-jee-servlet-containers-for-coldfusion-developers</link>
				<description>
				
				I am thrilled and honored to have the opportunity to speak at this year&apos;s &lt;a href=&quot;http://cfobjective.com/&quot;&gt;cf.Objective()&lt;/a&gt; 2010 conference! My session title is &quot;Intro to JEE Servlet Containers for ColdFusion Developers&quot; and here is the preliminary description I used when submitting my session topic:

&lt;blockquote&gt;An alternate title for this session might be, &quot;What the heck is a servlet container and what does it have to do with CFML?&quot; We&apos;ll discuss the relationship between CFML &quot;engines&quot; (i.e., servlets), JEE application servers and servlet containers, and Web servers. Understanding the basics of this relationship can provide CFML developers with a greater confidence to leverage underlying Java tools, improve development environments and deployments and write more flexible and powerful applications.&lt;/blockquote&gt;

&lt;h3&gt;Why Bother?&lt;/h3&gt;

I submitted this topic because I believe there are &lt;em&gt;many&lt;/em&gt; CF developers, of all skill levels, with very little knowledge in this area. I was most certainly one of these developers for the better part of my CF career thus far! Over the past year or two I&apos;ve developed a much deeper understanding of Java Enterprise Edition (JEE/J2EE), Servlets, Servlet Containers, Java Application Servers and Web servers. Most importantly I&apos;ve learned a lot more about how &lt;a href=&quot;http://www.adobe.com/products/coldfusion/&quot;&gt;Adobe ColdFusion&lt;/a&gt;, &lt;a href=&quot;http://openbluedragon.org/&quot;&gt;Open BlueDragon&lt;/a&gt; and &lt;a href=&quot;http://www.getrailo.org/&quot;&gt;Railo&lt;/a&gt; leverage the power of these Java platform specifications.

Much of my learning has been out of necessity -- and I feel like I had to do it the hard way (on my own)! But looking back, had I possessed some base knowledge in the right areas, I really think I may have put all the puzzle pieces together much more quickly. So I&apos;m hoping to provide these building blocks in my cf.Objective() session this year.

You don&apos;t need to become a Java guru to grok these concepts, but they can greatly increase your toolset as a ColdFusion developer, allowing you to design and develop more robust applications and gain greater marketability in the job market. Here are some points that I hope to provide attendees:

&lt;ul&gt;
&lt;li&gt;10,000-foot view of how CFML Engines, Servlet Containers, Java Applications Servers and Web Servers interact to make the magic we&apos;ve all come to know and love&lt;/li&gt;
&lt;li&gt;Understanding the many options the Adobe ColdFusion installer provides and what you can (and might want to) do on your own&lt;/li&gt;
&lt;li&gt;Confidence and flexibility in CF development environments (application isolation, starting app servers from your IDE, super-simple portability, etc.)&lt;/li&gt;
&lt;li&gt;Configuration options to keep both development and production environments running smoothly&lt;/li&gt;
&lt;li&gt;Understanding and leveraging EAR/WAR deployments&lt;/li&gt;
&lt;li&gt;Awareness of the many options and not being afraid to check them out!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Lots to talk about, feedback needed!&lt;/h3&gt;

As you can imagine, there is a lot that can be covered here. My goal for this session is to provide an understanding of the important pieces of the big picture, tools you can put to immediate use, and a confidence to safely explore more deeply. If any of the concepts or buzz words I&apos;ve mentioned in this post are scary, please know that they&apos;re not -- not if you start in the right place.

If you feel any one area or concept that I&apos;ve mentioned would be of greatest value to you... If you have a more specific question that keeps coming up, or something that you continue to avoid... If you know this stuff cold, but see common problem points out in the CFML community... I would highly value your feedback as I continue to refine my session preparation. Please comment on this blog post or use my &lt;a href=&quot;http://jamiekrug.com/blog/contact.cfm&quot;&gt;contact form&lt;/a&gt; to contact me directly.

Whether you&apos;re already grokking some or none of what I&apos;ve discussed here, I hope you can make it to my cf.Objective() session and take away some useful bits!
				
				</description>
						
				
				<category>CFML</category>				
				
				<category>Open BlueDragon</category>				
				
				<category>ColdFusion</category>				
				
				<category>Java</category>				
				
				<category>Railo</category>				
				
				<pubDate>Wed, 27 Jan 2010 15:23:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2010/1/27/cf-objective-2010-jee-servlet-containers-for-coldfusion-developers</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Bash Script to Set Sensible Directory/File Permissions</title>
				<link>http://jamiekrug.com/blog/index.cfm/2009/12/28/bash-script-to-set-sensible-directory-file-permissions</link>
				<description>
				
				Every once in a while a directory structure&apos;s permissions just get messy (or an archive I download and extract has stupid permissions, like making every single file executable). So I&apos;ll occasionally want to &lt;em&gt;chmod 755&lt;/em&gt; all directories and &lt;em&gt;chmod 644&lt;/em&gt; all files. If you&apos;re new to file system permissions in Linux, let me translate that goal. For every directory I want the owner to be able to read/write/execute (execute allows to cd into directory) and both group and all others to have read/execute permissions. For every file I want the owner to have read/write permissions and both the group and all others to have read-only permission. The Ubuntu Community Documentation has a good &lt;a href=&quot;https://help.ubuntu.com/community/FilePermissions&quot;&gt;&lt;em&gt;File&lt;/em&gt; Permissions page&lt;/a&gt; that covers this in more detail.

That same documentation has a &lt;em&gt;&lt;a href=&quot;https://help.ubuntu.com/community/FilePermissions#Recursive%20chmod%20using%20find,%20pipemill,%20and%20sudo&quot;&gt;Recursive chmod using find, pipemill, and sudo&lt;/a&gt;&lt;/em&gt; section that details precisely the two commands I need, but I hate to waste time finding this link and carefully remembering what I want to do. So, I&apos;ve whipped up a simple &lt;a href=&quot;http://en.wikipedia.org/wiki/Bash&quot;&gt;Bash&lt;/a&gt; script that simply accepts a directory path as its only parameter and prompts me to confirm before making the permission changes. Here it is.

&lt;code&gt;#!/bin/bash

# exit this bash script if any statement returns a non-true return value (same as: set -e)
set -o errexit

if [ -z &quot;$1&quot; ]; then
	echo
	echo &quot;ERROR: Must pass parameter of path to directory (which will have permissions set accordingly; 755 directories and 644 files).&quot;
	echo &quot;USAGE: $0 /path/to/directory&quot;
	echo
	exit 1
fi

echo
echo &quot;Working recursively with directory $1 this script will chmod 755 all directories and chmod 644 all files.&quot;

read -p &quot;Okay to continue (y/n)? &quot;
if [ &quot;$REPLY&quot; != &quot;y&quot; ]; then
	echo
	echo &quot;EXITING -- NO ACTION TAKEN.&quot;
	echo
	exit 1
fi

echo
echo &quot;Starting...&quot;
echo

find &quot;$1&quot; -type d -print0 | xargs -0 chmod 755
find &quot;$1&quot; -type f -print0 | xargs -0 chmod 644

echo &quot;Done.&quot;
echo

exit 0&lt;/code&gt;

Since I&apos;ll often need to run this script as root, I&apos;ve taken a few extra steps to protect it by making it owned and executable only by root:

&lt;code&gt;sudo chown root:root setperms.sh
sudo chmod 744 setperms.sh&lt;/code&gt;

So, from the directory containing this script (as you can see I&apos;ve named mine &lt;em&gt;setperms.sh&lt;/em&gt;), here&apos;s an example usage:

&lt;code&gt;sudo ./setperms.sh ~/directory-to-clean-up-permissions&lt;/code&gt;

If your directory has strange owners and/or groups set, you can quickly clean that up recursively as well. For example:

&lt;code&gt;sudo chown -R jkrug:jkrug ~/directory-to-clean-up-permissions&lt;/code&gt;
				
				</description>
						
				
				<category>Linux</category>				
				
				<category>Bash</category>				
				
				<pubDate>Mon, 28 Dec 2009 15:57:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2009/12/28/bash-script-to-set-sensible-directory-file-permissions</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>SvnAnt Task/Type Definition Import</title>
				<link>http://jamiekrug.com/blog/index.cfm/2009/10/13/svnant-task-type-definition-import</link>
				<description>
				
				I&apos;m finally getting wise and leveraging &lt;a href=&quot;http://ant.apache.org/&quot;&gt;ANT&lt;/a&gt; more, and yesterday was my first attempt at integrating some &lt;a href=&quot;http://subversion.tigris.org/&quot;&gt;Subversion&lt;/a&gt; tasks. I discovered &lt;a href=&quot;http://subclipse.tigris.org/svnant.html&quot;&gt;SvnAnt&lt;/a&gt; rather quickly, but didn&apos;t have a good sense for the best way to leverage it. Marc Esher kindly helped with a response to my &lt;a href=&quot;http://blog.mxunit.org/2009/09/using-svnant-in-your-ant-build-files.html&quot;&gt;comment here&lt;/a&gt;.

Rather than repeating a bunch of path/fileset/typedef lines in every build file that requires SVN tasks, I decided to create a simple build file that would handle this type definition and allow me to place just one import line into each build file that requires SVN tasks.

To start, I downloaded the proper SvnAnt distribution (&lt;a href=&quot;http://subclipse.tigris.org/svnant.html&quot;&gt;from here&lt;/a&gt;), unzipped the folder under my /opt directory (I&apos;m running &lt;a href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt;), and created a symbolic link to the folder so I can reference it as /opt/svnant.

Then, under my /opt/svnant folder I created a build file called svnant-typedef.xml with the following:

&lt;code&gt;&lt;!--
	This build file serves to map SvnAnt&apos;s task and type names to their implementing classes.
	This file should be located in the SvnAnt distribution folder root (parent directory of /lib).
	It can be imported to any build file, rather than repeating, for example:
	&lt;import file=&quot;/opt/svnant/svnant-typedef.xml&quot; /&gt;
--&gt;
&lt;project name=&quot;svnant-typedef&quot; basedir=&quot;.&quot;&gt;

	&lt;!-- get directory of current build file --&gt;
	&lt;dirname property=&quot;svnant.basedir&quot; file=&quot;${ant.file.svnant-typedef}&quot; /&gt;

	&lt;!-- file set for SVNAnt classpath reference --&gt;
	&lt;path id=&quot;svnant.classpath&quot;&gt;
		&lt;fileset dir=&quot;${svnant.basedir}/lib&quot;&gt;
			&lt;include name=&quot;*.jar&quot; /&gt;
		&lt;/fileset&gt;
	&lt;/path&gt;

	&lt;!-- task/type definitions for SVNAnt library --&gt;
	&lt;typedef resource=&quot;org/tigris/subversion/svnant/svnantlib.xml&quot; classpathref=&quot;svnant.classpath&quot; /&gt;

&lt;/project&gt;&lt;/code&gt;

You can read about the ANT import task and its special properties &lt;a href=&quot;http://ant.apache.org/manual/CoreTasks/import.html&quot;&gt;here&lt;/a&gt;.

Now I need only import the above file in build file&apos;s that will use SVN tasks. Here&apos;s an example:

&lt;code&gt;&lt;project name=&quot;example&quot; default=&quot;main&quot; basedir=&quot;.&quot;&gt;

	&lt;import file=&quot;/opt/svnant/svnant-typedef.xml&quot; /&gt;

	&lt;target name=&quot;main&quot;&gt;
		&lt;svn svnkit=&quot;true&quot; javahl=&quot;false&quot;&gt;
			&lt;export srcurl=&quot;file:///home/svn/example/trunk&quot; destpath=&quot;/tmp/example&quot; /&gt;
		&lt;/svn&gt;
	&lt;/target&gt;

&lt;/project&gt;&lt;/code&gt;
				
				</description>
						
				
				<category>ANT</category>				
				
				<category>Subversion</category>				
				
				<pubDate>Tue, 13 Oct 2009 15:05:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2009/10/13/svnant-task-type-definition-import</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Apache Authentication with Proxy</title>
				<link>http://jamiekrug.com/blog/index.cfm/2009/8/6/apache-authentication-with-proxy</link>
				<description>
				
				I&apos;ve enjoyed leveraging Apache mod_rewrite and mod_proxy to leverage both the power of URL rewriting and the APJ proxy to proxy CFML requests to &lt;a href=&quot;http://getrailo.org/&quot;&gt;Railo&lt;/a&gt; running on &lt;a href=&quot;http://tomcat.apache.org/&quot;&gt;Tomcat&lt;/a&gt;. I allow Apache to still handle requests for static assets (images, javascript, etc.). Today, I ran into a problem when I wanted to slap some basic authentication on a site. Requests handled entirely by Apache (static assets) were challenged for authentication, but CFML requests were proxied to Tomcat without requiring authentication. It makes perfect sense, as did the solution once I found it, but it just didn&apos;t occur to me at first.

First, here&apos;s a quick example of a basic virtual host that I&apos;d use:

&lt;code&gt;&lt;VirtualHost *:80&gt;
	ServerName mysite
	DocumentRoot /var/www/mysite/webroot/
	DirectoryIndex index.cfm

	&lt;Proxy *&gt;
		Allow from 127.0.0.1
	&lt;/Proxy&gt;

	ProxyPreserveHost On
	ProxyPassReverse  /  ajp://mysite:8009/

	RewriteEngine On

	RewriteRule  ^(.+\.cf[cm])(/.*)?$  ajp://%{HTTP_HOST}:8009$1$2  [P]
&lt;/VirtualHost&gt;&lt;/code&gt;

After creating a password file using the htpasswd command, I thought I&apos;d simply add the following inside my VirtualHost to provide basic authentication.

&lt;code&gt;&lt;Directory /var/www/mysite/webroot/&gt;
	AuthType Basic
	AuthName &quot;Restricted Files&quot;
	AuthUserFile /usr/local/etc/apache/mysite.passwd
	Require user someusername
&lt;/Directory&gt;&lt;/code&gt;

Unfortunately, as I mentioned, this only protected non-proxied requests. Fortunately, I found the tip for my solution relatively quickly at stackoverflow, &lt;a href=&quot;http://stackoverflow.com/questions/724599/setting-up-an-apache-proxy-with-authentication&quot;&gt;here&lt;/a&gt;. I simply needed to apply the same authentication directives within the Proxy context.

Here&apos;s the revised virtual host with basic authentication for both static assets and those proxied to Tomcat:

&lt;code&gt;&lt;VirtualHost *:80&gt;
	ServerName mysite
	DocumentRoot /var/www/mysite/webroot/
	DirectoryIndex index.cfm

	&lt;Directory /var/www/mysite/webroot/&gt;
		AuthType Basic
		AuthName &quot;Restricted Files&quot;
		AuthUserFile /usr/local/etc/apache/mysite.passwd
		Require user someusername
	&lt;/Directory&gt;

	&lt;Proxy *&gt;
		Allow from 127.0.0.1
		AuthType Basic
		AuthName &quot;Restricted Files&quot;
		AuthUserFile /usr/local/etc/apache/mysite.passwd
		Require user someusername
	&lt;/Proxy&gt;

	ProxyPreserveHost On
	ProxyPassReverse  /  ajp://mysite:8009/

	RewriteEngine On

	RewriteRule  ^(.+\.cf[cm])(/.*)?$  ajp://%{HTTP_HOST}:8009$1$2  [P]
&lt;/VirtualHost&gt;&lt;/code&gt;
				
				</description>
						
				
				<category>CFML</category>				
				
				<category>Tomcat</category>				
				
				<category>Railo</category>				
				
				<category>Apache</category>				
				
				<pubDate>Thu, 06 Aug 2009 22:53:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2009/8/6/apache-authentication-with-proxy</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Catch-all Apache Virtual Host to Force WWW Redirect on Canonical Hostnames</title>
				<link>http://jamiekrug.com/blog/index.cfm/2009/8/6/catch-all-apache-virtual-host-to-force-www-redirect-on-canonical-hostnames</link>
				<description>
				
				I find myself doing the same thing with nearly every Web site that I launch on my VPS (and client VPS/dedicated servers). I was to use http://www.domain.com as the primary host and have http://domain.com permanently redirect (301) while keeping the request URI intact.

Today, I decided to simplify this configuration by using a single Apache virtual host to handle all &quot;www redirects.&quot; I thought I&apos;d share this simple little tip.

When using name based hosting with Apache, this is very simple with mod_rewrite:

&lt;code&gt;
&lt;VirtualHost *:80&gt;
	ServerName  jamiekrug.com
	ServerAlias thekrugs.com

	RewriteEngine On
	RewriteRule  .  http://www.%{HTTP_HOST}%{REQUEST_URI}  [R=301,NE,L]
&lt;/VirtualHost&gt;
&lt;/code&gt;

Now, as I add other virtual hosts to the server, I need only add a ServerAlias line to the above virtual host and I&apos;m good to go.
				
				</description>
						
				
				<category>Apache</category>				
				
				<pubDate>Thu, 06 Aug 2009 16:07:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2009/8/6/catch-all-apache-virtual-host-to-force-www-redirect-on-canonical-hostnames</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>CFC Creation Time in ColdFusion 8/9, Open BlueDragon 1.1 and Railo 3.1</title>
				<link>http://jamiekrug.com/blog/index.cfm/2009/7/21/cfc-creation-time-in-coldfusion-8-9-open-bluedragon-11-and-railo-31</link>
				<description>
				
				There&apos;s lots of chatter about CFC creation performance in the popular CFML engines (&lt;a href=&quot;http://www.adobe.com/products/coldfusion/&quot;&gt;Adobe ColdFusion&lt;/a&gt;, &lt;a href=&quot;http://openbluedragon.org/&quot;&gt;Open BlueDragon&lt;/a&gt; and &lt;a href=&quot;http://www.getrailo.org/&quot;&gt;Railo&lt;/a&gt;), and plenty of others have ran their own tests, but I&apos;m just curious and had to see some tests for myself. 

I do not intend to encourage anyone to choose any one engine over another solely based on these tests. This is just one small indicator of the many performance considerations! In a real world application, there are &lt;strong&gt;many&lt;/strong&gt; other performance considerations (hardware, operating system, application server, JVM tuning, CFML engine admin settings, various cache mechanisms, database server, database tuning, etc.).

I&apos;m just focused on the speed of CFC creation here. In many small or medium sized apps, this is not much of a factor, but in larger applications where large sets of objects need to be created, this can potentially become crippling to application performance.

Also keep in mind that not all CFML applications are guaranteed or even likely to migrate flawlessly between any two CFML engines, despite lots of great progress towards compatibility and a core CFML spec. There are also lots of vendor specific features that may sway a particular developer or team to a particular CFML engine, and this may vary from project to project.

I could ramble on with more disclaimers, but let&apos;s get to the good stuff!
				 [More]
				</description>
						
				
				<category>CFML</category>				
				
				<category>Open BlueDragon</category>				
				
				<category>ColdFusion</category>				
				
				<category>Railo</category>				
				
				<pubDate>Tue, 21 Jul 2009 16:50:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2009/7/21/cfc-creation-time-in-coldfusion-8-9-open-bluedragon-11-and-railo-31</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>&quot;Does anyone have an opinion on Adobe Coldfusion?&quot;</title>
				<link>http://jamiekrug.com/blog/index.cfm/2009/7/2/opinion-on-adobe-coldfusion-cfml</link>
				<description>
				
				&lt;p&gt;A (very) brief list of ColdFusion/CFML resource links in response to Tweet from &lt;a href=&quot;http://twitter.com/ryanmaurodesign&quot;&gt;@ryanmaurodesign&lt;/a&gt;: &amp;quot;Does anyone have an opinion on Adobe Coldfusion?&amp;quot;&lt;/p&gt;
&lt;p&gt;The short answer: yes :) There is a vibrant CFML community and many will be excited to tell you why it&apos;s so fantastic!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.adobe.com/products/coldfusion/evangelism_kit/&quot;&gt;Adobe ColdFusion Evangelism Kit&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Other major (open source and free) CFML engines:&lt;br /&gt;
&lt;a href=&quot;http://www.openbluedragon.org/&quot;&gt;Open BlueDragon&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.getrailo.org/&quot;&gt;Railo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.opencfml.org/&quot;&gt;CFML Advisory Committee&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ColdFusion is a Java EE application... &lt;a href=&quot;http://en.wikipedia.org/wiki/Coldfusion#ColdFusion_and_Java&quot;&gt;http://en.wikipedia.org/wiki/Coldfusion#ColdFusion_and_Java&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just a few of the very many busy bloggers:&lt;br /&gt;
&lt;a href=&quot;http://forta.com/&quot;&gt;Ben Forta&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://bennadel.com/&quot;&gt;Ben Nadel&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.carehart.org/&quot;&gt;Charlie Arehart&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://halhelms.com/&quot;&gt;Hal Helms&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.coldfusionjedi.com/&quot;&gt;Ray Camden&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://corfield.org/&quot;&gt;Sean Corfield&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;...and a bunch more ;-)&lt;br /&gt;
&lt;a href=&quot;http://coldfusionbloggers.org/&quot;&gt;http://coldfusionbloggers.org/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A bunch of open source ColdFusion apps (as well as other Adobe RIA related stuff):&lt;br /&gt;
&lt;a href=&quot;http://riaforge.org/&quot;&gt;RIAForge&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Popular MVC frameworks (there are more):&lt;br /&gt;
&lt;a href=&quot;http://www.coldboxframework.com/&quot;&gt;ColdBox&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.fusebox.org/&quot;&gt;Fusebox&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.mach-ii.com/&quot;&gt;Mach-II&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.model-glue.com/&quot;&gt;Model-Glue&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Other popular frameworks (there are more):&lt;br /&gt;
&lt;a href=&quot;http://coldspringframework.org/&quot;&gt;ColdSpring (&amp;quot;Spring framework for ColdFusion&amp;quot;)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://reactorframework.com/&quot;&gt;Reactor (ORM)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.transfer-orm.com/&quot;&gt;Transfer ORM&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There&apos;s a ton of other great information out there, so go check it out! (Ignore the occasional/ignorant &amp;quot;ColdFusion is dead&amp;quot; nonsense that somehow still creeps up from time to time, despite continued growth!:)&lt;/p&gt;
				
				</description>
						
				
				<category>CFML</category>				
				
				<category>ColdFusion</category>				
				
				<category>Railo</category>				
				
				<pubDate>Thu, 02 Jul 2009 23:08:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2009/7/2/opinion-on-adobe-coldfusion-cfml</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Support Flex/Flash Builder for Linux</title>
				<link>http://jamiekrug.com/blog/index.cfm/2009/6/4/support-flex-flash-builder-for-linux</link>
				<description>
				
				It was &lt;a href=&quot;http://gruchalski.com/2009/04/22/flex-builder-3-for-linux-on-hold/&quot; title=&quot;Flex Builder 3 for Linux on hold&quot;&gt;reported that Flex Builder for Linux is on hold&lt;/a&gt;.

Rather than go into a lengthy discourse here on why I feel Flex/Flash Builder should be available to Linux desktop developers, I&apos;ll direct those interested to &lt;a href=&quot;http://bugs.adobe.com/jira/browse/FB-19053&quot;&gt;this Adobe issue/bug report&lt;/a&gt;, which contains plenty of great comments and lots of votes in support.

If you agree, please be sure to &lt;strong&gt;&lt;a href=&quot;http://bugs.adobe.com/jira/browse/FB-19053&quot;&gt;vote for this issue&lt;/a&gt;&lt;/strong&gt;.

I would also like to draw attention to a &lt;a href=&quot;http://arstechnica.com/open-source/news/2009/05/eclipse-survey-results-show-growth-in-linux-open-source.ars&quot;&gt;recent survey by the Eclipse Foundation&lt;/a&gt;.

So...

The number of developers using Eclipse on Linux workstations has grown from 20% in 2007 to 27% in 2009...&lt;br /&gt;
+&lt;br /&gt;
Eclipse is likely the most popular open source IDE (certainly for Java/CFML developers)...&lt;br /&gt;
+&lt;br /&gt;
Adobe has open-sourced the Flex SDK...&lt;br /&gt;
+&lt;br /&gt;
Linux likely has the most vibrant open source software community of developers...&lt;br /&gt;
+&lt;br /&gt;
Adobe has a Flex Builder Eclipse plug-in...&lt;br /&gt;
+&lt;br /&gt;
Adobe provides no means for a developer using Eclipse on Linux to become a Flex developer???&lt;br /&gt;
=&lt;br /&gt;
I will be happy to spend $249 on &lt;a href=&quot;http://www.jetbrains.com/idea/&quot;&gt;IntelliJ IDEA&lt;/a&gt;, which appears to provide &lt;a href=&quot;http://www.jetbrains.com/idea/training/demos/flex.html&quot;&gt;great Flex support out of the box&lt;/a&gt;.
				
				</description>
						
				
				<category>IDE</category>				
				
				<category>Flex</category>				
				
				<category>Linux</category>				
				
				<pubDate>Thu, 04 Jun 2009 15:24:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2009/6/4/support-flex-flash-builder-for-linux</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Mura CMS bug and mod_rewrite workaround: 200 OK instead of 404 error</title>
				<link>http://jamiekrug.com/blog/index.cfm/2009/6/4/mura-cms-bug-200-ok-instead-of-404-error</link>
				<description>
				
				I&apos;ve discovered a bit of a bug in the way &lt;a href=&quot;http://www.getmura.com/&quot;&gt;Mura CMS&lt;/a&gt; handles 404s and wanted to share my workaround. Valid path_info for Mura pages consist of only letters, numbers, hyphens and forward slashes. If you browse to a path that doesn&apos;t exists, Mura properly throws a 404 error -- well, &lt;strong&gt;sometimes&lt;/strong&gt;...

If it&apos;s a valid Mura formatted URL, you&apos;ll get a 404. For example:

&lt;a href=&quot;http://www.getmura.com/index.cfm/i-do-not-exist/&quot; target=&quot;blank&quot;&gt;http://www.getmura.com/index.cfm/i-do-not-exist/&lt;/a&gt;

...however, if the path_info is not &quot;valid,&quot; Mura seems to ignore it and display the home page -- for example:

&lt;a href=&quot;http://www.getmura.com/index.cfm/i-do-not-exist.html&quot; target=&quot;blank&quot;&gt;http://www.getmura.com/index.cfm/i-do-not-exist.html&lt;/a&gt;

On some sites, you might not care about this, but Google and other spiders can become very suspicious when non-existent URLs return a 200 response instead of a 404. I discovered this when our SEO/content guru was having trouble getting Google Webmaster tools to verify after I uploaded the specified uniquely-named html file. Google refused to authenticate us, because they were attempting to &quot;test&quot; for a 404 and instead got 200 responses. I assume they just make up a random file name or path and expect a 404. It makes sense that they want to ensure that the site doesn&apos;t return a 200 OK for &lt;em&gt;everything&lt;/em&gt;, because they can not count on the 200 from the authenticity file/URL to be true.

You can leverage URL rewriting as one workaround, as I have. Based on the standard default site URL format of Mura CMS, you can use something like the following with Apache mod_rewrite to force a Mura 404 when an &quot;invalid&quot; path_info exists:

&lt;code&gt;RewriteEngine On
RewriteRule ^/default/index.cfm/([^a-zA-Z0-9/-]+)$ /default/index.cfm/force-a-404-error/ [PT,L]&lt;/code&gt;
				
				</description>
						
				
				<category>CFML</category>				
				
				<category>Mura CMS</category>				
				
				<category>Apache</category>				
				
				<pubDate>Thu, 04 Jun 2009 14:35:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2009/6/4/mura-cms-bug-200-ok-instead-of-404-error</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>URL Rewrite Goodies for Apache, Tomcat, Railo and Mura CMS</title>
				<link>http://jamiekrug.com/blog/index.cfm/2009/5/22/url-rewrite-goodies-for-apache-tomcat-railo-and-mura-cms</link>
				<description>
				
				&lt;em&gt;&lt;strong&gt;UPDATE, 8/31/2010:&lt;/strong&gt; I&apos;m going with a simplified approach these days, as &lt;a href=&quot;http://jamiekrug.com/blog/index.cfm/2010/8/31/cfml-tomcat-apache-ajp-proxy-redux&quot;&gt;posted here&lt;/a&gt;.&lt;/em&gt;

I&apos;ve worked with &lt;a href=&quot;http://httpd.apache.org/docs/2.2/rewrite/&quot;&gt;Apache mod_rewrite&lt;/a&gt; quite a bit in the past, but never got into any terribly complex rewrite rules. On average, I&apos;ve probably leveraged about 2% of the incredible potential power that mod_rewrite offers. More recently I finally had the opportunity to learn a bit more and leverage this handy tool. My rewrite rules evolved over the past couple months as I got into testing out the &lt;a href=&quot;http://www.getrailo.org/&quot;&gt;Railo CFML engine&lt;/a&gt; a bit more, and then while setting up my first &lt;a href=&quot;http://www.getmura.com/&quot;&gt;Mura CMS&lt;/a&gt; powered site. I thought I&apos;d share what I&apos;ve learned, as others may be likely to use some or all of this type of Apache virtual host configuration.

Here&apos;s a run-down of the &quot;end goal,&quot; if you will, which I will walk through step by step to recap the problems and solutions I discovered along the way:

&lt;ul&gt;
&lt;li&gt;Apache will proxy CFML requests to Tomcat servlet engine, for Railo to handle (while Apache handles all other static content, PHP, etc.)&lt;/li&gt;
&lt;li&gt;Tomcat will properly have Railo handle this common SES style URL (leveraging cgi.path_info): http://host/index.cfm/path-info/&lt;/li&gt;
&lt;li&gt;Protect Railo Admin URLs from public access (well, actually &lt;em&gt;hide&lt;/em&gt; them to mitigate hacking attempts)&lt;/li&gt;
&lt;li&gt;Run a Mura CMS site with super SEO friendly URLs (e.g., http://host/a-cms-page/ instead of the default http://host/siteid/index.cfm/a-cms-page/), while still allowing for standard CFML requests (for custom app integration under same host as CMS)&lt;/li&gt;
&lt;/ul&gt;

Please note that the following Apache modules must be activated in your Apache configuration: mod_rewrite, mod_proxy and mod_proxy_ajp.

&lt;h2&gt;Apache Proxy CFML Request to Tomcat/Railo&lt;/h2&gt;

I&apos;ll simply direct you to existing resources for this first bit and then show my basic example virtual hosting configuration. First, I&apos;m running Railo in a multi-web setup on a single instance of Tomcat, which &lt;a href=&quot;http://corfield.org/entry/Railo_on_Tomcat__multiweb&quot;&gt;Sean Corfield has nicely outlined here&lt;/a&gt; (including a kind nod to &lt;a href=&quot;http://jamiekrug.com/blog/index.cfm/2009/4/1/railo-jars-on-jboss-or-tomcat-tips-and-tricks&quot;&gt;a prior blog post of mine&lt;/a&gt; :). I learned a very nice means of proxying CFML requests from Apache to Tomcat thanks to &lt;a href=&quot;http://corfield.org/entry/Railo_for_Dummies_Part_IV_Appendix&quot;&gt;this Sean Corfield post&lt;/a&gt;, which was prompted by some helpful comments from &lt;a href=&quot;http://www.barneyb.com/barneyblog/&quot;&gt;Barney Boisvert&lt;/a&gt; on Sean&apos;s &lt;a href=&quot;http://corfield.org/entry/Railo_for_Dummies_Part_IV&quot;&gt;prior post&lt;/a&gt;.

So here is an example Apache virtual host:

&lt;code&gt;&lt;VirtualHost *:80&gt;
	ServerName railocmstest
	DocumentRoot /var/www/railocmstest/webroot
	DirectoryIndex index.cfm

	&lt;Proxy *&gt;
		Allow from 127.0.0.1
	&lt;/Proxy&gt;

	ProxyPreserveHost On
	ProxyPassReverse / ajp://railocmstest:8009/

	RewriteEngine On

	# If it&apos;s a CFML (*.cfc or *.cfm) request, just proxy it to Tomcat:
	RewriteRule  ^(.+\.cf[cm])$  ajp://%{HTTP_HOST}:8009$1  [P]
&lt;/VirtualHost&gt;&lt;/code&gt;

&lt;h2&gt;SES URLs with path_info&lt;/h2&gt;

Okay, the above gets Apache proxying standard *.cfm/*.cfc requests to Tomcat for Railo to handle, but a request to http://railocmstest/index.cfm/some-path-info/ will simply throw a 404 error, because Apache finds neither file nor directory at /var/www/railocmstest/webroot/index.cfm/some-path-info/. Plus, the current rewrite rule is not even proxying this type of request to Tomcat, because the regular expression used only looks for any URI that &lt;em&gt;ends&lt;/em&gt; with &quot;.cfc&quot; or &quot;.cfm&quot;.

Simply change this line:

&lt;code&gt;RewriteRule  ^(.+\.cf[cm])$  ajp://%{HTTP_HOST}:8009$1  [P]&lt;/code&gt;

...to this:

&lt;code&gt;RewriteRule  ^(.+\.cf[cm])(/.*)?$  ajp://%{HTTP_HOST}:8009$1$2  [P]&lt;/code&gt;

Okay, now if we reload Apache the http://railocmstest/index.cfm/some-path-info/ will indeed be proxied to Tomcat, however, now we just get the 404 error from Tomcat instead of Apache! Not a problem -- I picked up another trick from a comment by &lt;a href=&quot;http://www.objectivebias.com/blog/&quot;&gt;Tony Garcia&lt;/a&gt; on, again, &lt;a href=&quot;http://corfield.org/entry/Railo_for_Dummies_Part_IV_Appendix&quot;&gt;this Sean Corfield post&lt;/a&gt;. In either our Tomcat&apos;s conf/server.xml file or in our Web root&apos;s WEB-INF/web.xml (you can create one if it doesn&apos;t exist) file, add the following servlet mapping:

&lt;servlet-mapping&gt;
    &lt;servlet-name&gt;CFMLServlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/index.cfm/*&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;

Just be sure the servlet name you use here matches the one used for Railo, which is &lt;em&gt;CFMLServlet&lt;/em&gt; by default, but I change mine to &lt;em&gt;GlobalCFMLServlet&lt;/em&gt; in my multi-web setup as explained &lt;a href=&quot;http://jamiekrug.com/blog/index.cfm/2009/4/1/railo-jars-on-jboss-or-tomcat-tips-and-tricks&gt;here&lt;/a&gt; and &lt;a href=&quot;http://corfield.org/entry/Railo_on_Tomcat__multiweb&quot;&gt;here&lt;/a&gt;.

We can now restart our Tomcat service and http://railocmstest/index.cfm/some-path-info/ is now good to go -- no more 404 error and cgi.path_info will now properly return &lt;em&gt;/some-path-info/&lt;/em&gt;.

You may be inclined to try a URL pattern of /*.cfm/* in your servlet mapping, as I was, but it will not work as expected. If you also need URLs ending with /other.cfm/path-info/ and /app/index.cfm/path-info/, for example, you&apos;ll have to add two more servlet mappings with URL patterns &lt;em&gt;/other.cfm/*&lt;/em&gt; and &lt;em&gt;/app/index.cfm/*&lt;/em&gt;.

&lt;h2&gt;Hide Railo Admin URLs&lt;/h2&gt;

A simple way to hide your Railo Admin URLs is to use one rewrite rule to forbid access to any paths beginning with /railo-context/admin/ and use some unusual URL to proxy in its place:

&lt;code&gt;RewriteRule  ^/railo-context/admin/(.*)  -  [F]

RewriteRule  ^/SOMETHING-DIFFICULT-TO-GUESS/admin/(.*\.cf[cm])$  ajp://%{HTTP_HOST}:8009/railo-context/admin/$1  [P]&lt;/code&gt;

After an Apache reload, the above rewrite rules will cause a 403 (Forbidden) error to be thrown at http://railocmstest/railo-context/admin/index.cfm, but you can find what you&apos;re looking for at http://railocmstest/SOMETHING-DIFFICULT-TO-GUESS/admin/index.cfm with no problem. In &lt;a href=&quot;http://groups.google.com/group/railo/browse_thread/thread/b3e536a924477116/83868f3feb0cf1c1&quot;&gt;this Railo Google Groop thread&lt;/a&gt; Sean Corfield also suggests using a separate virtual host to access your admin, which can listen on an unusual port. You could also use SSL to encrypt transmissions at the admin URLs.

&lt;h2&gt;Super SES CMS URLs&lt;/h2&gt;

&quot;Out of the box,&quot; &lt;a href=&quot;http://www.getmura.com/&quot;&gt;Mura CMS&lt;/a&gt; has relatively friendly, SES URLs of the form http://host/siteid/index.cfm/something-friendly/, but we can do better. In the &lt;a href=&quot;http://www.getmura.com/forum/&quot;&gt;helpful Mura forums&lt;/a&gt; I quickly found the information I needed to make very quick changes to the Mura code to get rid of the &lt;em&gt;/siteid/index.cfm&lt;/em&gt; portion of the URLs generated. Since there were two steps, in two different threads, plus one other tweak I found necessary, I posted a &lt;a href=&quot;http://www.getmura.com/forum/messages.cfm?threadid=4EE1B98E-BA4E-4A2D-8CCACFD78269E26C&quot;&gt;summary thread to a Mura forum&lt;/a&gt;. The rewrite rule example I provide in the form thread is more generic, intended to work without consideration for Tomcat proxying, Railo Admin hiding, etc., so here&apos;s what I&apos;ve actually done for my first Mura CMS powered site...

I found that I needed to cover a few extra use cases. These four situations must be covered:

&lt;ol&gt;
&lt;li&gt;If there&apos;s a trailing slash and it resolves to an existing physical directory, then we&apos;ll assume there should be an index.cfm in there and proxy to Tomcat.&lt;/li&gt;
&lt;li&gt;If it&apos;s an existing file, just let Apache serve it -- this takes care of all static and non-CFML requests.&lt;/li&gt;
&lt;li&gt;If rewrite rules are still processing, then we must be looking for a Mura CMS powered URL, which must have a trailing slash, so we&apos;ll permanently redirect with an appended trailing slash if it&apos;s missing.&lt;/li&gt;
&lt;li&gt;Finally, if rewrite rules are still processing, then we&apos;ll just prepend &quot;index.cfm&quot; in front of the REQUEST_URI.&lt;/li&gt;
&lt;/ol&gt;

...and here it is:

&lt;code&gt;# If trailing slash and real directory, then append index.cfm and proxy it to Tomcat/Railo:
RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_URI}  -d
RewriteRule  ^(.+/)$  ajp://%{HTTP_HOST}:8009%{REQUEST_URI}index.cfm  [P]

# If it&apos;s a real file (and we haven&apos;t proxied to Tomcat, so it must be static), just serve it:
RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_URI}  -f
RewriteRule  .  -  [L]

# Require trailing slash at this point:
RewriteRule  ^(.+[^/])$  $1/  [R=301,L]

# Everything else must be a CMS URL path, which is rewritten and proxied to Tomcat/Railo:
# MUST COME AFTER ANY OTHER FIXED/EXPECTED REWRITES!
RewriteRule  .  ajp://%{HTTP_HOST}:8009/index.cfm%{REQUEST_URI}  [NE,P]&lt;/code&gt;

If you&apos;re wondering why I have rewrite conditions with &lt;em&gt;%{DOCUMENT_ROOT}%{REQUEST_URI}&lt;/em&gt; instead of &lt;em&gt;%{REQUEST_FILENAME}&lt;/em&gt; when checking for file/directory existence, it&apos;s because the latter just didn&apos;t work for me! All examples I&apos;ve seen suggest the latter, but it just didn&apos;t work -- possibly something Ubuntu-specific, or something that I changed elsewhere in my Apache configuration? I don&apos;t know, but what I&apos;ve used should work on any setup.

&lt;h3 style=&quot;color: red;&quot;&gt;UPDATE (2009-06-04)&lt;/h3&gt;

I&apos;ve discovered &lt;a href=&quot;http://jamiekrug.com/blog/index.cfm/2009/6/4/mura-cms-bug-200-ok-instead-of-404-error&quot;&gt;a little bug in Mura CMS&lt;/a&gt; regarding the handling of would-be 404 pages, so the last two rewrite rules from above must be changed to be less broad and an additional final rule can be added to still leverage the friendly/skinned Mura 404 page (rather than Apache&apos;s default 404):

&lt;code&gt;# Require trailing slash at this point, if otherwise valid CMS URL:
RewriteRule  ^([a-zA-Z0-9/-]+[^/])$  $1/  [R=301,L]

# Valid CMS URL path is proxied to Tomcat/Railo:
# MUST COME AFTER ANY OTHER FIXED/EXPECTED REWRITES!
RewriteRule  ^([a-zA-Z0-9/-]+)$  ajp://%{HTTP_HOST}:8009/index.cfm%{REQUEST_URI}  [NE,P]

# Anything else must be a 404 error:
RewriteRule  .  ajp://%{HTTP_HOST}:8009/index.cfm/this-will-force-a-404/  [NE,P]&lt;/code&gt;

I&apos;ve also updated the following &lt;em&gt;Complete Package&lt;/em&gt; section to reflect these updates...

&lt;h2&gt;The Complete Package&lt;/h2&gt;

So, here is the complete virtual host example, incorporating all of the above:

&lt;code&gt;&lt;VirtualHost *:80&gt;
	ServerName railocmstest
	DocumentRoot /var/www/railocmstest/webroot
	DirectoryIndex index.cfm

	&lt;Proxy *&gt;
		Allow from 127.0.0.1
	&lt;/Proxy&gt;

	ProxyPreserveHost On
	ProxyPassReverse / ajp://railocmstest:8009/

	RewriteEngine On

	# Forbid access to Railo Admin URLs:
	RewriteRule  ^/railo-context/admin/(.*)  -  [F]

	# Proxy &quot;secret&quot; Railo Admin URLs to &quot;real&quot; Railo Admin URLs on Tomcat:
	RewriteRule  ^/SOMETHING-DIFFICULT-TO-GUESS/admin/(.*\.cf[cm])$  ajp://%{HTTP_HOST}:8009/railo-context/admin/$1  [P]

	# If it&apos;s a CFML (*.cfc or *.cfm) request, just proxy it to Tomcat:
	RewriteRule  ^(.+\.cf[cm])(/.*)?$  ajp://%{HTTP_HOST}:8009$1$2  [P]

	# If trailing slash and real directory, then append index.cfm and proxy it to Tomcat/Railo:
	RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_URI}  -d
	RewriteRule  ^(.+/)$  ajp://%{HTTP_HOST}:8009%{REQUEST_URI}index.cfm  [P]

	# If it&apos;s a real file (and we haven&apos;t proxied to Tomcat, so it must be static), just serve it:
	RewriteCond  %{DOCUMENT_ROOT}%{REQUEST_URI}  -f
	RewriteRule  .  -  [L]

	# NOTE: Everything else must be a CMS URL path (letters/numbers/hyphens/slashes only), or a 404...

	# Require trailing slash at this point, if otherwise valid CMS URL:
	RewriteRule  ^([a-zA-Z0-9/-]+[^/])$  $1/  [R=301,L]

	# Valid CMS URL path is proxied to Tomcat/Railo:
	# MUST COME AFTER ANY OTHER FIXED/EXPECTED REWRITES!
	RewriteRule  ^([a-zA-Z0-9/-]+)$  ajp://%{HTTP_HOST}:8009/index.cfm%{REQUEST_URI}  [NE,P]

	# Anything else must be a 404 error:
	RewriteRule  .  ajp://%{HTTP_HOST}:8009/index.cfm/this-will-force-a-404/  [NE,P]
&lt;/VirtualHost&gt;&lt;/code&gt;

Cheers!
				
				</description>
						
				
				<category>CFML</category>				
				
				<category>Tomcat</category>				
				
				<category>Mura CMS</category>				
				
				<category>Railo</category>				
				
				<category>Apache</category>				
				
				<pubDate>Fri, 22 May 2009 23:33:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2009/5/22/url-rewrite-goodies-for-apache-tomcat-railo-and-mura-cms</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>CFFormProtect Rocks!</title>
				<link>http://jamiekrug.com/blog/index.cfm/2009/5/12/cfformprotect-rocks</link>
				<description>
				
				&lt;a href=&quot;http://www.briankotek.com/blog/index.cfm/2009/3/20/Finally-Using-CFFormProtect-And-Getting-Zero-Spam&quot;&gt;Others&lt;/a&gt; have praised &lt;a href=&quot;http://cfformprotect.riaforge.org/&quot;&gt;CFFormProtect&lt;/a&gt;, but I wanted to share a couple quick stats and give another shout out to Jake Munson for the very useful CFFormProtect. If you&apos;re not familiar with CFFormProtect, here is a snippet from the description at RIAForge:

&lt;blockquote&gt;CFFormProtect is a fully accessible, invisible to users form protection system to stop spam bots, and even human spammers. CFFormProtect works like some email spam protection systems, in that it uses a series of tests to find out if a form submission is from a spammer or not. Each test is given an amount of points, and each test that is failed accumulates points. Once a form submission passes the threshold of &apos;spamminess&apos;, the message is flagged as spam and is not posted. The points assigned to each test and the failure limit are easily configurable by you.&lt;/blockquote&gt;

It is quite simple to implement, and the code is rather simple and lightweight, but brilliantly useful and powerful! The latest version of &lt;a href=&quot;http://blogcfc.riaforge.org/&quot;&gt;BlogCFC&lt;/a&gt; ships with CFFormProtect and you can optionally enable it to block comment spam. I rarely see any comment spam get through on my blog, but this morning I had a flurry of 10 or more, from the same spammer. I was quickly able to tweak my INI file for CFFormProtect so this particular spam would be blocked from now on. I also decided to peak at the log file for CFFormProtect (you can optionally have CFFormProtect log blocked spam occurrences) and noticed that my blog gets a *LOT* of comment spam, but I never have to deal with it, thanks to CFFormProtect!

This morning was the first comment spam I&apos;ve had get through in months, but it turns out that CFFormProtect has quietly blocked more than 80 spam attempts for me in just the last 24 hours! If you&apos;re a CFML developer and you&apos;d like to protect any form from spam without bothering with CAPTCHA, I highly encourage you to check out &lt;a href=&quot;http://cfformprotect.riaforge.org/&quot;&gt;CFFormProtect&lt;/a&gt;.
				
				</description>
						
				
				<category>CFML</category>				
				
				<pubDate>Tue, 12 May 2009 11:38:00 -0400</pubDate>
				<guid>http://jamiekrug.com/blog/index.cfm/2009/5/12/cfformprotect-rocks</guid>
				
			</item>
			
		 	
			</channel></rss>
