Archive for the 'Apache' Category

Coldfusion and Apache won’t default execute index.cfm?

Ran into this today, strange setup but I’m running Coldfusion 9 with Apache (WAMP Server) 2.2.11. The short story is that I installed and configured CF just fine, but when it came time to execute CFML pages, nothing would happen unless I put the name of the file at the end of the URL? So in the case of index.cfm, I had to actually type that on the end of the URL?

Initially I figured I forgot to add index.cfm to the DirectoryIndex in httpd.conf. I did that and restarted apache and still no execution of index.cfm?? After googling a bit and finding nothing, I examined the only other portion of apache I thought could be responsible. The spot where JRun gets loaded as an Apache module. Sure enough, the following line was at the bottom:

AddHandler jrun-handler .jsp .jws

It was obvious I needed to add .cfm to that list in order to have Apache pass any CFML page along to the module for execution by Coldfusion. So I made the following change:

AddHandler jrun-handler .jsp .jws .cfm

After that, Apache happily referred index.cfm to JRun for processing. Why the installer didn’t get that setup correctly in the first place I don’t know. The Web Server Configuration Tool said everything was great when I set the server up. Something to watch for and hopefully not waste too much time with next time.

client denied by server configuration

I recently setup a new development server running Apache 2.2.9 and ran into a little problem.  As I configured all my virtual hosts, I found that each time I tried to access anything other than the default root directory, I’d get a forbidden error in my browser accompanied by an entry in my error log:

[Wed Oct 08 11:17:31 2008] [error] [client 127.0.0.1] client denied by server configuration:

Well, since this was something new to me I had to do a little digging and finally found that something new with Apache 2.2 is some added security out of the box.  With defacto settings, Apache now restricts access to all your folders outside of DocumentRoot.  It stems from a change in the default <Directory /> directive in the httpd.conf file:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>

To fix the situation, change “Order deny,allow” to “Order Allow,Deny” and change “Deny from all” to “Allow from all”.  In my case, I just want complete and utter access being this is a development server, you might need to restrict by IP segment or other criteria if it is a production server.