From: dgaudet
-
+
- $Revision: 1.63.2.2 $ ($Date: 1997/06/11 21:21:39 $)
+ $Revision: 1.63.2.3 $ ($Date: 1997/06/27 03:02:04 $)
The latest version of this FAQ is always available from the main
@@ -35,11 +35,11 @@
-
+
-
-
-
+
+
+
@@ -131,6 +131,8 @@
It means just what it says: the server was expecting a complete set of
HTTP headers (one or more followed by a blank line), and didn't get
- them. The most common cause of this (aside from people not
- outputting the required headers at all) a result of an interaction
- with perl's output buffering. To make perl flush its buffers
- after each output statement, insert the following statements before your
- first
+ The most common cause of this problem is the script dying before
+ sending the complete set of headers, or possibly any at all, to the
+ server. To see if this is the case, try running the script standalone
+ from an interactive session, rather than as a script under the server.
+ If you get error messages, this is almost certainly the cause of the
+ "premature end of script headers" message.
+
+ The second most common cause of this (aside from people not
+ outputting the required headers at all) is a result of an interaction
+ with Perl's output buffering. To make Perl flush its buffers
+ after each output statement, insert the following statements around
+ the
Apache Server Frequently Asked Questions
print
or write
statement:
+ them.
+ print
or write
statements that send your
+ HTTP headers:
-
$cfh = select (STDOUT);
+
- $| = 1;
- select ($cfh);{
+ local ($oldbar) = $|;
+ $cfh = select (STDOUT);
+ $| = 1;
+ #
+ # print your HTTP headers here
+ #
+ $| = $oldbar;
+ select ($cfh);
+ }
This is generally only necessary when you are calling external
programs from your script that send output to stdout, or if there will
- be along delay between the time the headers are sent and the actual
+ be a long delay between the time the headers are sent and the actual
content starts being emitted. To maximise performance, you should
- turn buffering back on (with $| = 0
or the
- equivalent) after the statements that send the headers.
+ turn buffer-flushing back off (with $| = 0
or the
+ equivalent) after the statements that send the headers, as displayed
+ above.
+
If your script isn't written in Perl, do the equivalent thing for whatever language you are using (e.g., for C, call @@ -796,8 +828,9 @@ HREF="../mod/core.html#listen" >Listen directives. If there are no other servers running on the machine - and all of them are running on the same port, you normally don't - need any Listen directives at all. + on the same port then you normally don't + need any Listen directives at all. By default Apache listens to + all addresses on port 80.
+ On FreeBSD 2.2 and older FD_SETSIZE, which limits the number of open + files on the system, is limted to 256. This can limit the number of + virtual hosts you are using; especially if they all use different log + files. Increasing this limit (and recompiling apache) is not enough + (As it is on some platforms, such as Solaris), as you also will have + to recompile libc with the changed setting. +
++ On FreeBSD 3.0 the default is 1024, so the problem is lessened. +
+
if ($0 =~ m:/*nph-:) {
+ if ($0 =~ m:^(.*/)*nph-[^/]*$:) {
$HTTP_headers =
@@ -1124,9 +1176,9 @@
"Connection: close\015\012";
- printf ($HTTP_headers);
+ print $HTTP_headers;
- };
+ }
struct iovec
" when compiling under Linux?
+ of "struct iovec
" when
+ compiling under Linux?
This is a conflict between your C library includes and your kernel @@ -1540,6 +1593,111 @@
+ Your kernel has been built without SysV IPC support. You will have to
+ rebuild the kernel with that support enabled (it's under the
+ "General Setup" submenu). Documention for
+ kernel building is beyond the scope of this FAQ, you should consult
+ the Kernel
+ HOWTO, or the documentation provided with your distribution,
+ or a Linux
+ newsgroup/mailing list. As a last resort workaround, you can
+ comment out the #define HAVE_SHMGET
definition in the
+ LINUX
section of
+ src/conf.h
and rebuild the server. This will produce
+ a server which is slower and less reliable.
+
+ Under normal circumstances, the apache access control modules will + pass unrecognized userids on to the next access control module in + line. Only if the userid is recognized, the password is validated + (or not) will it give the usual success or authentification failed + messages. +
++ However if the last access module in line 'declines' the validation + request (because it has never heard of the userid or because it is not + configured) the http_request handler will give one of the following, + confusing, errors: +
check access
+ check user. No user file?
+ check access. No groups file?
+
+ The solution is to ensure that at least the last module is authoritative
+ and CONFIGURED. By default mod_auth
is authoritative
+ and will give an OK/Denied, but only if it is configured with the
+ proper AuthUserFile. Likewise if a valid group is required. (Remember
+ that the modules are processed in the reverse order they appear in
+ your compile-time Configuration file.)
+
+ A typical situation for this error is when you are using the + mod_auth_dbm, mod_auth_msql, mod_auth_mysql, mod_auth_anon or + mod_auth_cookie on their own. These are by default not + authoritative, and this will pass the buck on to the (non-existent) next + authentification module when the user ID is not in their respective + database. Just add the appropriate 'XXXAuthoritative yes' line to + the configuration. +
++ In general it is a good idea (though not terribly efficient) to have the + file based mod_auth a module of last resort. This allows you to access + the web server with a few special passwords even if the databases are + down or corrupted. This does cost a file-open/seek/close for each + request in a protected area. +
++ Some organizations feel very strongly about keeping the authentification + information on a different machine than the webserver. With the + mod_auth_msql, mod_auth_mysql and other SQL modules connecting to + (R)DBMses this is quite well possible. Just configure an explicit host + to contact. +
++ Be aware that with mSQL and Oracle, opening and closing these database + connections is very expensive and time consuming. You might want to + look at the code in the auth_modules and play with the compile time + flags to alleviate this somewhat; if your RDBMS licences alows for it. +
++ You have probably configured the Host by specificing a FQHN, + and thus the libmsql will use a full blown tcp/ip socket to talk to + the database, rather than a fast internal device. Both the libmsql, + the mSQL faq and the mod_auth_msql documentation warn you about this. If + you have to use different hosts, check out the mod_auth_msql code for + some compile time flags which might, or might not suit you. +
+AuthGroupFile
-specified group file
format allows commas between user names - Apache does not.
If you follow the NCSA guidelines for setting up access restrictions based on client domain, you may well have added entries for, @@ -99,6 +100,9 @@ it added one automatically if the .asis file contained a Location header. files if the last line does not have a trailing newline. This affects configuration files (httpd.conf, access.conf and srm.conf), and htpasswd and htgroup files. +
If you are lucky, this means that the buggy client will fully close the connection and release the resources on your server. However, there @@ -77,16 +77,16 @@ TCP implementation.
The clients on which this problem has been verified to exist:
This does not appear to be a problem on:
@@ -155,56 +155,56 @@ violation of the RFC, but it is widely recognized as being necessary. The following systems are known to have a timeout:
ndd
to
- modify tcp_fin_wait_2_flush_interval
, but the
- default should be appropriate for most servers and improper
- tuning can have negative impacts.
- SO_LINGER
socket option
- which is enabled by Apache. This parameter can be adjusted
- by using nettune
to modify parameters such as
- tcp_keepstart
and tcp_keepstop
.
- In later revisions, there is an explicit timer for
- connections in FIN_WAIT_2 that can be modified; contact HP
- support for details.
- ndd
to
+ modify tcp_fin_wait_2_flush_interval
, but the
+ default should be appropriate for most servers and improper
+ tuning can have negative impacts.
+ SO_LINGER
socket option
+ which is enabled by Apache. This parameter can be adjusted
+ by using nettune
to modify parameters such as
+ tcp_keepstart
and tcp_keepstop
.
+ In later revisions, there is an explicit timer for
+ connections in FIN_WAIT_2 that can be modified; contact HP
+ support for details.
+ The following systems are known to not have a timeout:
There is a diff --git a/docs/manual/misc/index.html b/docs/manual/misc/index.html index 127b1f2f0d3..2b44c661318 100644 --- a/docs/manual/misc/index.html +++ b/docs/manual/misc/index.html @@ -21,92 +21,92 @@
<Directory>
+sections.
SendBufferSize directive
Syntax: SendBufferSize bytes
-Context: server config, virtual host
+Context: server config
Status: core
The server will set the TCP buffer size to the number of bytes
diff --git a/docs/manual/mod/mod_auth_anon.html b/docs/manual/mod/mod_auth_anon.html
index c880c34ee10..c1b6933053a 100644
--- a/docs/manual/mod/mod_auth_anon.html
+++ b/docs/manual/mod/mod_auth_anon.html
@@ -61,23 +61,23 @@ allows users to share URLs.
Status: Extension
Module: mod_auth_anon
- A list of one or more 'magic' userIDs which are allowed access - without password verification. The userIDs are space separated. - It is possible to use the ' and " quotes to allow a space in - a userID as well as the \ escape character. -
- Please note that the comparison is case-IN-sensitive.
-
- I strongly suggest that the magic username 'anonymous
'
- is always one of the allowed userIDs.
-
- Example:
-
- Anonymous: anonymous "Not Registered" 'I don\'t know'
-
- This would allow the user to enter without password verification - by using the userId's 'anonymous', 'AnonyMous','Not Registered' and - 'I Don't Know'. + A list of one or more 'magic' userIDs which are allowed access + without password verification. The userIDs are space separated. + It is possible to use the ' and " quotes to allow a space in + a userID as well as the \ escape character. +
+ Please note that the comparison is case-IN-sensitive.
+
+ I strongly suggest that the magic username 'anonymous
'
+ is always one of the allowed userIDs.
+
+ Example:
+
+ Anonymous: anonymous "Not Registered" 'I don\'t know'
+
+ This would allow the user to enter without password verification + by using the userId's 'anonymous', 'AnonyMous','Not Registered' and + 'I Don't Know'.
Anonymous
directive, access is denied.
-
- Be sure you know what you are doing when you decide to switch
- it on. And remember that it is the linking order of the modules
- (in the Configuration / Make file) which details the order
- in which the Authorization modules are queried.
+ Anonymous
directive, access is denied.
+
+ Be sure you know what you are doing when you decide to switch + it on. And remember that it is the linking order of the modules + (in the Configuration / Make file) which details the order + in which the Authorization modules are queried.
- When set 'on', the default, the 'password' entered (which hopefully - contains a sensible email address) is logged in the httpd-log file. + When set 'on', the default, the 'password' entered (which hopefully + contains a sensible email address) is logged in the httpd-log file.
- Specifies whether the user must specify an email - address as the password. This prohibits blank passwords. + Specifies whether the user must specify an email + address as the password. This prohibits blank passwords.
- When set 'on', users can leave - the userID (and perhaps the password field) empty. This - can be very convenient for MS-Explorer users who can - just hit return or click directly on the OK button; which - seems a natural reaction. + When set 'on', users can leave + the userID (and perhaps the password field) empty. This + can be very convenient for MS-Explorer users who can + just hit return or click directly on the OK button; which + seems a natural reaction.
- When set 'on' the 'password' entered is
- checked for at least one '@' and a '.' to encourage users to enter
- valid email addresses (see the above Auth_LogEmail
).
+ When set 'on' the 'password' entered is
+ checked for at least one '@' and a '.' to encourage users to enter
+ valid email addresses (see the above Auth_LogEmail
).
Anonymous anonymous guest www test welcome
-Anonymous_MustGiveEmail on
+Anonymous_MustGiveEmail on
Anonymous_VerifyEmail on
-Anonymous_NoUserId off
-Anonymous_LogEmail on
+Anonymous_NoUserId off
+Anonymous_LogEmail on
AuthName Use 'anonymous' & Email address for guest entry
AuthType basic
@@ -217,8 +217,8 @@ This version: 23 Nov 1995, 24 Feb 1996, 16 May 1996.
"=" and "!=" bind more tightly than "&&" and diff --git a/docs/manual/mod/mod_proxy.html b/docs/manual/mod/mod_proxy.html index e0aef688460..30926d4da6a 100644 --- a/docs/manual/mod/mod_proxy.html +++ b/docs/manual/mod/mod_proxy.html @@ -297,7 +297,7 @@ disables caching completely.
ProxyBlock
or NoCache
directives, hostnames' IP addresses are looked up and cached during
diff --git a/docs/manual/mod/mod_rewrite.html b/docs/manual/mod/mod_rewrite.html
index 03eaa5801f7..8d432e4c4ef 100644
--- a/docs/manual/mod/mod_rewrite.html
+++ b/docs/manual/mod/mod_rewrite.html
@@ -988,10 +988,10 @@ comma-separated list of the following flags:
which will be expanded. You can use this flag more than once to set more
than one variable. The variables can be later dereferenced at a lot of
situations, but the usual location will be from within XSSI (via
- <!--#echo var="VAR"-->) or CGI (e.g. $ENV{'VAR'}).
- But additionally you can also dereference it in a following RewriteCond
- pattern via %{ENV:VAR}. Use this to strip but remember
- information from URLs.
+ <!--#echo var="VAR"-->) or CGI (e.g. $ENV{'VAR'}).
+ But additionally you can also dereference it in a following RewriteCond
+ pattern via %{ENV:VAR}. Use this to strip but remember
+ information from URLs.
diff --git a/docs/manual/mod/mod_status.html b/docs/manual/mod/mod_status.html index f5a55fa397c..f671ad78367 100644 --- a/docs/manual/mod/mod_status.html +++ b/docs/manual/mod/mod_status.html @@ -90,7 +90,7 @@ mark@ukweb.com and tell me your configuration. Do this by adding the following to the AUX_CFLAGS line in the "Configuration" file and then recompiling as usual.
- AUX_CFLAGS= (something) -DSTATUS + AUX_CFLAGS= (something) -DSTATUS
diff --git a/docs/manual/process-model.html b/docs/manual/process-model.html index c130decffa7..2c37337b70f 100644 --- a/docs/manual/process-model.html +++ b/docs/manual/process-model.html @@ -39,9 +39,9 @@ as too confusing. The defaults for each variable are:-MinSpareServers 5 -MaxSpareServers 10 -StartServers 5 +MinSpareServers 5 +MaxSpareServers 10 +StartServers 5There is an absolute maximum number of simultaneous children defined diff --git a/docs/manual/suexec.html b/docs/manual/suexec.html index 7806bc8f55c..0157cd0c1b5 100644 --- a/docs/manual/suexec.html +++ b/docs/manual/suexec.html @@ -17,14 +17,15 @@
-
@@ -119,124 +120,124 @@ user and group IDs under which the program is to execute. The wrapper then employs the following process to determine success or failure -- if any one of these conditions fail, the program logs the failure and exits with an error, otherwise it will continue: -CONTENTS -- What is suEXEC?
-- Before we begin.
-- suEXEC Security Model.
-- Configuring & Installing suEXEC
-- Enabling & Disabling suEXEC
-- Debugging suEXEC
-- Beware the Jabberwock: Warnings & Examples
+CONTENTS +- What is suEXEC?
+- Before we begin.
+- suEXEC Security Model.
+- Configuring & Installing suEXEC
+- Enabling & Disabling suEXEC
+- Debugging suEXEC
+- Beware the Jabberwock: Warnings & + Examples
-
+- Was the wrapper called with the proper number of arguments? -
-- The wrapper will only execute if it is given the proper number of arguments. - The proper argument format is known to the Apache web server. If the wrapper - is not receiving the proper number of arguments, it is either being hacked, or - there is something wrong with the suEXEC portion of your Apache binary. --- Is the user executing this wrapper a valid user of this system? -
-- This is to ensure that the user executing the wrapper is truly a user of the system. --- Is this valid user allowed to run the wrapper? -
-- Is this user the user allowed to run this wrapper? Only one user (the Apache - user) is allowed to execute this program. --- Does the target program have an unsafe hierarchical reference? -
-- Does the target program contain a leading '/' or have a '..' backreference? These - are not allowed; the target program must reside within the Apache webspace. --- Is the target user name valid? -
-- Does the target user exist? --- Is the target group name valid? -
-- Does the target group exist? --- Is the target user NOT superuser? -
-- Presently, suEXEC does not allow 'root' to execute CGI/SSI programs. --- Is the target userid ABOVE the minimum ID number? -
-- The minimum user ID number is specified during configuration. This allows you - to set the lowest possible userid that will be allowed to execute CGI/SSI programs. - This is useful to block out "system" accounts. --- Is the target group NOT the superuser group? -
-- Presently, suEXEC does not allow the 'root' group to execute CGI/SSI programs. --- Is the target groupid ABOVE the minimum ID number? -
-- The minimum group ID number is specified during configuration. This allows you - to set the lowest possible groupid that will be allowed to execute CGI/SSI programs. - This is useful to block out "system" groups. --- Can the wrapper successfully become the target user and group? -
-- Here is where the program becomes the target user and group via setuid and setgid - calls. The group access list is also initialized with all of the groups of which - the user is a member. --- Does the directory in which the program resides exist? -
-- If it doesn't exist, it can't very well contain files. --- Is the directory within the Apache webspace? -
-- If the request is for a regular portion of the server, is the requested directory - within the server's document root? If the request is for a UserDir, is the requested - directory within the user's document root? --- Is the directory NOT writable by anyone else? -
-- We don't want to open up the directory to others; only the owner user may be able - to alter this directories contents. --- Does the target program exist? -
-- If it doesn't exists, it can't very well be executed. --- Is the target program NOT writable by anyone else? -
-- We don't want to give anyone other than the owner the ability to change the program. --- Is the target program NOT setuid or setgid? -
-- We do not want to execute programs that will then change our UID/GID again. --- Is the target user/group the same as the program's user/group? -
-- Is the user the owner of the file? --- Can we successfully clean the process environment to ensure safe operations? -
-- suEXEC cleans the process' environment by establishing a safe execution PATH (defined - during configuration), as well as only passing through those variables whose names - are listed in the safe environment list (also created during configuration). --- Can we successfully become the target program and execute? -
-- Here is where suEXEC ends and the target program begins. --+
- Was the wrapper called with the proper number of arguments? +
++ The wrapper will only execute if it is given the proper number of arguments. + The proper argument format is known to the Apache web server. If the wrapper + is not receiving the proper number of arguments, it is either being hacked, or + there is something wrong with the suEXEC portion of your Apache binary. ++- Is the user executing this wrapper a valid user of this system? +
++ This is to ensure that the user executing the wrapper is truly a user of the system. ++- Is this valid user allowed to run the wrapper? +
++ Is this user the user allowed to run this wrapper? Only one user (the Apache + user) is allowed to execute this program. ++- Does the target program have an unsafe hierarchical reference? +
++ Does the target program contain a leading '/' or have a '..' backreference? These + are not allowed; the target program must reside within the Apache webspace. ++- Is the target user name valid? +
++ Does the target user exist? ++- Is the target group name valid? +
++ Does the target group exist? ++- Is the target user NOT superuser? +
++ Presently, suEXEC does not allow 'root' to execute CGI/SSI programs. ++- Is the target userid ABOVE the minimum ID number? +
++ The minimum user ID number is specified during configuration. This allows you + to set the lowest possible userid that will be allowed to execute CGI/SSI programs. + This is useful to block out "system" accounts. ++- Is the target group NOT the superuser group? +
++ Presently, suEXEC does not allow the 'root' group to execute CGI/SSI programs. ++- Is the target groupid ABOVE the minimum ID number? +
++ The minimum group ID number is specified during configuration. This allows you + to set the lowest possible groupid that will be allowed to execute CGI/SSI programs. + This is useful to block out "system" groups. ++- Can the wrapper successfully become the target user and group? +
++ Here is where the program becomes the target user and group via setuid and setgid + calls. The group access list is also initialized with all of the groups of which + the user is a member. ++- Does the directory in which the program resides exist? +
++ If it doesn't exist, it can't very well contain files. ++- Is the directory within the Apache webspace? +
++ If the request is for a regular portion of the server, is the requested directory + within the server's document root? If the request is for a UserDir, is the requested + directory within the user's document root? ++- Is the directory NOT writable by anyone else? +
++ We don't want to open up the directory to others; only the owner user may be able + to alter this directories contents. ++- Does the target program exist? +
++ If it doesn't exists, it can't very well be executed. ++- Is the target program NOT writable by anyone else? +
++ We don't want to give anyone other than the owner the ability to change the program. ++- Is the target program NOT setuid or setgid? +
++ We do not want to execute programs that will then change our UID/GID again. ++- Is the target user/group the same as the program's user/group? +
++ Is the user the owner of the file? ++- Can we successfully clean the process environment to ensure safe operations? +
++ suEXEC cleans the process' environment by establishing a safe execution PATH (defined + during configuration), as well as only passing through those variables whose names + are listed in the safe environment list (also created during configuration). ++- Can we successfully become the target program and execute? +
++ Here is where suEXEC ends and the target program begins. ++@@ -257,7 +258,7 @@ section of this document. BACK TO CONTENTS
-Configuring & Installing suEXEC
+Configuring & Installing suEXEC
Here's where we begin the fun. The configuration and installation of suEXEC is a four step process: edit the suEXEC header file, compile suEXEC, place the @@ -396,7 +397,7 @@ user shell, do so now and execute the following commands. BACK TO CONTENTS
-Enabling & Disabling suEXEC
+Enabling & Disabling suEXEC
After properly installing the suexec wrapper executable, you must kill and restart the Apache server. A simple @@ -454,7 +455,7 @@ and the error_log for the server to see where you may have gone astray. BACK TO CONTENTS
-Beware the Jabberwock: Warnings & Examples
+Beware the Jabberwock: Warnings & Examples
NOTE! This section may not be complete. For the latest revision of this section of the documentation, see the Apache Group's @@ -467,33 +468,33 @@ There are a few points of interest regarding the wrapper that can cause limitations on server setup. Please review these before submitting any "bugs" regarding suEXEC.
-
suEXEC Points Of Interest -- Hierarchy limitations -
-- For security and efficiency reasons, all suexec requests must - remain within either a top-level document root for virtual - host requests, or one top-level personal document root for - userdir requests. For example, if you have four VirtualHosts - configured, you would need to structure all of your VHosts' - document roots off of one main Apache document hierarchy to - take advantage of suEXEC for VirtualHosts. (Example forthcoming.) --- suEXEC's PATH environment variable -
-- This can be a dangerous thing to change. Make certain every - path you include in this define is a trusted - directory. You don't want to open people up to having someone - from across the world running a trojan horse on them. --- Altering the suEXEC code -
+- Again, this can cause Big Trouble if you try - this without knowing what you are doing. Stay away from it - if at all possible. --suEXEC Points Of Interest +- Hierarchy limitations +
++ For security and efficiency reasons, all suexec requests must + remain within either a top-level document root for virtual + host requests, or one top-level personal document root for + userdir requests. For example, if you have four VirtualHosts + configured, you would need to structure all of your VHosts' + document roots off of one main Apache document hierarchy to + take advantage of suEXEC for VirtualHosts. (Example forthcoming.) ++- suEXEC's PATH environment variable +
++ This can be a dangerous thing to change. Make certain every + path you include in this define is a trusted + directory. You don't want to open people up to having someone + from across the world running a trojan horse on them. ++- Altering the suEXEC code +
+ Again, this can cause Big Trouble if you try + this without knowing what you are doing. Stay away from it + if at all possible. ++