[lug] Apache on RH 7.1 beta

D. Stimits stimits at idcomm.com
Thu Feb 15 00:11:19 MST 2001


Apologies in advance for the long message. FYI, I'm trying to set up a
RH 7.1 beta to mimic another site for testing, using cgi-bin (all binary
executables from C++). Also, I do know to restart httpd after config
file changes.

I've found a change to the default Apache config (relative to RH 6.2)
that has me scratching my head to figure out the correct configuration.
Basically, I am trying to get individual user cgi-bin directories to
function, and have copied portions of another working server over (from
RH 6.2). The result is that I can access normal *html* style docs in the
~/cgi-bin/ directory (directory access is granted), and all permissions
allow anyone to cd to that directory and exec the *.cgi I have there on
command line...it isn't a permissions problem, and Apache finds the
directory. Then in the error_log, I get:
...Premature end of script headers: ...

The cause is better described by the suexec_log message:
...error: command not in docroot (...names path to user
home/cgi-bin/thecgifile.cgi...)...

The httpd.conf file has DocRoot as:
/var/www/html

If I place the cgi script in /var/www/cgi-bin/, it works when skipping
the individual user in the url:
http://127.0.0.1/cgi-bin/myscript.cgi

If I alter DocumentRoot to my user's directory, either as:
   /home/username/public_html
      OR as:
   /home/username/cgi-bin

it still fails. Interestingly enough (or maybe not), this does not stop
cgi from the main /var/www/cgi-bin/ directory. It is complaining about
DocumentRoot, but ignoring the setting. Follow sym links if owner is
also enabled, but a sym link from ~/cgi-bin/ to the working cgi program
in /var/www/cgi-bin/ fails also. FYI, all cgi programs here are c++
compiled binaries, and all work at the command line for all users within
the individual home cgi-bin's, but not through apache when there; versus
all working in /var/www/cgi-bin/ by either command line by anyone, or
through the web browser.

Is it not possible in the newer Apache to allow individual users to have
cgi in ~/cgi-bin/? Must all cgi go in the public /var/www/cgi-bin/,
written in stone? Somewhere I am missing something new, but couldn't
find it on either dejanews or apache.org. Any ideas?

D. Stimits, stimits at idcomm.com



More information about the LUG mailing list