From 785afc46d9cac26471223d6d1c12f16722995d50 Mon Sep 17 00:00:00 2001
From: Ken Coar
- $Revision: 1.108 $ ($Date: 1998/02/18 21:07:25 $)
+ $Revision: 1.109 $ ($Date: 1998/03/24 02:58:49 $)
The latest version of this FAQ is always available from the main
@@ -109,7 +109,7 @@
work?" What to do in case of problems
Apache Server Frequently Asked Questions
ErrorDocument
- 401
work?
+ 401 work?
ErrorDocument
- and SSI to simplify customized error messages?
+ and SSI to simplify customized error messages?
struct iovec
" when compiling under Linux?
+ of "struct iovec
" when compiling under Linux?
crypt
function when
- I attempt to build Apache 1.2.
- crypt
function when I attempt to build Apache 1.2.
+
For an independent assessment, see - Web Compare's + Web Compare's comparison chart.
@@ -358,6 +364,7 @@
The Apache project's web site includes a page with a partial list of - sites running Apache. + sites running + Apache.
Indeed there is. See the main - Apache web site. + Apache web site. There is also a regular electronic publication called - Apache Week + Apache Week available. Links to relevant Apache Week articles are included below where appropriate. There are also some - Apache-specific books available.
You can find out how to download the source for Apache at the project's - main web page. + main web page.
The latest version of the Apache Frequently-Asked Questions list can always be found at the main Apache web site. @@ -495,9 +488,7 @@
Most problems that get reported to The Apache Group are recorded in the - bug database. + bug database. Please check the existing reports, open and closed, before adding one. If you find that your issue has already been reported, please don't add @@ -513,8 +504,7 @@
A lot of common problems never make it to the bug database because there's already high Q&A traffic about them in the - comp.infosystems.www.servers.unix newsgroup. Many Apache users, and some of the developers, can be found roaming its virtual halls, so it is suggested that you seek @@ -529,9 +519,7 @@ If you've gone through those steps above that are appropriate and have obtained no relief, then please do let The Apache Group know about the problem by - logging a bug report. + logging a bug report.
If your problem involves the server crashing and generating a core @@ -555,6 +543,7 @@
Apache recognizes all files in a directory named as a - ScriptAlias + ScriptAlias 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 @@ -598,9 +586,7 @@ directories where normal documents may also live, you must tell it how to recognize them - and also that it's okay to execute them. For this, you need to use something like the - AddHandler + AddHandler directive.
@@ -620,9 +606,7 @@
RewriteEngine on
@@ -654,16 +635,15 @@
To enable SSI processing, you need to
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. +
- For additional information, see the Apache Week article - on - Apache Week article on + Using Server Side Includes.
You can work around this in some cases by causing an Expires header to be generated. (See the - mod_expires + mod_expires documentation for more details.) Another possibility is to use the - XBitHack Full mechanism, which tells Apache to send (under certain circumstances detailed in the XBitHack directive description) a @@ -827,6 +794,7 @@
Apache version 1.1 and above comes with a - proxy module. - If compiled - in, this will make Apache act as a caching-proxy server. + proxy module. + If compiled in, this will make Apache act as a caching-proxy server.
@@ -915,39 +876,31 @@
limit
or
- ulimit
commands). For some systems, information on
- how to do this is available in the
- performance hints
- page. There is a specific note for
- FreeBSD below.
+ (see your system's documentation on the limit
or
+ ulimit
commands). For some systems, information on
+ how to do this is available in the
+ performance hints page. There is a specific
+ note for FreeBSD below.
If you are using a version prior to 2.2, you need to recompile your - kernel with a larger FD_SETSIZE. This can be done by adding a + kernel with a larger FD_SETSIZE. This can be done by adding a line such as:
- To your kernel config file. Starting at version 2.2, this is no + to your kernel config file. Starting at version 2.2, this is no longer necessary.
If you are using a version of 2.1-stable from after 1997/03/10 or 2.2 or 3.0-current from before 1997/06/28, there is a limit in the resolver library that prevents it from using more file descriptors - than what FD_SETSIZE is set to when libc is compiled. To increase - this, you have to recompile libc with a higher FD_SETSIZE. + than what FD_SETSIZE is set to when libc is compiled. To + increase this, you have to recompile libc with a higher + FD_SETSIZE.
- In FreeBSD 3.0, the default FD_SETSIZE has been increased to + In FreeBSD 3.0, the default FD_SETSIZE has been increased to 1024 and the above limitation in the resolver library has been removed.
@@ -1034,6 +989,7 @@ErrorDocument 401
work?
@@ -1095,16 +1052,15 @@
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
- ErrorDocument
+ ErrorDocument
documentation for details. This was incorrectly documented in the past.
ErrorDocument
- and SSI to simplify customized error messages?
+ and SSI to simplify customized error messages?
Have a look at this document. @@ -1115,48 +1071,44 @@
Your - Group + Group directive (probably in conf/httpd.conf) needs to name a group that actually exists in the /etc/group file (or your system's equivalent).
Apache does not send automatically send a cookie on every response, unless you have re-compiled it with the - mod_cookies + mod_cookies 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 - mod_usertrack, + mod_usertrack, and cookies have to be specifically enabled with the - CookieTracking directive.
Firstly, you do not need to compile in mod_cookies in order for your scripts to work (see the - previous question + previous question 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 @@ -1176,7 +1126,8 @@
More information about this issue can be found in the - Java and HTTP/1.1 page at the Apache web site.
struct iovec
" when
@@ -1374,6 +1328,7 @@
Some SSL implementations of Apache are available, however; see the - "related projects" page at the main Apache web site.
You can find out more about this topic in the Apache Week article about - Apache and Secure Transactions.
We have had numerous reports of Apache dumping core when compiled @@ -1496,6 +1450,7 @@
If the server won't compile on your system, it is probably due to one @@ -1577,27 +1533,22 @@ platforms there are. If you have verified that none of the above issues is the cause of your problem, and it hasn't been reported before, please submit a - problem report. + problem report. Be sure to include complete details, such as the compiler & OS versions and exact error messages.
Apache provides a couple of different ways of doing this. The recommended method is to compile the - mod_log_config + mod_log_config module into your configuration and use the - CustomLog + CustomLog directive.
@@ -1619,14 +1570,13 @@
You may want to check out the Apache Week article entitled: - "Gathering Visitor Information: Customising Your Logfiles".
- When you access a directory without a trailing "/", Apache needs + When you access a directory without a trailing "/", Apache needs to send what is called a redirect to the client to tell it to add the trailing slash. If it did not do so, relative URLs would not work properly. When it sends the redirect, it needs to know @@ -1694,6 +1645,7 @@
For an explanation on how to implement these restrictions, see - Apache Week's + Apache Week's articles on - Using User Authentication or - DBM User Authentication.
This variable is set and thus available in SSI or CGI scripts if and only if the requested document was protected by access authentication. For an explanation on how to implement these restrictions, see - Apache Week's + Apache Week's articles on - Using User Authentication or - DBM User Authentication.
@@ -1750,6 +1695,7 @@
- The - mod_info + The mod_info module allows you to use a Web browser to see how your server is configured. Among the information it displays is the list modules and their configuration directives. The "current" values for @@ -1806,18 +1750,17 @@ reloaded, the display will will not match the values actively in use. If the files and the path to the files are not readable by the user as which the server is running (see the - User + User directive), then mod_info cannot read them in order to list their values. An entry will be made in the error log in this event, however.
Your kernel has been built without SysV IPC support. You will have to @@ -1840,6 +1783,7 @@
There is a collection of - Practical Solutions for URL-Manipulation where you can find all typical solutions the author of - mod_rewrite + mod_rewrite currently knows of. If you have more interesting rulesets which solve particular problems not currently covered in this document, send it to - Ralf S. Engelschall + Ralf S. Engelschall for inclusion. The other webmasters will thank you for avoiding the reinvention of the wheel.
There is an article from - Ralf S. Engelschall about URL-manipulations based on - mod_rewrite + mod_rewrite in the "iX Multiuser Multitasking Magazin" issue #12/96. The german (original) version can be read online at - http://www.heise.de/ix/artikel/9612149/, + <http://www.heise.de/ix/artikel/9612149/>, the English (translated) version can be found at - http://www.heise.de/ix/artikel/E/9612149/. + <http://www.heise.de/ix/artikel/E/9612149/>.
Hmmm... there are a lot of reasons. First, mod_rewrite itself is a powerful - module which can help you in really all aspects of URL rewriting, so - it can be no trivial module per definition. To accomplish its hard job it - uses software leverage and makes use of a powerful regular expression + module which can help you in really all aspects of URL + rewriting, so it can be no trivial module per definition. To accomplish + its hard job it uses software leverage and makes use of a powerful regular + expression library by Henry Spencer which is an integral part of Apache since its version 1.2. And regular expressions itself can be difficult to newbies, while providing the most flexible power to the advanced hacker. @@ -2007,9 +1947,10 @@
Use "RewriteLog somefile" and @@ -2019,6 +1960,7 @@
You can't! The reason is: First, case translations for arbitrary length URLs @@ -2055,9 +1998,9 @@
Because you have to enable the engine for every virtual host explicitly due @@ -2066,9 +2009,10 @@
There is only one ugly solution: You have to surround the complete flag @@ -2079,8 +2023,10 @@
The Common Gateway Interface (CGI) specification can be found at the original NCSA site @@ -2089,8 +2035,15 @@ This version hasn't been updated since 1995, and there have been some efforts to update it.
++ A new draft is being worked on with the intent of making it an informational + RFC; you can find out more about this project at + <http://web.golux.com/coar/cgi/>. +
Some aspects of Apache's output may use two-digit years, such as the automatic listing of directory contents provided by - mod_autoindex + mod_autoindex with the - FancyIndexing option enabled, but it is improper to depend upon such displays for specific syntax. And even that issue is being addressed by the @@ -2136,6 +2086,7 @@
Apache 1.3b2 introduced a new directive, - NameVirtualHost, which simplifies the rules quite a bit. However, changing the rules like this means that your existing name-based @@ -2184,91 +2134,148 @@
RedHat Linux versions 4.x (and possibly earlier) rpms contain - various nasty scripts which do not stop or restart Apache properly. - These can affect you even if you're not running the RedHat supplied - rpms. - -
If you're using the default install then you're probably running - Apache 1.1.3, which is outdated. From RedHat's ftp site you can - pick up a more recent RPM for Apache 1.2.x. This will solve one of - the problems. - -
If you're using a custom built Apache rather than the RedHat rpms
- then you should rpm -e apache
. In particular you want
- the mildly broken /etc/logrotate.d/apache
script to be
- removed, and you want the broken /etc/rc.d/init.d/httpd
- (or httpd.init
) script to be removed. The latter is
- actually fixed by the apache-1.2.5 rpms but if you're building your
- own Apache then you probably don't want the RedHat files.
-
-
We can't stress enough how important it is for folks, especially - vendors to follow the stopping Apache - directions given in our documentation. In RedHat's defense, - the broken scripts were necessary with Apache 1.1.x because the - Linux support in 1.1.x was very poor, and there were various race - conditions on all platforms. None of this should be necessary with - Apache 1.2 and later. -
-You should read the previous note about
- problems with RedHat installations. It is entirely likely that your
- installation has start/stop/restart scripts which were built for
- an earlier version of Apache. Versions earlier than 1.2.0 had
- various race conditions that made it necessary to use
- kill -9
at times to take out all the httpd servers.
- But that should not be necessary any longer. You should follow
- the directions on how to stop
- and restart Apache.
-
-
As of Apache 1.3 there is a script
- src/support/apachectl
which, after a bit of
- customization, is suitable for starting, stopping, and restarting
- your server.
-
RedHat messed up and forgot to put a content type for .htm
- files into /etc/mime.types
. Edit /etc/mime.types
,
- find the line containing html
and add htm
to it.
- Then restart your httpd server:
-
- kill -HUP `cat /var/run/httpd.pid` -- Then clear your browsers' caches. (Many browsers won't re-examine - the content type after they've reloaded a page.) - -
crypt
function when
- I attempt to build Apache 1.2.
-
- glibc puts the crypt function into a separate library. Edit your
- src/Configuration
file and set this:
-
- EXTRA_LIBS=-lcrypt -- -
+ RedHat Linux versions 4.x (and possibly earlier) rpms contain + various nasty scripts which do not stop or restart Apache properly. + These can affect you even if you're not running the RedHat supplied + rpms. +
++ If you're using the default install then you're probably running + Apache 1.1.3, which is outdated. From RedHat's ftp site you can + pick up a more recent RPM for Apache 1.2.x. This will solve one of + the problems. +
+
+ If you're using a custom built Apache rather than the RedHat rpms
+ then you should rpm -e apache
. In particular you want
+ the mildly broken /etc/logrotate.d/apache
script to be
+ removed, and you want the broken /etc/rc.d/init.d/httpd
+ (or httpd.init
) script to be removed. The latter is
+ actually fixed by the apache-1.2.5 rpms but if you're building your
+ own Apache then you probably don't want the RedHat files.
+
+ We can't stress enough how important it is for folks, especially + vendors to follow the stopping Apache + directions given in our documentation. In RedHat's defense, + the broken scripts were necessary with Apache 1.1.x because the + Linux support in 1.1.x was very poor, and there were various race + conditions on all platforms. None of this should be necessary with + Apache 1.2 and later. +
+
+ You should read the previous note about
+ problems with RedHat installations. It is entirely likely that your
+ installation has start/stop/restart scripts which were built for
+ an earlier version of Apache. Versions earlier than 1.2.0 had
+ various race conditions that made it necessary to use
+ kill -9
at times to take out all the httpd servers.
+ But that should not be necessary any longer. You should follow
+ the directions on how to stop
+ and restart Apache.
+
As of Apache 1.3 there is a script
+ src/support/apachectl
which, after a bit of
+ customization, is suitable for starting, stopping, and restarting
+ your server.
+
+ RedHat messed up and forgot to put a content type for .htm
+ files into /etc/mime.types
. Edit /etc/mime.types
,
+ find the line containing html
and add htm
to it.
+ Then restart your httpd server:
+
kill -HUP `cat /var/run/httpd.pid`
+ + Then clear your browsers' caches. (Many browsers won't + re-examine the content type after they've reloaded a page.) +
+crypt
function when I attempt to build Apache 1.2.
+
+
+
+ glibc puts the crypt
function into a separate
+ library. Edit your src/Configuration
file and set this:
+
EXTRA_LIBS=-lcrypt
+ + Then re-run src/Configure and re-execute the make. +
++ These are symptoms of a fine locking problem, which usually means that + the server is trying to use a synchronisation file on an NFS filesystem. +
++ Because of its parallel-operation model, the Apache Web server needs to + provide some form of synchronisation when accessing certain resources. + One of these synchronisation methods involves taking out locks on a file, + which means that the filesystem whereon the lockfile resides must support + locking. In many cases this means it can't be kept on an + NFS-mounted filesystem. +
++ To cause the Web server to work around the NFS locking limitations, include + a line such as the following in your server configuration files: +
+LockFile /var/run/apache-lock
+ + The directory should not be generally writable (e.g., don't use + /var/tmp). + See the LockFile + documentation for more information. +
+