a little more help with python server-side scripting
Steve Holden
steve at holdenweb.com
Wed Feb 22 00:32:00 EST 2006
John Salerno wrote:
> Steve Holden wrote:
>
>
>>Fortunately they've given you the information you need to run CGI
>>scripts. Try installing this script in your cgi-bin directory as test.py
>>(you may have to set it executable):
>
>
> Thank you! I desperately needed to test it, and that seemed to work. I
> didn't have to make it executable though. I wonder why?
Probably because the cgi-bin directory is specially marked to contain
executables. If you drop the script in another directory you will almost
certainly just see the source of the script. Making it executable
*might* cause it to run, but that would depend on exactly how your
server is configured.
Certainly my sites all have a line like
ScriptAlias /cgi-bin/ "c:/apache/cgi-bin/"
in the httpd.conf file. ScriptAlias tells Apache that the files in the
directory are scripts. The first argument is the address in web-space,
the second the address on disk.
You'll find you can affect *some* configuration items by creating files
called .htaccess in your web content directories, but that's a ways down
the road yet.
If the script ran, you will now know waht version of Apaceh you're
running with!
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
More information about the Python-list
mailing list