Reputation: 21
We have few files which don't have the standard perl extension like cgi etc. Couple of them end with *.cfm and have perl code in them.
Now i am not sure why the developer decided to use a coldfusion extension and decide to use perl in it, but we are at a point now where we cannot alter the filename and we need to make some configuration changes such that perl is able to render *.cfm files too.
Is there a way we can modify the perl configuration to accept *.cfm files and render them as perl scripts?
Upvotes: 1
Views: 1116
Reputation: 13401
I'll go out on a limb and guess that your actually asking about running ".cfm" files as CGI scripts, through Apache. In that case, you would use a "handler" to tell Apache to treat all *.cfm files as Perl scripts. If I've guessed what's going on, then add this to your Apache 2.2 configuration:
AddHandler cgi-script .cfm
Also, make sure the Perl scripts have the right "shebang" line on the first line, usually:
#!/usr/bin/perl
If you want some *.cfm files to be still be treated as Cold Fusion, then you'll need a different solution.
Upvotes: 4