httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo>
Subject Re: [users@httpd] SUEXEC
Date Mon, 08 Dec 2003 19:40:38 GMT
* "Erwin Knobbe" <> wrote:

> Hello,
> I am trying to get SUEXEC working on apache 2.x. I use redhat 9. I have
> recompiled the rpm with suexec support.
> When i start apache i can see in the error log that SUEXEC starts up. My
> cgi-bin is in the users home folder ( /home/xxx/cgi-bin)
> But it doesn't work. I get this message when executing a test cgi
> script: -Premature end of script headers: test.cgi
> I get this message in suexec log file: cannot get docroot information
> (/home).
> Anyone an idee? I searched google but coulnd't find the right answer.

It typically means, that suexec cannot chdir into the desired directory for
some reason. This is the corresponding code:

    if (userdir) {
        if (((chdir(target_homedir)) != 0) ||
            ((chdir(AP_USERDIR_SUFFIX)) != 0) ||
            ((getcwd(dwd, AP_MAXPATH)) == NULL) ||
            ((chdir(cwd)) != 0)) {
            log_err("cannot get docroot information (%s)\n", target_homedir);
    else {
        if (((chdir(AP_DOC_ROOT)) != 0) ||
            ((getcwd(dwd, AP_MAXPATH)) == NULL) ||
            ((chdir(cwd)) != 0)) {
            log_err("cannot get docroot information (%s)\n", AP_DOC_ROOT);

So, "desired directory" is either the compiled in docroot or the script
location. I'm assuming that you're not using userdir, so I'd guess that /home
(as the compiled in docroot) doesn't exist?


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