<?xml version="1.0" ?>
<?xml-stylesheet type="text/css" href="http://www.petefreitag.com/rss/simple_style.css" ?>

<rss version="2.0">
	<channel>
		<title>Pete Freitag's Homepage</title>
		<link>http://www.petefreitag.com/</link>
		<description>Covering ColdFusion, Java, Web Development, and other topics</description>
		<language>en-us</language>
		<lastBuildDate>Wed, 25 Jan 2012 23:36:00 GMT</lastBuildDate>
		<ttl>45</ttl>
		
		<item>
			<title>Nginx redirect www to non www domain</title>
			<link>http://www.petefreitag.com/item/802.cfm</link>
			<guid>http://www.petefreitag.com/item/802.cfm</guid>
			<description><![CDATA[ <p>I've been playing around with <strong>Nginx</strong> web server over the past few days, its a great light weight web server, ideal for VPS's or smaller Amazon EC2 instances where resources are not as abundant.</p>
<p>One thing I like about <strong>nginx</strong> so far is the configuration, while I haven't had to do anything overly complex with it yet, it does seam to be quite flexible.</p>
<p>Here's a quick <strong>example of redirecting a www domain to the non www version</strong>:</p>
<pre>
server {
   listen 80;
   server_name www.example.com;
   rewrite ^ http://example.com/ permanent;
}
</pre>
<p>Note that's just one way of doing it, by creating a new virtual server for the non-www hostname and redirecting all requests. You can also do this from within your main server declaration, eg:</p>
<pre>
server {
   listen 80
   root /web/root/;
   if ($host != 'example.com') {
      rewrite ^ http://example.com/ permanent;
   }
}
</pre>
<p>I like the first method better, but this just goes to show how flexible the configuration is for nginx</p> ]]></description>
			<pubDate>Wed, 25 Jan 2012 23:36:00 GMT</pubDate>
			<category>Web</category>
			
			
		</item>
		<item>
			<title>HashDOS and ColdFusion</title>
			<link>http://www.petefreitag.com/item/801.cfm</link>
			<guid>http://www.petefreitag.com/item/801.cfm</guid>
			<description><![CDATA[ <p>Earlier this week at the 28C3 security conference in Berlin researchers presented on a denial of service (DOS) technique that several web application platforms (PHP, ASP.NET, Node.js, Tomcat, Java's HashMap/Hashtable etc) are vulnerable to, known as <code>hashdos</code>.</p>
<p>The exploit takes advantage of hash collisions in the internal implementation of hashtables / hashmaps (think CFML <code>struct</code>). When two keys are hashed and result in the same hash code a collision occurrs, and additional processing must take place to store or retrieve the item. Most application servers store request input variable (eg form, url scopes) in such a data structure. If you can construct a request with variable names that all have the same internal hashcode, the request goes from taking less than a second to process to several minutes.</p>
<p>As you can imagine this can cause a server to crawl/crash pretty quickly with a relatively small payload. Microsoft has released an out of band security patch for ASP.NET already. Tomcat has provided a work around in versions 7.0.23 or 6.0.35 and up.</p>
<p>The typical patch / workaround for this issue is to limit the number of input request variables, ASP.NET defaults this limit to 1000, tomcat defaults to 10,000.</p>
<p>It's not clear yet if this vulnerability is remotely explotable within JRun, or ColdFusion. I did run some tests on a JRun/ColdFusion install and did not replicate the problem, when I tried on Tomcat I did experience the DOS, however it's still very possible that the issue exists on JRun - my tests were certainly not conclusive. If you are running ColdFusion on something other than JRun (such as Tomcat, JBoss which runs on tomcat, etc) make sure to check with your vendor about this issue.</p>
<p>I haven't seen any word from Adobe about this issue yet, but I'll be sure to update this entry and post another if anything becomes public.</p> ]]></description>
			<pubDate>Sat, 31 Dec 2011 06:36:00 GMT</pubDate>
			<category>ColdFusion</category>
			<category>Java</category>
			
			
		</item>
		<item>
			<title>HackMyCF Updated for APSB11-29 Security Hotfix</title>
			<link>http://www.petefreitag.com/item/800.cfm</link>
			<guid>http://www.petefreitag.com/item/800.cfm</guid>
			<description><![CDATA[ <p>Adobe released a security hotfix APSB11-29 for ColdFusion 8 and 9 on Tuesday, which fixes two XSS (Cross Site Scripting) vulnerabilities (CVE-2011-2463 and CVE-2011-4368). One vulnerability exists in <code>cfform</code> and the other in RDS.</p>
<p>Our <a href="http://hackmycf.com/">HackMyCF ColdFusion Server Security Scanner</a> has been updated to find the RDS vulnerability remotely (using our free scan). We can't readily detect the <code>cfform</code> vulnerability remotely because of the proper conditions to exploit are not predictable to find (we would have to crawl your entire site to look for the proper conditions).</p>
<p>We can however detect it, if you have a <a href="https://foundeo.com/hack-my-cf/signup/">HackMyCF Subscription</a>, and have setup the HackMyCF probe (a cfm file you place on your server which allows for encrypted communication). You also get even more detail in your report, showing which Cumulative Hotfixes you have installed, as well as which security hotfixes were applied (currently shows that for 9.0.1 only). Here's a screenshot of what a ColdFusion server security report can look like for a HackMyCF subscriber:</p>
<div align="center">
<a href="https://foundeo.com/hack-my-cf/signup/"><img src="http://www.petefreitag.com/images/blog/hackmycf-coldfusion-security-hotfix-screenshot.png" alt="HackMyCF Detailed ColdFusion security report" title="ColdFusion Server Security Report" /></a>
</div>
<p>As you can see from the above screenshot we recently added a listing of Cumulative Hotfixes installed, that way its easy to know if you are running Cumulative hotfix 1 or cumulative hotfix 2, etc. You can also see things like the JVM version you are running, etc.</p>
<p>For a limited time you can use coupon code <strong>543m</strong> to take $5 off the first 3 months of your subscription.</p> ]]></description>
			<pubDate>Thu, 15 Dec 2011 22:54:00 GMT</pubDate>
			<category>ColdFusion</category>
			
			
		</item>
		<item>
			<title>Adobe eSeminar on FuseGuard</title>
			<link>http://www.petefreitag.com/item/799.cfm</link>
			<guid>http://www.petefreitag.com/item/799.cfm</guid>
			<description><![CDATA[ <p>Adobe has asked me to do an online e-seminar: <em>Protecting ColdFusion Applications with <a href="http://foundeo.com/security/" title="Web Application Firewall for ColdFusion">FuseGuard</a></em> thursday November 3rd at 10am PT / 1pm ET.</p>
<p>If you're curious about FuseGuard and how it works please head over to <a href="http://www.adobe.com/cfusion/event/index.cfm?event=detail&id=1892917&loc=en_us">Adobe.com</a> and register now!</p>
 ]]></description>
			<pubDate>Wed, 26 Oct 2011 18:33:00 GMT</pubDate>
			<category>ColdFusion</category>
			
			
		</item>
		<item>
			<title>Determining Which Cumulative Hotfixes are Installed on ColdFusion</title>
			<link>http://www.petefreitag.com/item/798.cfm</link>
			<guid>http://www.petefreitag.com/item/798.cfm</guid>
			<description><![CDATA[ <p>It's not always obvious which Cumulative hotfixes are installed on a ColdFusion server. I'm pleased to announce that the <a href="https://foundeo.com/hack-my-cf/signup/">paid subscriptions</a> for <a href="https://foundeo.com/hack-my-cf/">HackMyCF</a> now let you know which cumulative (non security) hotfixes you have installed, and which ones you don't.</p>
<p>As you may know Adobe released <a href="http://kb2.adobe.com/cps/918/cpsid_91836.html">Cumulative Hotfix 2 for ColdFusion 9.0.1</a> on Friday. So here's what a server that is running cumulative hotfix 1 for 9.0.1 but not cumulative hotfix 2 looks like in a HackMyCF subscription:</p> 
<div align="center">
<a href="http://www.petefreitag.com/images/blog/hackmycf-cumulative-hotfixes.png" title="Screenshot showing cumulative hotfixes for a ColdFusion 9.0.1 server"><img src="http://www.petefreitag.com/images/blog/hackmycf-cumulative-hotfixes-small.png" style="border:2px solid silver;" border="0" alt="showing cumulative hotfixes installed in ColdFusion" /></a>
</div>

<p>The current known limitations of this feature are:</p>
<ul>
 <li>Not enabled for ColdFusion 8.0.0 or below at this time (does work for 8.0.1 however).</li>
 <li>Requires a <a href="https://foundeo.com/hack-my-cf/signup/">paid subscription</a> and the probe installed (not possible on free version).</li>
</ul>
<p><strong>Also announcing the HackMyCF Probe</strong></p>

<p>The probe is a cfm file that you place on your server, subscribers can specify a url to the cfm file for each server in their account. Then when we scan your server we also connect to this <em>probe.cfm</em>, which allows us to get information such as the exact ColdFusion version number (though we can usually determine this with out the probe), the JVM version, which hotfix jar files have been installed, and it also allows us to get a MD5 sum of certain files.</p>
<p>The addition of the probe allows us to find  more potential vulnerabilities on your server, for example we can determine if ColdFusion is running as the SYSTEM, we can determine if you are running a version of the JVM that is selectable to a easy to execute denial of service (we could detect this without the probe, but since that would crash your server, we need to use the probe to detect it).</p>
<p>We launched the <em>probe</em> feature in HackMyCF several months ago, however it has been a somewhat soft launch (we haven't been promoting it too much yet). It has been in use now by lots of customers and is pretty solid (we haven't to update the probe.cfm file, even this latest feature uses existing functionality).</p>
 ]]></description>
			<pubDate>Tue, 20 Sep 2011 20:24:00 GMT</pubDate>
			<category>ColdFusion</category>
			
			
		</item>
		<item>
			<title>Adding Two Factor Authentication to ColdFusion Administrator</title>
			<link>http://www.petefreitag.com/item/797.cfm</link>
			<guid>http://www.petefreitag.com/item/797.cfm</guid>
			<description><![CDATA[ <p>A few months back I was researching two/multi factor authentication solutions to employ to meet PCI compliance, I came across a somewhat new company called <a href="http://www.duosecurity.com/">DuoSecurity</a>.</p>
<p>If your not familiar with two factor authentication the basic premis is that in order to authenticate you must provide more than one type of authentication, for example <em>Something you know (a password)</em>, and <em>Something you have (a hardware token device, a smart card, or a smartphone)</em>.</p>
<p>DuoSecurity's solution to this problem was compelling because they allow you to use a smartphone for your second factor by sending a push notification, you simply tap approve, and you're in. This is much easier they keying in a code for the end user (though they also support that via text message, or landline phone call) .</p> 
<p>After I had integrated this solution into a SSH server for authentication, the folks at Duo asked if I would be interested in writing a ColdFusion port of their DuoWeb API (which allows you to use their technology to authenticate into Web Applications). I ofcourse said yes, and you can <a href="https://github.com/duosecurity/duo_coldfusion">download duo_web for ColdFusion on github</a>.
<p>Here's a video showing how the push technology works:</p>
<div align="center">
<iframe width="560" height="315" src="http://www.youtube.com/embed/23MCmlaSmTk?rel=0" frameborder="0" allowfullscreen></iframe>
</div>
<p>Next I thought hey <strong>it would be great if you could add Two Factor Authentication to ColdFusion Administrator</strong>, and it turns out you can:</p>
<p><strong>Setup Duo Security</strong></p>
<ol>
 <li>Sign up for an account at <a href="http://www.duosecurity.com/">DuoSecurity</a> you can create an account for up to 10 users for free.</li> 
 <li>Next create a new integration in your account, for integration type select "Web SDK"</li>
 <li>An integration key, a secret key, and an API hostname will be generated for you to use below.</li>
</ol>
<p>Now <a href="https://github.com/duosecurity/duo_coldfusion">Download duo_coldfusion</a> and place it in the web root of the site used to login to ColdFusion administrator.</p>
<p>Next create an <code>Application.cfc</code> file in the <code>/CFIDE/administrator</code> directory with the following code:</p>
<pre>
&lt;cfcomponent&gt;
	&lt;cfset this.name = "cfadmin"&gt;
	&lt;cfset this.sessionmanagement = true&gt;
	
	&lt;cfset variables.appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"&gt;
	&lt;cfset variables.iKey = "XXXXXXXXX"&gt;
	&lt;cfset variables.sKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"&gt;
	&lt;cfset variables.duoHost = "api-XXXXXXXX.duosecurity.com"&gt;
	
	
	&lt;cffunction name="OnRequest"&gt;
		&lt;cfargument name="template"&gt;
		&lt;cfinclude template="Application.cfm"&gt;
		&lt;cfset var local = StructNew()&gt;
		&lt;cfif arguments.template contains "logout.cfm" AND isAuthenticatedTwoFactor()&gt;
			&lt;cfset StructDelete(session, "duoAuthenticated")&gt;
			&lt;cfinclude template="#arguments.template#"&gt;
			&lt;cfreturn&gt;
		&lt;/cfif&gt;
		&lt;cfif StructKeyExists(form, "sig_response")&gt;
			&lt;cfset local.duo_user = CreateObject("component", "duo_coldfusion.DuoWeb").verifyResponse(iKey=variables.iKey, aKey = variables.appKey, sKey=variables.sKey, sig_response=form.sig_response)&gt;
			&lt;cfif local.duo_user IS "pete"&gt;
				&lt;cfset session.duoAuthenticated = true&gt;
			&lt;/cfif&gt;
		&lt;/cfif&gt;
		&lt;cfif IsUserLoggedIn() AND NOT isAuthenticatedTwoFactor()&gt;
			&lt;cfset local.post_action = "/CFIDE/administrator/index.cfm"&gt;
			&lt;cfset session.duo_sig_request = CreateObject("component", "duo_coldfusion.DuoWeb").signRequest(iKey=variables.iKey, aKey = variables.appKey, sKey=variables.sKey, username=GetAuthUser())&gt;
			&lt;!--- show second factor authenication page ---&gt;
			&lt;!doctype html&gt;
			&lt;html&gt;
				&lt;head&gt;
					&lt;title&gt;Please Authenticate&lt;/title&gt;
					&lt;script src="/duo_coldfusion/js/Duo-Web-v1.bundled.min.js"&gt;&lt;/script&gt;
					&lt;cfoutput&gt;
					&lt;script&gt;
					  Duo.init({
					    'host': '#JSStringFormat(variables.duoHost)#',
					    'sig_request': '#JSStringFormat(session.duo_sig_request)#',
					    'post_action': ''
					  });
					&lt;/script&gt;
					&lt;/cfoutput&gt;
				&lt;/head&gt;
				&lt;body&gt;
					&lt;h2&gt;Authenticate&lt;/h2&gt;
					&lt;iframe id="duo_iframe" width="100%" height="500" frameborder="0"&gt;&lt;/iframe&gt;
				&lt;/body&gt;
			&lt;/html&gt;
		&lt;cfelse&gt;
			&lt;!--- two factor authentication ---&gt;
			&lt;cfinclude template="#arguments.template#"&gt;	
		&lt;/cfif&gt;
		
	&lt;/cffunction&gt;
	
	&lt;cffunction name="isAuthenticatedTwoFactor" returntype="boolean"&gt;
		&lt;cfreturn StructKeyExists(session, "duoAuthenticated") AND session.duoAuthenticated&gt;
	&lt;/cffunction&gt;

&lt;/cfcomponent&gt;
</pre>

<p>Next you need to generate a unique value for <code>variables.appKey</code> it MUST be 40 chars long. Plug in the values you got on the duo web site when you created your integration for the <code>variables.iKey</code> (integration key), <code>variables.sKey</code> (secret key), and the <code>variables.duoHost</code>.</p>
<pre>
&lt;cfset variables.appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"&gt;
&lt;cfset variables.iKey = "XXXXXXXXX"&gt;
&lt;cfset variables.sKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"&gt;
&lt;cfset variables.duoHost = "api-XXXXXXXX.duosecurity.com"&gt;
</pre>
<p>Finally go and log into the ColdFusion administrator, after you enter your password you will be given a prompt which will let you pick your second factor method. If it authenticates you will be logged in and send to the CF Administrator.</p>
<p>It will look something like this when you are up and running:</p>
<div align="center">
<iframe width="420" height="315" src="http://www.youtube.com/embed/rHXGKlM9CQU" frameborder="0" allowfullscreen></iframe>
</div>

 ]]></description>
			<pubDate>Mon, 19 Sep 2011 21:43:00 GMT</pubDate>
			<category>ColdFusion</category>
			
			
		</item>
		<item>
			<title>ColdFusion Developer Week at Adobe.com</title>
			<link>http://www.petefreitag.com/item/796.cfm</link>
			<guid>http://www.petefreitag.com/item/796.cfm</guid>
			<description><![CDATA[ <p>This week (September 12-16 2011) is <a href="http://adobe.com/go/cfdeveloperweek">ColdFusion Developer Week</a> over at Adobe.com:</p>
<blockquote>
ColdFusion Developer Week is a series of free, live webinars hosted by seasoned ColdFusion experts who will cover a wide range of topics from what ColdFusion is, how to code it, all the way through to more in depth topics such as ORM and ColdFusion Builder Extensions. If you are a new developer, someone with little or no ColdFusion experience, or even if you have been using ColdFusion all your life, this event is ideal for you. The ColdFusion Developer Week provides something for everyone, so sign up now! 
</blockquote>
<p>Here's the schedule of webinars, I will be giving a presentation on ColdFusion security on Friday (<a href="http://www.adobe.com/cfusion/event/index.cfm?event=register_no_session&id=1887614&loc=en_us">listen to recording</a>):</p>
<p><strong>Monday</strong></p>
<ul>
 <li>Getting Started with Web Application Developement Using ColdFusion - Terry Ryan (10AM PT / 1PM ET)</li>
 <li>Working with PDFs Made Easy with ColdFusion - Tim Cunningham (1PM PT / 4PM ET)</li>
 <li>Introduction to ColdFusion Components (CFCs) - Raymond Camden (4PM PT / 7PM ET)</li>
</ul>
<p><strong>Tuesday</strong></p>
<ul>
 <li>Improve Your ColdFusion Code Through Unit Testing - Jamie Krug (10AM PT / 1PM ET)</li>
 <li>Using ColdFusion Frameworks for Application Development  - Mark Mandel (1PM PT / 4PM ET)</li>
 <li>Understanding and Using the ColdFusion Server Monitor - Charlie Arehart (4PM PT / 7PM ET)</li>
</ul>
<p><strong>Wednesday</strong></p>
<ul>
 <li>ColdFusion Builder: The Professional IDE to Boost Your Productivity - Sagar Ganatra (10AM PT / 1PM ET)</li>
 <li>Expand Functionality with ColdFusion Builder Extensions  - Simon Free (1PM PT / 4PM ET)</li>
</ul>

<p><strong>Thursday</strong></p>
<ul>
 <li>Developing Your First Application Using ColdFusion 9 and ORM - Bob Silverberg (10AM PT / 1PM ET)</li>
 <li>Speed Up Your Apps with Caching in ColdFusion  (11:30AM PT / 2:30PM ET)</li>
 <li>ColdFusion and Mobile - Browser-Based Applications Made Easy - Dave Ferguson (1PM PT / 4PM ET)</li>
 <li>Become ColdFusion Empowered in Under an Hour  - Nic Tunney (4PM PT / 7PM ET)</li>
</ul>

<p><strong>Friday</strong></p>
<ul>
 <li>Accessing ColdFusion Services From Flex Applications - Matt Gifford (10AM PT / 1PM ET)</li>
 <li>Securing your ColdFusion Applications - Pete Freitag (me)  (11:30AM PT / 2:30PM ET)</li>
 <li>Make Your Site Searchable with Solr - Scott Stroz (1PM PT / 4PM ET)</li>
 <li>Bringing ColdFusion to Java SpringMVC (4PM PT / 7PM ET)</li>
</ul>

<p>Make sure you go over to <a href="http://adobe.com/go/cfdeveloperweek">http://adobe.com/go/cfdeveloperweek</a> to register.</p> ]]></description>
			<pubDate>Mon, 12 Sep 2011 20:22:00 GMT</pubDate>
			<category>ColdFusion</category>
			
			
		</item>
		<item>
			<title>Bug Loading Scripts for CFFileUpload and CFMediaPlayer</title>
			<link>http://www.petefreitag.com/item/795.cfm</link>
			<guid>http://www.petefreitag.com/item/795.cfm</guid>
			<description><![CDATA[ <p>It has recently come to my attention that there are some hard coded references to <code>/CFIDE/scripts/</code> in some of the JS files that are used by the new (in CF9) tags  <code>CFFileUpload</code> and <code>CFMediaPlayer</code>. The tags will work just fine if you are serving scripts from <code>/CFIDE/scripts</code> but if you have <a href="http://www.petefreitag.com/item/774.cfm">changed the location of <code>/CFIDE/scripts/</code> for security reasons</a> - then you will experience some errors when trying to use these tags.</p>
<p>Bug <a href="http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=83328"><code>#83328</code></a> was logged for this issue in June 2010 in the ColdFusion Bug Tracker, please vote it up.</p>
<p>The workaround for <code>CFFileUpload</code> on ColdFusion 9.0.1 is pretty simple, I would imagine that the workaround for <code>CFMediaPlayer</code> is just as easy.</p>
<p>Edit the file <code>/CFIDE/scripts/ajax/package/cffileupload_swf.js</code>, and change the following lines:</p>
<pre>
$FS.defaultSWFLocation="/CFIDE/scripts/ajax/resources/cf/assets/MultiFileUpload.swf";
var defaultAddIcon="/CFIDE/scripts/ajax/resources/cf/images/fileupload/addfile.png";
var defaultUploadIcon="/CFIDE/scripts/ajax/resources/cf/images/fileupload/upload.png";
var defaultClearIcon="/CFIDE/scripts/ajax/resources/cf/images/fileupload/clear.gif";
var defaultDeleteIcon="/CFIDE/scripts/ajax/resources/cf/images/fileupload/delete.png";
</pre>
<p>To this:</p>
<pre>
$FS.defaultSWFLocation=_cf_ajaxscriptsrc+"/resources/cf/assets/MultiFileUpload.swf";
var defaultAddIcon=_cf_ajaxscriptsrc+"/resources/cf/images/fileupload/addfile.png";
var defaultUploadIcon=_cf_ajaxscriptsrc+"/resources/cf/images/fileupload/upload.png";
var defaultClearIcon=_cf_ajaxscriptsrc+"/resources/cf/images/fileupload/clear.gif";
var defaultDeleteIcon=_cf_ajaxscriptsrc+"/resources/cf/images/fileupload/delete.png";
</pre>
<p>The JavaScript variable <code>_cf_ajaxscriptsrc</code> was defined on the page before the <code>script</code> tag loads <code>cffileupload_swf.js</code> and it contains whatever value you have setup in the ColdFusion Administrator for the Default ScriptSrc path with <code>ajax</code> appended to the end.</p> ]]></description>
			<pubDate>Fri, 02 Sep 2011 20:45:00 GMT</pubDate>
			<category>ColdFusion</category>
			
			
		</item>
		<item>
			<title>Video: Installing FuseGuard</title>
			<link>http://www.petefreitag.com/item/794.cfm</link>
			<guid>http://www.petefreitag.com/item/794.cfm</guid>
			<description><![CDATA[ <p>Did you know that it only takes minutes to get FuseGuard up and running? Here's a short video showing how to install and configure <a href="http://foundeo.com/security/">FuseGuard - web application firewall for ColdFusion</a>:</p>
<div align="center">
<iframe width="480" height="390" src="http://www.youtube.com/embed/ubESB87vl5U?rel=0" frameborder="0" allowfullscreen></iframe>
</div>


<p><strong>What's FuseGuard?</strong></p>
<p>If your not familiar with FuseGuard, it is a commercial grade software product for ColdFusion made by my company <a href="http://foundeo.com/">Foundeo Inc</a>. It sits in front of your ColdFusion applications to help protect them against malicious attacks, written fully in CFML you can customize and extend it using a robust CFC api.</a>
<p><a href="https://foundeo.com/security/eval/" rel="nofollow">Click here to download an evaluation copy</a>.</p>
<p>The video is in HD format so if you don't have time to watch it now, and you have TV that is connected to YouTube, click the <em>Watch Later</em> button and watch it tonight :)</p> ]]></description>
			<pubDate>Thu, 21 Jul 2011 22:55:00 GMT</pubDate>
			<category>ColdFusion</category>
			
			
		</item>
		<item>
			<title>Fixing Apache (13)Permission denied: access to / 403 Forbidden</title>
			<link>http://www.petefreitag.com/item/793.cfm</link>
			<guid>http://www.petefreitag.com/item/793.cfm</guid>
			<description><![CDATA[ <p>Every so often I run into a <strong>403 Forbidden</strong> response when I'm setting up something in Apache, checking the log files will yield something like:</p>
<pre>
(13)Permission denied: access to /
</pre>
<p>There are a few things that could be the problem:</p>
<p><strong>Make sure it's not denied by Apache</strong></p>
<p>Most apache Configurations have something like this in there:</p>
<pre>
&lt;Directory /&gt;
    Order deny,allow
    Deny from all
&lt;/Directory&gt;
</pre>
<p>The above will block access to all files. You should also see something like this:</p>
<pre>
&lt;Directory /path/to/webroot&gt;
    Order allow,deny
    Allow from all
&lt;/Directory&gt;
</pre>
<p>So if you have created a <code>VirtualHost</code> or an <code>Alias</code> that does not fall under this <em>/path/to/webroot</em> apache will have denied access to it. The solution in that case is to add another <code>Directory</code> entry in your <code>httpd.conf</code> to allow access to that directory.</p>
<p><strong>Make sure Apache has Read, Execute Permissions</strong></p>
<p>The next thing to check is that Apache has read and execute permission (rx) on directories and read permission on files. You can run <code>chmod 750 /dir</code> (to give <code>-rwxr-x---</code> permission) or <code>chmod 755 /dir</code> (to give <code>-rwxr-xr-x</code> permission), etc. </p>
<p><strong>Make sure that the Directory Above has Execute Permission</strong></p>
<p>This is the one that tends to get me. Suppose you are creating an Alias like this:</p>
<pre>
Alias /foo /tmp/bar/foo
</pre>
<p>Now you have made sure that apache can read and execute <code>/tmp/bar/foo</code> by running <code>chmod 755 /tmp/bar/foo</code>, but you also need to give Apache execute permission to <code>/tmp/bar/</code> otherwise it cannot traverse the sub directory foo.</p> ]]></description>
			<pubDate>Thu, 21 Jul 2011 20:45:00 GMT</pubDate>
			<category>Web</category>
			
			
		</item>
	</channel>
</rss>
