Newer
Older
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>Apache Server Frequently Asked Questions</TITLE>
</HEAD>
<BODY>
<!--#include virtual="header.html" -->
<H1>Apache Server Frequently Asked Questions</H1>
</P>
<P>
Throughout the text of this FAQ you may find numbers enclosed in
brackets (such as "[12]"). These refer to the list of
reference URLs to be found at the end of the document.
<H2>The Questions</H2>
<!-- Stuff to Add: -->
<!-- - bad mod_rewrite included in 1.2b6 -->
<!-- - how-to PUT (publish, Netscape Gold) -->
<!-- - can't bind to port 80 -->
<!-- - permission denied -->
<!-- - address already in use -->
<!-- - "httpd: could not set socket option TCP_NODELAY" -->
<!-- not a problem if occasional; client disc before server -->
<!-- setsockopt -->
<!-- - disable Apache buffering of script output by using nph- -->
<!-- - access control based on DNS name really needs MAXIMUM_DNS -->
<!-- and double-check that rDNS resolves to name expected -->
<!-- - mod_auth & passwd lines "user:pw:.*" - ++1st colon onward is -->
<!-- treated as pw, not just ++1st to --2nd. -->
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<UL>
<LI><STRONG>Background</STRONG>
<OL START=1>
<LI><A HREF="#what">What is Apache?</A>
</LI>
<LI><A HREF="#why">Why was Apache created?</A>
</LI>
<LI><A HREF="#relate">How does The Apache Group's work relate to
other servers?</A>
</LI>
<LI><A HREF="#name">Why the name "Apache"?</A>
</LI>
<LI><A HREF="#compare">OK, so how does Apache compare to other servers?</A>
</LI>
<LI><A HREF="#tested">How thoroughly tested is Apache?</A>
</LI>
<LI><A HREF="#future">What are the future plans for Apache?</A>
</LI>
<LI><A HREF="#support">Whom do I contact for support?</A>
</LI>
<LI><A HREF="#more">Is there any more information on Apache?</A>
</LI>
<LI><A HREF="#where">Where can I get Apache?</A>
</LI>
</OL>
</LI>
<LI><STRONG>Technical Questions</STRONG>
<OL START=11>
<LI><A HREF="#what2do">"Why can't I ...? Why won't ...
work?" What to do in case of problems</A>
</LI>
<LI><A HREF="#compatible">How compatible is Apache with my existing
NCSA 1.3 setup?</A>
</LI>
<LI><A HREF="#CGIoutsideScriptAlias">How do I enable CGI execution
in directories other than the ScriptAlias?</A>
</LI>
<LI><A HREF="#premature-script-headers">What does it mean when my
CGIs fail with "Premature end of script headers"?</A>
</LI>
<LI><A HREF="#ssi-part-i">How do I enable SSI (parsed HTML)?</A>
</LI>
<LI><A HREF="#ssi-part-ii">Why don't my parsed files get cached?</A>
</LI>
<LI><A HREF="#ssi-part-iii">How can I have my script output parsed?</A>
</LI>
<LI><A HREF="#proxy">Does or will Apache act as a Proxy server?</A>
</LI>
<LI><A HREF="#multiviews">What are "multiviews"?</A>
</LI>
<LI><A HREF="#fdlim">Why can't I run more than <<EM>n</EM>>
virtual hosts?</A>
</LI>
<LI><A HREF="#limitGET">Why do I keep getting "access denied" for
form POST requests?</A>
</LI>
<LI><A HREF="#passwdauth">Can I use my <SAMP>/etc/passwd</SAMP> file
for Web page authentication?</A>
</LI>
<LI><A HREF="#errordoc401">Why doesn't my <SAMP>ErrorDocument
401</SAMP> work?</A>
</LI>
<LI><A HREF="#setgid">Why do I get "setgid: Invalid
argument" at startup?</A>
</LI>
<LI><A HREF="#cookies1">Why does Apache send a cookie on every response?</A>
</LI>
<LI><A HREF="#cookies2">Why don't my cookies work, I even compiled in
mod_cookies?</A>
</LI>
</OL>
</LI>
<LI><A
HREF="#References"
>References</A>
</LI>
</UL>
<HR>
<H2>The Answers</H2>
<P>
</P>
<H3>
Background
</H3>
<OL START=1>
<LI><A
NAME="what"
><STRONG>What is Apache?</STRONG></A>
<P>
Apache was originally based on code and ideas found in the most
popular HTTP server of the time.. NCSA httpd 1.3 (early 1995). It has
since evolved into a far superior system which can rival (and probably
surpass) almost any other UNIX based HTTP server in terms of functionality,
efficiency and speed.
</P>
<P>
Since it began, it has been completely rewritten, and includes many new
features. Apache is, as of January 1997, the most popular WWW server on
the Internet, according to the
<A
HREF="http://www.netcraft.com/Survey/"
>Netcraft Survey</A><A HREF="#References">[1]</A>.
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
</P>
<HR>
</LI>
<LI><A
NAME="why"
><STRONG>Why was Apache created?</STRONG></A>
<P>
To address the concerns of a group of WWW providers and part-time httpd
programmers that httpd didn't behave as they wanted it to behave.
Apache is an entirely volunteer effort, completely funded by its
members, not by commercial sales.
<HR>
</P>
</LI>
<LI><A
NAME="relate"
><STRONG>How does The Apache Group's work relate to other
server efforts, such as NCSA's?</STRONG></A>
<P>
We, of course, owe a great debt to NCSA and their programmers for
making the server Apache was based on. We now, however, have our own
server, and our project is mostly our own. The Apache Project is an
entirely independent venture.
</P>
<HR>
</LI>
<LI><A
NAME="name"
><STRONG>Why the name "Apache"?</STRONG></A>
<P>
A cute name which stuck. Apache is "<STRONG>A
PA</STRONG>t<STRONG>CH</STRONG>y server". It was
based on some existing code and a series of "patch files".
</P>
<HR>
</LI>
<LI><A
NAME="compare"
><STRONG>OK, so how does Apache compare to other servers?</STRONG></A>
<P>
For an independent assessment, see
<A
HREF="http://webcompare.iworld.com/compare/chart.html"
>Web Compare</A><A HREF="#References">[2]</A>'s
comparison chart.
</P>
<P>
Apache has been shown to be substantially faster than many other
free servers. Although certain commercial servers have claimed to
surpass Apache's speed (it has not been demonstrated that any of these
"benchmarks" are a good way of measuring WWW server speed at any
rate), we feel that it is better to have a mostly-fast free server
than an extremely-fast server that costs thousands of dollars. Apache
is run on sites that get millions of hits per day, and they have
experienced no performance difficulties.
</P>
<HR>
</LI>
<LI><A
NAME="tested"
><STRONG>How thoroughly tested is Apache?</STRONG></A>
<P>
Apache is run on over 400,000 Internet servers (as of April 1997). It has
been tested thoroughly by both developers and users. The Apache Group
maintains rigorous standards before releasing new versions of their
server, and our server runs without a hitch on over one third of all
WWW servers available on the Internet. When bugs do show up, we
release patches and new versions as soon as they are available.
</P>
<P>
The Apache project's web site includes a page with a partial list of
<A
HREF="http://www.apache.org/info/apache_users.html"
>sites running Apache</A><A HREF="#References">[3]</A>.
</P>
<HR>
</LI>
<LI><A
NAME="future"
><STRONG>What are the future plans for Apache?</STRONG></A>
<P>
<UL>
<LI>to continue as a public domain HTTP server,
</LI>
<LI>to keep up with advances in HTTP protocol and web developments in
</LI>
<LI>to collect suggestions for fixes/improvements from its users,
</LI>
<LI>to respond to needs of large volume providers as well as
occasional users.
</LI>
</UL>
</P>
<HR>
</LI>
<LI><A
NAME="support"
><STRONG>Whom do I contact for support?</STRONG></A>
<P>
There is no official support for Apache. None of the developers want to
be swamped by a flood of trivial questions that can be resolved elsewhere.
Bug reports and suggestions should be sent <EM>via</EM>
<A
HREF="http://www.apache.org/bug_report.html"
>the bug report page</A><A HREF="#References">[4]</A>.
Other questions should be directed to the
<A
HREF="news:comp.infosystems.www.servers.unix"
><SAMP>comp.infosystems.www.servers.unix</SAMP></A><A HREF="#References">[5]</A>
newsgroup, where some of the Apache team lurk,
in the company of many other httpd gurus who should be able
to help.
</P>
<P>
Commercial support for Apache is, however, available from a number
of third parties.
</P>
<HR>
</LI>
<LI><A
NAME="more"
><STRONG>Is there any more information available on Apache?</STRONG></A>
<P>
Indeed there is. See the main
<A
HREF="http://www.apache.org/"
>Apache web site</A><A HREF="#References">[6]</A>.
There is also a regular electronic publication called
<A
HREF="http://www.apacheweek.com"
REL="Help"
><EM>Apache Week</EM></A><A HREF="#References">[7]</A>
available.
</P>
<HR>
</LI>
<LI><A
NAME="where"
><STRONG>Where can I get Apache?</STRONG></A>
<P>
You can find out how to download the source for Apache at the
project's
<A
HREF="http://www.apache.org/"
>main web page</A><A HREF="#References">[6]</A>.
</P>
<HR>
</LI>
</OL>
<H3>
Technical Questions
</H3>
<OL START=11>
<LI><A
NAME="what2do"
><STRONG>"Why can't I ...? Why won't ... work?" What to
do in case of problems</STRONG></A>
<P>
If you are having trouble with your Apache server software, you should
take the following steps:
</P>
<OL>
<LI><STRONG>Check the errorlog!</STRONG>
<P>
Apache tries to be helpful when it encounters a problem. In many
cases, it will provide some details by writing one or messages to
the server error log (see the
<A
HREF="http:../mod/core.html#errorlog"
>ErrorLog</A><A HREF="#References">[8]</A>
directive). Somethimes this is enough for you to diagnose &
fix the problem yourself (such as file permissions or the like).
</P>
</LI>
<LI><STRONG>Check the Apache bug database</STRONG>
<P>
Most problems that get reported to The Apache Group are recorded in
<A
HREF="http://www.apache.org/bugdb.cgi"
>bug database</A><A HREF="#References">[9]</A>).
<EM><STRONG>Please</STRONG> check the existing reports, open
<STRONG>and</STRONG> closed, before adding one.</EM> If you find
that your issue has already been reported, please <EM>don't</EM> add
a "me, too" report. If the original report isn't closed
yet, we suggest that you check it periodically. You might also
consider contacting the original submittor, because there may be an
email exchange going on about the issue that isn't getting recorded
in the database.
</P>
</LI>
<LI><STRONG>Ask in the <SAMP>comp.infosystems.www.servers.unix</SAMP>
USENET newsgroup</STRONG>
<P>
A lot of common problems never make it to the bug database because
there's already high Q&A traffic about them in the
<A
HREF="news:comp.infosystems.www.servers.unix"
><SAMP>comp.infosystems.www.servers.unix</SAMP></A>
<A HREF="#References">[5]</A>
newsgroup. Many Apache users, and some of the developers, can be
found roaming its virtual halls, so it is suggested that you seek
wisdom there. The chances are good that you'll get a faster answer
there than from the bug database, even if you <EM>don't</EM> see
your question already posted.
</P>
</LI>
<LI><STRONG>If all else fails, report the problem in the bug
database</STRONG>
<P>
If you've gone through those steps above that are appropriate and
have obtained no relief, then please <EM>do</EM> let The Apache
Group know about the problem by
<A
HREF="http://www.apache.org/bugdb.cgi"
>logging a bug report</A><A HREF="#References">[9]</A>.
</P>
<P>
If your problem involves the server crashing and generating a core
dump, please include a backtrace (if possible). As an example,
</P>
<PRE>
# cd <EM>ServerRoot</EM>
# dbx httpd core
(dbx) where
</PRE>
<P>
(Substitute the appropiate locations for your
<SAMP>ServerRoot</SAMP> and your <SAMP>httpd</SAMP> and
<SAMP>core</SAMP> files. You may have to use <SAMP>gdb</SAMP>
instead of <SAMP>dbx</SAMP>.)
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
</P>
</LI>
</OL>
<HR>
</LI>
<LI><A
NAME="compatible"
><STRONG>How compatible is Apache with my existing NCSA 1.3
setup?</STRONG></A>
<P>
Apache attempts to offer all the features and configuration options
of NCSA httpd 1.3, as well as many of the additional features found in
NCSA httpd 1.4 and NCSA httpd 1.5.
</P>
<P>
NCSA httpd appears to be moving toward adding experimental features
which are not generally required at the moment. Some of the experiments
will succeed while others will inevitably be dropped. The Apache
philosophy is to add what's needed as and when it is needed.
</P>
<P>
Friendly interaction between Apache and NCSA developers should ensure
that fundamental feature enhancments stay consistent between the two
servers for the foreseeable future.
</P>
<HR>
</LI>
<LI><A
NAME="CGIoutsideScriptAlias"
><STRONG>How do I enable CGI execution in directories other than
the ScriptAlias?</STRONG></A>
<P>
</P>
<P>
Apache recognises all files in a directory named as a
<A
HREF="../mod/mod_alias.html#scriptalias"
>ScriptAlias</A><A HREF="#References">[10]</A>
as being eligible for execution rather than processing as normal
documents. This applies regardless of the file name, so scripts in a
ScriptAlias directory don't need to be named
"<SAMP>*.cgi</SAMP>" or "<SAMP>*.pl</SAMP>" or
whatever. In other words, <EM>all</EM> files in a ScriptAlias
directory are scripts, as far as Apache is concerned.
</P>
<P>
To persuade Apache to execute scripts in other locations, such as in
directories where normal documents may also live, you must tell it how
to recognise them - and also that it's okey to execute them. For
this, you need to use something like the
<A
HREF="../mod/mod_mime.html#addhandler"
>AddHandler</A><A HREF="#References">[11]</A>
<OL>
<LI>In an appropriate section of your server configuration files, add
a line such as
<PRE>
AddHandler cgi-script .cgi
</PRE>
The server will then recognise that all files in that location (and
its logical descendants) that end in "<SAMP>.cgi</SAMP>"
are script files, not documents.
</LI>
<LI>Make sure that the directory location is covered by an
<A
HREF="../mod/core.html#options"
>Options</A><A HREF="#References">[12]</A>
declaration that includes the <SAMP>ExecCGI</SAMP> option.
</LI>
</OL>
<HR>
</LI>
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
<LI><A
NAME="premature-script-headers"
><STRONG>What does it mean when my CGIs fail with "Premature
end of script headers"?</STRONG></A>
<P>
</P>
<P>
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 is Perl scripts which haven't
disabled buffering; if you insert the following statements before your
first <SAMP>print</SAMP> statement, this will probably go away.
</P>
<PRE>
$cfh = select (STDOUT);
$| = 1;
select ($cfh);
</PRE>
<P>
If your script isn't written in Perl, do the equivalent thing for
whatever language you <EM>are</EM> using (<EM>e.g.</EM>, for C, call
<SAMP>fflush()</SAMP> after writing the headers).
</P>
<HR>
</LI>
<LI><A
NAME="ssi-part-i"
><STRONG>How do I enable SSI (parsed HTML)?</STRONG></A>
<P>
SSI (an acronym for Server-Side Include) directives allow static HTML
documents to be enhanced at run-time (<EM>e.g.</EM>, when delivered to
a client by Apache). The format of SSI directives is covered
elsewhere; suffice it to say that Apache supports not only SSI but
xSSI (eXtended SSI) directives.
<P>
Processing a document at run-time is called <EM>parsing</EM> it; hence
the term "parsed HTML" sometimes used for documents that
contain SSI instructions. Parsing tends to be <EM>extremely</EM>
resource-consumptive, and is not enabled by default.
</P>
<P>
To enable SSI processing, you need to
</P>
<UL>
<LI>Build your server with the
<A
HREF="../mod/mod_include.html"
>mod_include</A><A HREF="#References">[13]</A>
module. This is normally compiled in by default.
</LI>
<LI>Make sure your server configuration files have an
<A
HREF="../mod/core.html#options"
>Options</A><A HREF="#References">[12]</A>
directive which permits <SAMP>Includes</SAMP>.
</LI>
<LI>Make sure that the directory where you want the SSI documents to
live is covered by the "server-parsed" content handler,
either explicitly or in some ancestral location. That can be done
with the following
<A
HREF="../mod/mod_mime.html#addhandler"
>AddHandler</A><A HREF="#References">[11]</A>
directive:
AddHandler server-parsed .shtml
</PRE>
This indicates that all files ending in ".shtml" in that
location (or its descendants) should be parsed. Note that using
".html" will cause all normal HTML files to be parsed,
which may put an inordinate load on your server.
</LI>
</UL>
<HR>
</LI>
<LI><A
NAME="ssi-part-ii"
><STRONG>Why don't my parsed files get cached?</STRONG></A>
<P>
Since the server is performing run-time processing of your SSI
directives, which may change the content shipped to the client, it
can't know at the time it starts parsing what the final size of the
result will be, or whether the parsed result will always be the same.
This means that it can't generate <CODE>Content-Length</CODE> or
<CODE>Last-Modified</CODE> headers. Caches commonly work by comparing
the <CODE>Last-Modified</CODE> of what's in the cache with that being
delivered by the server. Since the server isn't sending that header
for a parsed document, whatever's doing the caching can't tell whether
the document has changed or not - and so fetches it again to be on the
safe side.
</P>
<P>
You can work around this in some cases by causing an
<CODE>Expires</CODE> header to be generated. (See the
<A
HREF="../mod/mod_expires.html"
REL="Help"
><CODE>mod_expires</CODE></A><A HREF="#References">[14]</A>
documentation for more details.) Another possibility is to use the
<A
HREF="../mod/mod_include.html#xbithack"
REL="Help"
><SAMP>XBitHack Full</SAMP></A><A HREF="#References">[15]</A>
mechanism, which tells Apache to send (under certain circumstances
detailed in the XBitHack directive description) a
<SAMP>Last-Modified</SAMP> header based upon the last modification
time of the file being parsed. Note that this may actually be lying
to the client if the parsed file doesn't change but the SSI-inserted
content does.
</P>
<HR>
</LI>
<LI><A
NAME="ssi-part-iii"
><STRONG>How can I have my script output parsed?</STRONG></A>
<P>
So you want to include SSI directives in the output from your CGI
script, but can't figure out how to do it?
The short answer is "you can't." This has been regarded as a
security liability, and the basic solution is for your script itself to do
what the SSIs would be doing. After all, it's generating the
rest of the content.
</P>
<HR>
</LI>
<LI><A
NAME="proxy"
><STRONG>Does or will Apache act as a Proxy server?</STRONG></A>
<P>
Apache version 1.1 and above comes with a proxy module. If compiled
in, this will make Apache act as a caching-proxy server.
</P>
<HR>
</LI>
<LI><A
NAME="multiviews"
><STRONG>What are "multiviews"?</STRONG></A>
<P>
"Multiviews" is the general name given to the Apache
server's ability to provide language-specific document variants in
response to a request. This is documented quite thoroughly in the
<A
HREF="http:../content-negotiation.html"
REL="Help"
>content negotiation</A><A HREF="#References">[16]</A>
description page.
</P>
<HR>
</LI>
<LI><A
><STRONG>Why can't I run more than <<EM>n</EM>>
virtual hosts?</STRONG></A>
<P>
The Apache server can behave unpredictably when it encounters some
resource limitations. One of these is the <EM>per</EM>-process limit
on <STRONG>file descriptors</STRONG>, and that's almost always the
cause of problems seen when adding virtual hosts. In this
case, it is often not actually Apache that's encountering the problem, but
some library routine (such as <SAMP>gethostbyname()</SAMP>)
which needs file descriptors and doesn't complain intelligibly when it
can't get them.
</P>
<P>
Each log file requires a file descriptor, which means that if you are
using seperate access and error logs for each virtual host each
virtual host needs two file descriptors. Each
<A
HREF="../mod/core.html#listen"
>Listen</A><A HREF="#References">[17]</A>
directive also needs a file descriptor.
</P>
<P>
Typical values for <<EM>n</EM>> that we've seen are in
the neighbourhoods of 128 or 250. When the server bumps into the file
descriptor limit, it may dump core with a SIGSEGV, or it might just
hang, or it may limp along and you'll see (possibly meaningful) errors
in the error log. One common problem that occurs when you run into
a file descriptor limit is that CGI scripts stop being executed
properly at times.
</P>
<P>
As to what you can do about this:
</P>
<OL>
<LI>Reduce the number of
<A
HREF="../mod/core.html#listen"
>Listen</A><A HREF="#References">[17]</A>
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.
<LI>Reduce the number of log files. You can use
<A
HREF="../mod/mod_log_config.html"
>mod_log_config</A><A HREF="#References">[18]</A>
to log all requests to a single log file while including the name
of the virtual host in the log file.
<LI>Increase the number of file descriptors available to the server
(see your system's documentation on the <SAMP>limit</SAMP> or
<SAMP>ulimit</SAMP> commands). For some systems, information on
how to do this is available in the
<A
HREF="perf.html"
>performance hints</A><A HREF="#References">[19]</A>
page.
</LI>
<LI>"Don't do that" - try to run with fewer virtual hosts
</LI>
<LI>Spread your operation across multiple server processes (using
<A
HREF="../mod/core.html#listen"
>Listen</A><A HREF="#References">[17]</A>
for example, but see the first point) and/or ports.
</LI>
</OL>
<P>
Since this is an operating-system limitation, there's not much else
available in the way of solutions.
</P>
<HR>
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
<LI><A NAME="limitGET">
<STRONG>Why do I keep getting "access denied" for form POST
requests?</STRONG>
</A>
<P>
The most common cause of this is a <SAMP><Limit></SAMP> section
that only names the <SAMP>GET</SAMP> method. Look in your
configuration files for something that resembles the following and
would affect the location where the POST-handling script resides:
</P>
<PRE>
<Limit GET>
:
</PRE>
<P>
Change that to <SAMP><Limit GET POST></SAMP> and the problem
will probably go away.
</P>
<HR>
</LI>
<LI><A NAME="passwdauth">
<STRONG>Can I use my <SAMP>/etc/passwd</SAMP> file
for Web page authentication?</STRONG>
</A>
<P>
Yes, you can - but it's a <STRONG>very bad idea</STRONG>. Here are
some of the reasons:
</P>
<UL>
<LI>The Web technology provides no governors on how often or how
rapidly password (authentication failure) retries can be made. That
means that someone can hammer away at your system's
<SAMP>root</SAMP> password using the Web, using a dictionary or
similar mass attack, just as fast as the wire and your server can
handle the requests. Most operating systems these days include
attack detection (such as <EM>n</EM> failed passwords for the same
account within <EM>m</EM> seconds) and evasion (breaking the
connexion, disabling the account under attack, disabling
<EM>all</EM> logins from that source, <EM>et cetera</EM>), but the
Web does not.
</LI>
<LI>An account under attack isn't notified (unless the server is
heavily modified); there's no "You have 19483 login
failures" message when the legitimate owner logs in.
</LI>
<LI>Without an exhaustive and error-prone examination of the server
logs, you can't tell whether an account has been compromised.
Detecting that an attack has occurred, or is in progress, is fairly
obvious, though - <EM>if</EM> you look at the logs.
</LI>
<LI>Web authentication passwords (at least for Basic authentication)
generally fly across the wire, and through intermediate proxy
systems, in what amounts to plaintext. "O'er the net we
go/Caching all the way;/O what fun it is to surf/Giving my password
away!"
</LI>
<LI>Since HTTP is stateless, information about the authentication is
transmitted <EM>each and every time</EM> a request is made to the
server. Essentially, the client caches it after the first
successful access, and transmits it without asking for all
subsequent requests to the same server.
</LI>
<LI>It's relatively trivial for someone on your system to put up a
page that will steal the cached password from a client's cache. Can
you say "password grabber"?
</LI>
</UL>
<P>
If you still want to do this in light of the above disadvantages, the
method is left as an exercise for the reader. It'll void your Apache
warranty, though, and you'll lose all accumulated UNIX guru points.
</P>
<HR>
<STRONG>Why doesn't my <SAMP>ErrorDocument 401</SAMP> work?</STRONG>
</A>
<P>
You need to use it with a URL in the form "/foo/bar" and not one
with a method and hostname such as "http://host/foo/bar". See the
<A
HREF="../mod/core.html#errordocument"
>ErrorDocument</A><A HREF="#References">[20]</A>
documentation for details. This was incorrectly documented in the past.
<LI><A NAME="setgid">
<STRONG>Why do I get "setgid: Invalid argument" at
startup?</STRONG>
</A>
<P>
Your
<A
HREF="../mod/core.html#group"
><SAMP>Group</SAMP></A><A HREF="#References">[21]</A>
directive (probably in <SAMP>conf/httpd.conf</SAMP>) needs to name a
group that actually exists in the <SAMP>/etc/group</SAMP> file (or
your system's equivalent).
</P>
<HR>
</LI>
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
<LI><A NAME="cookies1">
<STRONG>Why does Apache send a cookie on every response?</STRONG></A>
<P>
Apache does <i>not</i> send automatically send a cookie on every
response, unless you have re-compiled it with the
<A
HREF="../mod/mod_cookies">mod_cookies</A><A
HREF="#References">[22]</A></SAMP> module.
This module was distributed with Apache prior to 1.2.
This module may help track users, and uses cookies to do this. If
you are not using the data generated by mod_cookies, do not compile
it into Apache. Note that in 1.2 this module was renamed to the
more correct name
<A
HREF="../mod/mod_usertrack">mod_usertrack</A><A
HREF="#References">[23]</A></SAMP>, and cookies
have to be specifically enabled with the <SAMP>
<A
HREF="../mod/mod_usertrack#cookietracking">CookieTracking</A><A
HREF="#References">[24]</A></SAMP>
directive.
</P>
<HR>
</LI>
<LI><A NAME="cookies2">
<STRONG>Why don't my cookies work, I even compiled in mod_cookies?
</STRONG></A>
<P>
Firstly, you do <i>not</i> need to compile in mod_cookies in order
for your scripts to work (see <A HREF="#cookies1">this question</A>
for more about mod_cookies). Apache passes on your Set-Cookie header
fine, with or without this module. If cookies do not work it will
be because your script does not work properly or your browser does
not use cookies or is not set-up to accept them.
</LI>
</OL>
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
<HR>
<A NAME="References">
<H3>
References
</H3>
</A>
<DL COMPACT>
<DT>[1]
</DT>
<DD><A
HREF="http://www.netcraft.com/Survey/"
>http://www.netcraft.com/Survey/</A>
</DD>
<DT>[2]
</DT>
<DD><A
HREF="http://webcompare.iworld.com/compare/chart.html"
>http://webcompare.iworld.com/compare/chart.html</A>
</DD>
<DT>[3]
</DT>
<DD><A
HREF="http://www.apache.org/info/apache_users.html"
>http://www.apache.org/info/apache_users.html</A>
</DD>
<DT>[4]
</DT>
<DD><A
HREF="http://www.apache.org/bug_report.html"
>http://www.apache.org/bug_report.html</A>
</DD>
<DT>[5]
</DT>
<DD><A
HREF="news:comp.infosystems.www.servers.unix"
>news:comp.infosystems.www.servers.unix</A>
</DD>
<DT>[6]
</DT>
<DD><A
HREF="http://www.apache.org/"
>http://www.apache.org/</A>
</DD>
<DT>[7]
</DT>
<DD><A
HREF="http://www.apacheweek.com/"
>http://www.apacheweek.com/</A>
</DD>
<DT>[8]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/core.html#errorlog"
>http://www.apache.org/docs/mod/core.html#errorlog</A>
</DD>
<DT>[9]
</DT>
<DD><A
HREF="http://www.apache.org/bugdb.cgi"
>http://www.apache.org/bugdb.cgi</A>
</DD>
<DT>[10]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/mod_alias.html#scriptalias"
>http://www.apache.org/docs/mod/mod_alias.html#scriptalias</A>
</DD>
<DT>[11]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/mod_mime.html#addhandler"
>http://www.apache.org/docs/mod/mod_mime.html#addhandler</A>
</DD>
<DT>[12]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/core.html#options"
>http://www.apache.org/docs/mod/core.html#options</A>
</DD>
<DT>[13]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/mod_include.html"
>http://www.apache.org/docs/mod/mod_include.html</A>
</DD>
<DT>[14]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/mod_expires.html"
>http://www.apache.org/docs/mod/mod_expires.html</A>
</DD>
<DT>[15]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/mod_include.html#xbithack"
>http://www.apache.org/docs/mod/mod_include.html#xbithack</A>
</DD>
<DT>[16]
</DT>
<DD><A
HREF="http://www.apache.org/docs/content-negotiation.html"
>http://www.apache.org/docs/content-negotiation.html</A>
</DD>
<DT>[17]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/core.html#listen"
>http://www.apache.org/docs/mod/core.html#listen</A>
</DD>
<DT>[18]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/mod_log_config.html"
>http://www.apache.org/docs/mod/mod_log_config.html</A>
</DD>
<DT>[19]
</DT>
<DD><A
HREF="http://www.apache.org/docs/misc/perf.html"
>http://www.apache.org/docs/misc/perf.html</A>
</DD>
<DT>[20]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/core.html#errordocument"
>http://www.apache.org/docs/mod/core.html#errordocument</A>
</DD>
<DT>[21]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/core.html#group"
>http://www.apache.org/docs/mod/core.html#group</A>
<DT>[22]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/mod_cookies"
>http://www.apache.org/docs/mod/mod_cookies</A>
</DD>
<DT>[23]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/mod_usertrack"
>http://www.apache.org/docs/mod/mod_usertrack</A>
</DD>
<DT>[24]
</DT>
<DD><A
HREF="http://www.apache.org/docs/mod/mod_usertrack#cookietracking"
>http://www.apache.org/docs/mod/mod_usertrack#cookietracking</A>
<!--#include virtual="footer.html" -->
</BODY>
</HTML>