Avatar of sultanofshred
sultanofshred
Flag for United States of America asked on

set .cfm as default in apache/coldfusion/ on an Ubuntu system

For some reason, my browser will not default to a index.cfm file. I have no index.html file in that directory and am getting "File not found" when pointing to that directory i.e. "www.mysite.com/users/".

If I include the index.cfm file ("www.mysite.com/users/index.cfm") in the path it comes up fine. Also, if I put an index.html file in the directory and again pointing to www.mysite.com/users/, it navigates fine to the index.html file.

Either something in apache or coldfusion server is not handling .cfm files by default.

Any help would be greatly appreciated.
Apache Web ServerColdFusion Language

Avatar of undefined
Last Comment
Jay Dubya

8/22/2022 - Mon
Jay Dubya

Hi,
Under your Apache configuration you need to set it as a default file for viewing. I assume index.html is currently set. If you look at your config file you should find a line stating which file is the default file. Change it to index.chm and that should fix it..
sultanofshred

ASKER
I believe that would be the httpd.conf file and it already contains the .cfm extension.

here is the file content:

# JRun Settings
LoadModule jrun_module /opt/coldfusion9/runtime/lib/wsconfig/1/mod_jrun22.so
<IfModule mod_jrun22.c>
    JRunConfig Verbose false
    JRunConfig Apialloc false
    JRunConfig Ignoresuffixmap false
    JRunConfig Serverstore /opt/coldfusion9/runtime/lib/wsconfig/1/jrunserver.store
    JRunConfig Bootstrap 127.0.0.1:51800
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>
<Files ~ ".hbmxml$">
Order allow,deny
Deny from all
</Files>

I have already restarted both cf and apache... still not working
Jay Dubya

Hmm look for directoryIndex:

Edit httpd.conf

Open your Apache configuration file httpd.conf
# vi httpd.conf

Find out line that read as follows:
DirectoryIndex

Now set it as per your requirements:
DirectoryIndex index.html index.htm default.htm index.php index.pl

Save and close the file. Restart the Apache web server:

If that doesn't come up with anything let me know which version of Apache server you are running and on what OS etc..
Your help has saved me hundreds of hours of internet surfing.
fblack61
sultanofshred

ASKER
I could not file that line in either httpd.conf or apache2.conf
sultanofshred

ASKER
I'm running apache2 on Ubuntu 10.04 and Coldfusion 9
ASKER CERTIFIED SOLUTION
Jay Dubya

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.