Re: Cgi scripts in apache not working



David wrote:
>
> httpd.conf:
>
> <Directory "/home/*/public_html/cgi/"> << Tried it with "" and no ""
> Options ExecCGI << Tried with "Options +ExecCGI"
> AddHandler cgi-script .cgi .py << Tried with "SetHandler
> cgi-script", but still no go
> </Directory>
>
>
> error_log:
>
> [Thu Jul 28 11:44:53 2005] [error] [client xxx.xxx.xxx.xxx] Premature
> end of script headers: test2.py

I assume that you have a UserDir directive elsewhere in your
configuration; otherwise, what you've written probably won't be enough.
See this guide for the full details:

http://httpd.apache.org/docs/2.0/howto/public_html.html

I typically find that using the ScriptAlias directive does what I want,
although I don't work with user directories myself. Here's an example:

ScriptAlias /cgi/ "/home/paul/some_directory/"

I imagine that the ScriptAliasMatch directive would also be able to do
the home directory matching that you are doing in your configuration
file. See the documentation for both directives here:

http://httpd.apache.org/docs/2.0/mod/mod_alias.html#scriptalias

Apart from using ScriptAlias, I don't usually do anything more than
check the ownership/permissions on the CGI directory and the script.
Naturally, the PYTHONPATH (or sys.path) needs to be configured to find
non-installed modules and packages, but such things are beyond this
particular problem.

Paul

.



Relevant Pages

  • help with a home network jumpstart
    ... I have the blade running BIND 8 to serve DNS to the home network. ... Here's the output of the boot net - install: ... Using RPC Bootparams for network configuration information. ... Using begin script: install_begin ...
    (SunManagers)
  • Jumpstart: syntax error and trying to load from /cdrom media, which disk to use for Solaris 8 image
    ... I'm not sure if I need to use that disk or the Solaris 8 Installation ... Using RPC Bootparams for network configuration information. ... Using finish script: diag_drv.fin ... Executing JumpStart preinstall phase... ...
    (SunManagers)
  • Re: Some basic unix directory listing questions (long)
    ... I use this method extensively for perl "suites" which bring their ... own libraries, configuration files, etc with them. ... directory of your script. ... As for hard links - no chance. ...
    (comp.unix.shell)
  • Re: Quarantine rqc parameter details
    ... You can find quarntine configuration details at ... Name of the VPN connectiod. ... <String>: This is the shared secret key that client and server knows about. ... You can call rqc with appropriate parameters using VB script. ...
    (microsoft.public.isa)
  • Re: Quarantine rqc parameter details
    ... You can find quarntine configuration details at ... Name of the VPN connectiod. ... <String>: This is the shared secret key that client and server knows about. ... You can call rqc with appropriate parameters using VB script. ...
    (microsoft.public.win2000.ras_routing)