httpd-users mailing list archives

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

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: 
/home/www/web4/htdig-cgi-bin/htsearch.cgi"

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:

<VirtualHost www.xy.com>
   .....
   ScriptAlias /htdig-cgi-bin/ /home/www/web4/htdig-cgi-bin/  
</VirtualHost>  


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
</Directory>


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: 
/home/www/web4/htdig-cgi-bin/htsearch.cgi".

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 
(/home/www/web4/html/htdig-cgi-bin/htsearch.cgi)
which I don't understand.


Can anyone please tell me, whats wrong?

Thank you
Miko



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message