I have the ColdFusion application development server running
on my local machine, which I use to back up and test a site managed
by a third party. This site uses default.cfm in every directory
instead of index.cfm, which the server doesn't recognize. In other
words, navigating to a directory brings up a listing of the
directory's contents. How do I configure the CF server to recognize
default.cfm as an index page?
I'm running this on my local development machine, not a live
server, so no security risk. When I mentioned a directory's
contents being shown, I meant that this is the undesirable thing
that is happening BECAUSE default.cfm is not being recognized, not
that that's what I want.
I indicated in my original post that the server I'm running
is the ColdFusion application server that comes packaged with CF.
Can anyone tell me how to add default.cfm as a recognized index in
the CF server?
Application server != web server. Perhaps you should consider
using PWS or Apache to give you easier configurability. Also, just
because it is a development machine doesn't excuse it from being
ke4pym: Fair enough. But I'm still just not sure why you're
pointing out the security risk . . . I know showing the directory
contents is not a good thing; that's what I'm trying to fix.
BKBK: That's not exactly the problem I'm having. There are
no index.cfm files on the site, only default.cfm files. The problem
is not that I've got links in my pages to files that don't exist,
it's the result that happens when I simply navigate to a directory.
Showing directories on a dev machine is perfectly fine and
Showing them on a production machine is a security risk but
there still may be acceptable reasons to do so.
The best thing to do is to download Apache and set up CF to
work with it. This is desirable for several reasons but, bottom
line is, you want dev environment as close to production as
Once Apache is downloaded, it is trivial to set default.cfm
as an auto index file (and to hide directories even if no default
or index file is present).
Next best solution is to rename all default.cfm to index.cfm.
It is possible to have CF's built in server use default.cfm
as index file but it is a bad idea to make that change.
BKBK: That's not exactly the problem I'm having. There are no
index.cfm files on the site,
only default.cfm files. The problem is not that I've got
links in my pages to files that don't
exist, it's the result that happens when I simply navigate
to a directory.
I did suggest you rename all occurrences of default.cfm to
index.cfm. The onRequest workaround takes care of the event that
there are links still coming to your site with a request for
default.cfm, which is only to be expected.
BKBK, et al ->Sometimes, simply changing the files from
default.cfm to index.cfm isn't as easy as it seems. We've got a
vendor package that expects default.cfm to be the root file. Sure,
you can take the time to go change everything. But apply one update
and you're back to square one.
Miker-->I completely disagree that allowing folder views
on any prod or dev server (with the exception perhaps being one at
home that isn't connected to anything) as an acceptable security
practice. Perhaps I'm in a more security concious indrustry than
you so to each their own.
Chris-->I simply pointed it out to you as a side bar.
Something that seems to get lost in email translation from time to
As I (and others later) said, you should really consider
Apache/PWS/IIS for reasons already discussed.