Skip to main content
October 25, 2009
Question

Why must urls end in .cfm to get coldfusion to process the file?

  • October 25, 2009
  • 5 replies
  • 7080 views

I have newly installed coldfusion 9 on OSX SnowLeopard Server (10.6) sitting on the default Apache2.2 that comes bundled in osx server.

If I go to:

http://127.0.0.1/CFIDE/administrator/index.cfm

>> I get the admin just fine, can browse around the admin etc.

If I go to:

http://127.0.0.1/CFIDE/administrator/

>> I see the source code for index.cfm in plain text

As you can see, index.cfm is set to be the default handler, it's just that unless coldfusion sees ".cfm" as the extension it will simple dump the page as plain text.

Any ideas?  I obviously would like to not have to have my users specify www.website.com/index.cfm if they want to see the website, and further, letting them see the sourcecode of the page is not cool at all.

    This topic has been closed for replies.

    5 replies

    Participant
    November 4, 2009

    Been having the same problem. I solved the problem by adding

    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf

    to the bottom of the <IfModule mod_jrun22.c> directive at the bottom of /etc/apache2/httpd.conf

    October 28, 2009

    Thanks for all the suggestions guys.  I have returned my OSX server and am replacing with a standard snow leopard install.  I never got to the root of the issue.  It is likely due to an apache config issue, the apache configs are much different in osx and osx server.  But I ran out of patience trying to get it working.  Hopefully someone else can come along and solve this one.

    Inspiring
    October 26, 2009

    In your http.conf file you need to add index.cfm to the DirectoryIndex section. This tells apache to server up that page when it is just pointed to a directory. This should solve your problem.

    Inspiring
    October 26, 2009

    @Ken:

    Which part of that config specifically controls whether default document URLs are passed to CF, as opposed to file-based ones?  I can't see anything in there that would differentiate between the two.  According to the OP's first post, Apache is connecting to CF OK other than when it's the default document.

    @900spg:

    But the default doc clearly is set to index.cfm: it's being served by Apache, it's just that Apache isn't first passing it to CF.

    @ievolve

    Can you confirm you're running the 64-bit version of 10.6.  I dunno if there are 32- and 64-bit versions, but the system requirements sheet specifically mentions 64-bit which implies to me that if there's a 32-bit version, it's not supported.

    Did you check the behaviour in other virtual directories or the main webroot (as per my suggestion).

    Also: I think you've got to come to grips with the fact that this isn't a perfect world, and sometimes things go wrong.

    --

    Adam

    Inspiring
    October 26, 2009

    @900spg:

    But the default doc clearly is set to index.cfm: it's being served by Apache, it's just that Apache isn't first passing it to CF.

    I'm pretty sure I had this problem with my Railo/Apache setup on a WindowsXP box and it was the Directoryindex setting in my http.conf but I could be wrong. Worth checking at any rate.

    glynjackson
    Participating Frequently
    October 25, 2009

    sorry I see your running under OS X Snow Leopard. I am not sure if CF9 runs under Snow Leopard I know the beta had some issues with mapping.  CF8 this helped a few guys I knew setting up CF on Mac

    http://www.flyingtroll.com/2009/09/coldfusion-8-on-snow-leopard/

    October 25, 2009

    I have been running CF9 without incident on snow leopard (built in apache) since it was released.  It works flawlessly.  The only difference is that now I am using snow leopard server and am seeing this behavior.  Must be something small.  Perhaps I missed something and 10.6 OSX server is not fully supported?  For some reason I find that hard to believe, particularly since no such disclaimer was there when I bought the product.

    Inspiring
    October 26, 2009

    I don't know anything about Macs, but according to the sytem requirements table (http://www.adobe.com/products/coldfusion/systemreqs/), OS X 10.6 is supported on 64-bit systems.

    Note that it sounds to me like it's Apache not passing the requests to CF when they're not specifically qualified with .cfm extension, rather than CF not handling them properly.  This makes little difference to your situation, but I'd be examining the Apache end of things rather than the CF end of things.

    Have a gander @ the alias settings for /CFIDE to see if there's anything amiss.

    Do you have the same symptoms for files in the webroot, or in other aliased directories?

    --

    Adam

    glynjackson
    Participating Frequently
    October 25, 2009

    I think this is more down to an IIS configuration than ColdFusion, have you setup your default documents correctly? what IIS are you running> If you are running IIS7 it requires a little more configuration see: http://forums.iis.net/t/1005992.aspx