Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I use two handlers for the same file extension?

Status
Not open for further replies.

HughJass

Programmer
May 14, 2003
6
US
Hello,

I am new to Apache, and I am trying to use it to execute a python script for every page that hits my server (with the right extension).

I want to use a custom python script, and the built in cgi capabilities of Apache 1.3.27. Do I need two handlers?

Here is what I have now (or a close approximation):

AddHandler my-script .py
Action my-script /path/to/my/script/myscript.py

If I want cgi.py to execute, do I need another handler?
Say: AddHandler cgi-script .py

It seems when I do use cgi-script in a handler, I start
getting 'permission denied' errors, even though
ExecCGI is set for the directory.

Any help is greatly appreciated.

Thank you,
HJ
 
 0
I would suggest that I would have left the default in the apache config:
AddHandler cgi-script .cgi ..... and uncommented it ...... then I would have called my python script myscript.cgi (let the script/server sort out how it is called), and let the client call it with
Ok I've not played with puython but thats how its done with other scripting using the cgi method


Good Luck
L.
 
L,

Thanks for the info. I really do need to keep a different extension though. But., I don't think the cgi module is being executed under my current configuration.

-HJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top