Apache Server configuration support - How can I use extention-less cgi scripts outside the cgi-bin?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > September 2005 > How can I use extention-less cgi scripts outside the cgi-bin?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How can I use extention-less cgi scripts outside the cgi-bin?
rsgalloway

2005-09-29, 8:51 pm


I want to be able to use Python cgi scripts outside of my cgi-bin (eg.
foo.com/somescript?x=1) but I still need to be able to load images from
the foo.com/images dir and it would be nice to still be able to load
..html files. The way I have it setup now, I can only do one or the
other:

ServerName foo.bar.com
DocumentRoot /home/bar.com/foo
ScriptAlias / "/home/bar.com/foo/"
<Directory "/home/bar.com/foo">
AllowOverride All
Options none
Order allow,deny
Allow from all
</Directory>
ErrorDocument 403 http://foo.bar.com/somescript
ErrorDocument 404 http://foo.bar.com/somescript
DirectoryIndex script

The above directives allow me run my scripts from outside the cgi-bin
(eg. foo.com/somescript?x=1) but index.html doesn't load anymore and
Apache tries to executes image files:

Premature end of script headers: bk_button_end.gif

Any help appreciated.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com