Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

Setting up custom file extension in CFMX on Apache

Hello,

I am running into a problem I can't find an answer for. Here are my specs:

Apache 1.3.26-1.1
ColdFusion MX
Debian - Kernel 2.4.18

I am trying to setup a custom extension so that a ".test" file is handled by ColdFusion. It appeared to be straight forward by simply adding a new extension in the module setup:
<IfModule mod_jrun.c>
   ...
   AddHandler jrun-handler .cfm .cfml .jsp .jws .test
</IfModule>

This however does not work, I get an internal server error when hitting a my file.test page.

If i take the .test out of the AddHandler line the file is treated as text by apache and displayed on the screen with the CF code. This shows that Apache is correctly linking the extension .test to ColdFusion when it is set-up as described above... so my thought is that CFMX is where the problem is.

Has anyone tried this? Any success? Is this a CFMX problem? Am I missing something?

Your help is appreciated,

Dede.
0
dfp3p
Asked:
dfp3p
  • 4
  • 4
  • 3
1 Solution
 
HamdyHassanCommented:
I think you need to modify the web.xml file

check CFMX issues at
http://www.fusium.com/ses/sesFAQ.cfm

Also check
http://www.houseoffusion.com/cf_lists/cache/4/14/14402.htm#74568
0
 
dfp3pAuthor Commented:
Excellent... thank you very much that worked like a charm. We called Macromedia first who would have charged us $500 for an incident... 500 points is better though.

Not sure if you have any experience with ColdFusion on Apache+Linux, but I would appreciate it if you had any insight on performance issues, or any other problems we may encounter with this setup. If you do please let us know what your thoughts are, if not I will keep the question open for a few days and then award you the points.

Dede.
0
 
anandkpCommented:
Go in to IIS and open up the properties for the website you want to change. Go to the Home Directory tab and click on the configuration button.
Click on the add button.
Browse to <drive>:\cfusion\bin\iscf.dll
Type the file extension you want to use
Click ok
Create a test page

K'Rgds
Anand

PS : picked up the above from somewhere - works for sure

in teh above "hamdy" - if i put up a cfm code - it wont process it - it can process normal text & html's perfectly !
0
[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

 
HamdyHassanCommented:
You could start reading old posts at
http://www.experts-exchange.com/Web/Web_Servers/Apache/

I will try to search for something else
0
 
HamdyHassanCommented:
0
 
anandkpCommented:
??? what happened ???

Anand
0
 
dfp3pAuthor Commented:
Anand,

make sure you read and understand the question before answering! I was interested in Apache not IIS.
0
 
anandkpCommented:
yeah i figured that out ...

but what i was wondering was did that web.xml file work for u ... cos when i tried that option - i cldn't manage to get cfm files working

i was just curious to know - thats all

ne-ways thanx :)
Anand
0
 
dfp3pAuthor Commented:
yep it did. The change has to happen both in the httpd.conf file for the apache module definition as well as adding the appropriate lines (copy and paste existing definitions for .cfm to .yourExtension) in the web.xml file. This works for MX, 5.0 is similar but the file is in a different place and the httpd.conf file uses AddType just like any other extension.

Here's something I couldn't get to work. I was wondering if I can completely eliminate the file extension. Don't know what to do for that one... if anyone has any ideas I would be glad to try them out.

Dede.
0
 
anandkpCommented:
ok - i dont know abt that - but wld give it a try !

also when i changed things on IIS - i even had to set it up for the DLL as mentioned in my comment - just changing it didnt help out !

K'Rgds
Anand
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 4
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now