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.
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
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/
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.
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
I guess the frustrating part for me is that this is literally a stock config. Brand new osx server, default apache, default CF9 install. No funky configurations or anything.
If I would have wanted to spend my weekend digging around conf files and starting and stopping system services trying to make stuff work, I would have saved myself the money and installed an open source OS and an open source CFML engine instead of paying for something commercial.
I am not running server but when you installed CF9 did it add the following to your httpd.conf file?
# JRun Settings
LoadModule jrun_module /Applications/ColdFusion9/runtime/lib/wsconfig/1/mod_jrun22.so
<IfModule mod_jrun22.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /Applications/ColdFusion9/runtime/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51800
#JRunConfig Errorurl url <optionally redirect to this URL on errors>
#JRunConfig ProxyRetryInterval 600 <number of seconds to wait before trying to reconnect to unreachable clustered server>
#JRunConfig ConnectTimeout 15 <number of seconds to wait on a socket connect to a jrun server>
#JRunConfig RecvTimeout 300 <number of seconds to wait on a socket receive to a jrun server>
#JRunConfig SendTimeout 15 <number of seconds to wait on a socket send to a jrun server>
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>Ken Ford
@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.
When I re-read the OP, it doesn't appear that index.cfm is set to be a default file served by Apache.
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.
I think there might be a bit of confusion centered on the OP's "As you can see" sentence. Because Apache is serving up CFML files does not mean that a default file is set to be served/accessed. Processing CFML only means that the JRun module is loaded by Apache and the appropriate file handlers for CFM, CFML, and CFC are added to the httpd.conf (as shown in Ken's post).
If Apache is to serve up an index.cfm file (or whatever you want your default file called) without explicitly declaring it in the URL, there has to be a default document (DirectoryIndex) explicitly declared in the httpd.conf (or your httpd-vhosts.conf file, if you're using Virtual Hosts).
# In httpd.conf, you need to at least make sure that you see this:
<IfModule dir_module>
DirectoryIndex index.html index.htm index.php index.cgi index.cfm
</IfModule>
# If you're using virtual hosts, I think it's advisable to make sure that
# index.cfm is declared in your VirtualHost tag
<VirtualHost *:80>
ServerName dev.vhost.cf
ServerAlias dev.vhost.cf
DirectoryIndex index.cfm index.html index.htm
DocumentRoot /Users/yourpathtothe/Sites/site_folder
</VirtualHost>
From a re-read of the OP, I think @900spg has the right idea ... perhaps there's another issue lurking there but it seems that verifying index.cfm is specified in the DirectoryIndex declaration is a good step.
craigkaminsky wrote:
When I re-read the OP, it doesn't appear that index.cfm is set to be a default file served by Apache.
If I go to:
http://127.0.0.1/CFIDE/administrator/
>> I see the source code for index.cfm in plain text
Even when you read the bit (included above) in which they explicitly say that index.cfm is being served up as the default doc?
Hmmm. OK.
--
Adam
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.
North America
Europe, Middle East and Africa
Asia Pacific