httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Ulrich" <>
Subject Re: [users@httpd] CGI + Virtual host difficulty
Date Mon, 26 Apr 2004 19:40:44 GMT
Joshua Slive said:
>> Nope, no suexec in sight...
> Please double-check that, since it is a very likely cause of your
> problems, assuming you didn't compile apache yourself.

No suexec binary exists on the entire system, there is no package
installed with the 'suexec' string in its name, and I can find no mention
of it in any config files on the system.

I also checked that the perl binary was executable by the www user, and it
is indeed executable by everyone. (Would have been extremely weird if it
wasn't, but hey, I'm grasping at straws here.)

> Let's summarize:
> 1. The printenv script works when you call it from the command line

Correct. './index.cgi' (what I named the printenv script for testing) runs
fine with no errors and all of the expected outout.

> 2. The printenv script fails with "premature end of script headers" when
> called as a cgi script.


> 3. You are positive that your aren't running suexec or any other cgi
> wrapper.

suxec is not installed, as far as I can tell. There are existing vhosts on
this system, but they all use PHP. I don't think this would be a problem,
but then I've never used PHP, so I thought it might be worth mentioning.

> If this is the case, you have some weird stuff going on.  I'd look at the
> following:
> - Are you using any third-party modules?

I checked this system's httpd.conf against one from a fresh install. The
only difference, module-wise, is that this system loads and adds a
php4_module, which is required by the other vhosts already running on the
system. I currently cannot remove the module to see if it fixes standard
CGI scripts without causing a lot of phone calls to come my way. :)

> - Can you make an sh cgi script run, as in
> #!/bin/sh
> echo Content-Type: Text/plain
> echo
> echo Hellow world.
> Joshua.

Okay, did that... Made it executable by all users. Double checked that
/bin/sh exists and is executable. (Couldn't hurt.) No dice. Same exact
error, even in the logs.

One thing I tried, on a tip from Bao, is creating a simple HTML file and
trying to access it through the vhost. This works.

I next tried removing a symlink from the vhost path to see if that was
confusing something, but I still get an error.

I also tried moving the printenv script to a different vhost to see if it
was just the configuration for the bugzilla vhost that was causing a
problem, but the script fails to execute in the other, known-to-be-working
vhost as well.

Quite an odd little problem I've got here, it seems. I'm *very* grateful
the tips and suggestions that you've offered so far and hope the solution
will come to light relatively soon.

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