httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miko Buck <>
Subject [users@httpd] running cgi-script in virtual hosts
Date Mon, 08 Sep 2003 13:42:09 GMT

I want to run the htsearch-script from htdig on my webserver (Apache 
1.3.19), but I become an error: "Premature end of script headers: 

The htsearch-script is running under the commandline very well (the 
first output is "Content-type: text/html"), so I think it is a problem 
of my Apache configuration.

The htsearch-script is written in C and I've read from errors with 
different scripts, when written in different languages like perl or C. I 
have to make a special handler for that.

So I separate the htsearch from the other cgi-bin's. I rename the script 
htsearch to htsearch.cgi to avoid a perl-interpreting. I copy 
htsearch.cgi in a special directory on the server, set the rights and 
make a ScriptAlias:

   ScriptAlias /htdig-cgi-bin/ /home/www/web4/htdig-cgi-bin/  

I set the handler for cgi-script in this directory:

<Directory /home/www/web4/htdig-cgi-bin/>
      Options +ExecCGI -Indexes
      AddHandler cgi-script .cgi
      # or
      # SetHandler cgi-script
      # but this also failed

I call the script with a html-form like:

<form method="post" name="htdig" action="/htdig-cgi-bin/htsearch.cgi">

Then I become an error: "Premature end of script headers: 

In suexec.log I have these errors:
[2003-09-08 15:27:05]: info: (target/actual) uid: (web4/web4) gid: 
(www/www) cmd: htsearch.cgi
[2003-09-08 15:27:05]: error: command not in docroot 
which I don't understand.

Can anyone please tell me, whats wrong?

Thank you

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message