[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

cgi's don't work in vhost config with apache



Heya all..

Sorry for the cross-post but it seemed reasonably applicable to
debian-user and debian-isp..

I'm trying a simple "Hello Web" script in python and (to prove that it
isn't python related) as a simple shell script.  Both work on my
Debian/sid workstation, which has a default apache configuration. 
However, on my Debian/woody web server, which has several virtual hosts,
I get 500/Internal Server Error.  /var/log/apache/error.log says
"Premature end of script headers".

I first stuck the script(s) in /usr/lib/cg-bin without modifying apache
configuration.  I tried adding the ScriptAlias line and <Directory>
entry from apache's global config to the <VirtualHost> - no cigar.

I can't test this server with a default apache config because the
virtual hosts are customers of mine, and wouldn't be happy with their
sites going down :)

For reference, here are the scripts:

hello.py:
#!/usr/bin/python
print "Content-Type: text/plain\n\n"
print "Hello Web!"

hello.sh:
#!/bin/sh
echo "Content-Type: text/plain"
echo
echo "Hello Web!"

Thanks in advance for any help!



Reply to: