httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <>
Subject Re: CGI in users own dirs
Date Tue, 18 Dec 2001 12:11:09 GMT
W i l l y wrote:
> Yeah I have SetHandler.  However, if I use +ExecCGI, I get the 403
> forbidden, with the error being 'ExecCGI is off in this directory'.  If I
> use ExecCGI without the + I get an internal error, premature end of script
> headers.
> Yes Allow from all is in there, but this really has me confused now, because
> the + in front of the ExecCGI shouldn't make a difference, should it?

I rather think it might... Read very carefully the section on "Options"
in the docs to see what the point of the "+" is.

Briefly, if you don't have a "+" options directives which apply to the
same directory are NOT combined - instead, the latest one is taken. If
there is "+", then the options are combined e.g.

Options ExecCGI
Options Indexes

means the directory only gets "Indexes" but not ExecCGI. However:

Options ExecCGI
Options +Indexes

means it gets both.

I suspect you have another Options directive at the same level which has
"-ExecCGI" so when it gets "Options +ExecCGI" applying to the same
directory, you get a conflict (it is not clear how the Options would be
resolved in this case). If you do "Options ExeCGI" (without the "+") the
second directive will override the first and the script will execute.

If you can't find the  "-ExecCGI", use the second method which leads to
the "premature end of script headers" - that proves that the program is
executing. To see what output is being produced, test the script through
the server from the command line. i.e.

$ telnet server-name 80
GET /~user/cgi-bin/hello.cgi HTTP/1.0

(followed by two returns)
and see what comes out.


Owen Boyle.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message