From: (no author) <(no author)@unknown>
Date: Mon, 20 Nov 2000 20:10:50 +0000 (+0000)
Subject: This commit was manufactured by cvs2svn to create tag
X-Git-Tag: APACHE_2_0_ALPHA_8^0
X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=173652fa551881f22ca9a5e62ec587ea63df83c2;p=thirdparty%2Fapache%2Fhttpd.git
This commit was manufactured by cvs2svn to create tag
'APACHE_2_0_ALPHA_8'.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/tags/APACHE_2_0_ALPHA_8@87038 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/build/binbuild.sh b/build/binbuild.sh
deleted file mode 100755
index 53aa80ff1a9..00000000000
--- a/build/binbuild.sh
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/bin/sh
-#
-# binbuild.sh - Builds an Apache binary distribution.
-# Initially written by Lars Eilebrecht
-
-There are two directives used to restrict or specify which addresses
-and ports Apache listens to.
-
-
-
-Makes the server listen to just the specified address. If the argument
-is *, the server listens to all addresses. The port listened to
-is set with the Port directive. Only one BindAddress
-should be used.
-
-
-
-Listen can be used instead of BindAddress and
-Port. It tells the server to accept incoming requests on the
-specified port or address-and-port combination. If the first format is
-used, with a port number only, the server listens to the given port on
-all interfaces, instead of the port given by the Port
-directive. If an IP address is given as well as a port, the server
-will listen on the given port and interface. Multiple Listen
-directives may be used to specify a number of addresses and ports to
-listen to. The server will respond to requests from any of the listed
-addresses and ports.
-
-For example, to make the server accept connections on both port
-80 and port 8000, use:
- As implemented in Apache 1.1.1 and earlier versions, the method
-Apache used to create PATH_INFO in the CGI environment was
-counterintuitive, and could result in crashes in certain cases. In
-Apache 1.2 and beyond, this behavior has changed. Although this
-results in some compatibility problems with certain legacy CGI
-applications, the Apache 1.2 behavior is still compatible with the
-CGI/1.1 specification, and CGI scripts can be easily modified (see below).
-
- Apache 1.1.1 and earlier implemented the PATH_INFO and SCRIPT_NAME
-environment variables by looking at the filename, not the URL. While
-this resulted in the correct values in many cases, when the filesystem
-path was overloaded to contain path information, it could result in
-errant behavior. For example, if the following appeared in a config
-file:
- In this case, Apache 1.2 and later now determine SCRIPT_NAME and PATH_INFO by
-looking directly at the URL, and determining how much of the URL is
-client-modifiable, and setting PATH_INFO to it. To use the above
-example, PATH_INFO would be set to " However, the " It may be necessary for a script that was designed for earlier
-versions of Apache or other servers to need the information that the
-old PATH_INFO variable provided. For this purpose, Apache 1.2 (1.2b3
-and later) sets an additional variable, FILEPATH_INFO. This
-environment variable contains the value that PATH_INFO would have had
-with Apache 1.1.1. A script that wishes to work with both Apache 1.2 and earlier
-versions can simply test for the existence of FILEPATH_INFO, and use
-it if available. Otherwise, it can use PATH_INFO. For example, in
-Perl, one might use:
- By doing this, a script can work with all servers supporting the
-CGI/1.1 specification, including all versions of Apache. Apache is configured by placing directives in plain text configuration files. The main
-configuration file is usually called
-The server also reads a file containing mime document types; the
-filename is set by the TypesConfig directive, and is Apache configuration files contain one directive per line. The
-back-slash "\" may be used as the last character on a line to indicate
-that the directive continues onto the next line. There must be no
-other characters or white space between the back-slash and the end of
-the line.
-
- Directives in the configuration files are case-insensitive, but
-arguments to directives are often case sensitive. Lines which begin
-with the hash character "#" are considered comments, and are ignored.
-Comments may not be included on a line after a
-configuration directive. Blank lines and white space occurring before
-a directive are ignored, so you may indent directives for clarity.
-
- You can check your configuration files for syntax errors without
-starting the server by using Apache is a modular server. This implies that only the most basic
-functionality is included in the core server. Extended features are
-available through modules which
-can be loaded into Apache. By default, a base set of modules is
-included in the server at compile-time. If the server is compiled to
-use dynamically loaded modules, then modules
-can be compiled separately and added at any time using the LoadModule directive.
-Otherwise, Apache must be recompiled to add or remove modules.
-Configuration directives may be included conditional on a presence of
-a particular module by enclosing them in an <IfModule> block.
-
- To see which modules are currently compiled into the server,
-you can use the Directives placed in the main configuration files apply to the entire
-server. If you wish to change the configuration for only a part of
-the server, you can scope your directives by placing them in
- Apache has the capability to serve many different websites
-simultaneously. This is called Virtual Hosting.
-Directives can also be scoped by placing them inside
- Although most directives can be placed in any of these sections,
-some directives do not make sense in some contexts. For example,
-directives controlling process creation can only be placed in the main
-server context. To find which directives can be placed in which
-sections, check the Context of the directive.
-For further information, we provide details on How Directory, Location and Files sections
-work.
-
- Apache allows for decentralized management of configuration via
-special files placed inside the web tree. The special files are
-usually called To find which directives can be placed in On startup, Apache saves the process id of the parent httpd process to
-the file
-If the process dies (or is killed) abnormally, then it will be necessary to
-kill the children httpd processes.
-
- The server will log error messages to a log file, by default
- The server will typically log each request to a transfer file, by
-default
-Apache's support for content negotiation has been updated to meet the
-HTTP/1.1 specification. It can choose the best representation of a
-resource based on the browser-supplied preferences for media type,
-languages, character set and encoding. It is also implements a
-couple of features to give more intelligent handling of requests from
-browsers which send incomplete negotiation information.
-
-Content negotiation is provided by the
-mod_negotiation module,
-which is compiled in by default.
-
-
-A resource may be available in several different representations. For
-example, it might be available in different languages or different
-media types, or a combination. One way of selecting the most
-appropriate choice is to give the user an index page, and let them
-select. However it is often possible for the server to choose
-automatically. This works because browsers can send as part of each
-request information about what representations they prefer. For
-example, a browser could indicate that it would like to see
-information in French, if possible, else English will do. Browsers
-indicate their preferences by headers in the request. To request only
-French representations, the browser would send
-
-
-Note that this preference will only be applied when there is a choice
-of representations and they vary by language.
-
-
-As an example of a more complex request, this browser has been
-configured to accept French and English, but prefer French, and to
-accept various media types, preferring HTML over plain text or other
-text types, and preferring GIF or JPEG over other media types, but also
-allowing any other media type as a last resort:
-
-
-
-A resource is a conceptual entity identified by a URI
-(RFC 2396). An HTTP server like Apache provides access to
-representations of the resource(s) within its namespace,
-with each representation in the form of a sequence of bytes with a
-defined media type, character set, encoding, etc. Each resource may be
-associated with zero, one, or more than one representation
-at any given time. If multiple representations are available,
-the resource is referred to as negotiable and each of its
-representations is termed a variant. The ways in which the
-variants for a negotiable resource vary are called the
-dimensions of negotiation.
-
-
-In order to negotiate a resource, the server needs to be given
-information about each of the variants. This is done in one of two
-ways:
-
-
-A type map is a document which is associated with the handler
-named
-
-Type map files have an entry for each available variant; these entries
-consist of contiguous HTTP-format header lines. Entries for
-different variants are separated by blank lines. Blank lines are
-illegal within an entry. It is conventional to begin a map file with
-an entry for the combined entity as a whole (although this
-is not required, and if present will be ignored). An example
-map file is:
-
-
-
-qs values can vary in the range 0.000 to 1.000. Note that any variant with
-a qs value of 0.000 will never be chosen. Variants with no 'qs'
-parameter value are given a qs factor of 1.0. The qs parameter indicates
-the relative 'quality' of this variant compared to the other available
-variants, independent of the client's capabilities. For example, a jpeg
-file is usually of higher source quality than an ascii file if it is
-attempting to represent a photograph. However, if the resource being
-represented is an original ascii art, then an ascii representation would
-have a higher source quality than a jpeg representation. A qs value
-is therefore specific to a given variant depending on the nature of
-the resource it represents.
-
-
-The full list of headers recognized is:
-
-
-
-The effect of
-
-If one of the files found when reading the directive is a CGI script,
-it's not obvious what should happen. The code gives that case
-special treatment --- if the request was a POST, or a GET with
-QUERY_ARGS or PATH_INFO, the script is given an extremely high quality
-rating, and generally invoked; otherwise it is given an extremely low
-quality rating, which generally causes one of the other views (if any)
-to be retrieved.
-
-
-
-There are two negotiation methods:
-
-
-Apache can use the following algorithm to select the 'best' variant
-(if any) to return to the browser. This algorithm is not
-further configurable. It operates as follows:
-
-
-Apache sometimes changes the quality values from what would be
-expected by a strict interpretation of the Apache negotiation
-algorithm above. This is to get a better result from the algorithm for
-browsers which do not send full or accurate information. Some of the
-most popular browsers send Accept header information which would
-otherwise result in the selection of the wrong variant in many
-cases. If a browser sends full and correct information these fiddles
-will not be applied.
-
-
-
-The Accept: request header indicates preferences for media types. It
-can also include 'wildcard' media types, such as "image/*" or "*/*"
-where the * matches any string. So a request including:
-
-
-If the Accept: header contains no q factors at all, Apache sets
-the q value of "*/*", if present, to 0.01 to emulate the desired
-behavior. It also sets the q value of wildcards of the format
-"type/*" to 0.02 (so these are preferred over matches against
-"*/*". If any media type on the Accept: header contains a q factor,
-these special values are not applied, so requests from browsers
-which send the correct information to start with work as expected.
-
-
-If some of the variants for a particular resource have a language
-attribute, and some do not, those variants with no language
-are given a very low language quality factor of 0.001.
-
-The reason for setting this language quality factor for
-variant with no language to a very low value is to allow
-for a default variant which can be supplied if none of the
-other variants match the browser's language preferences.
-
-For example, consider the situation with three variants:
-
-
-The meaning of a variant with no language is that it is
-always acceptable to the browser. If the request Accept-Language
-header includes either en or fr (or both) one of foo.en.html
-or foo.fr.html will be returned. If the browser does not list
-either en or fr as acceptable, foo.html will be returned instead.
-
-
-If you are using language negotiation you can choose between
-different naming conventions, because files can have more than one
-extension, and the order of the extensions is normally irrelevant
-(see mod_mime documentation for details).
-
-A typical file has a MIME-type extension (e.g., html),
-maybe an encoding extension (e.g., gz), and of course a
-language extension (e.g., en) when we have different
-language variants of this file.
-
-
-Examples:
-
-Here some more examples of filenames together with valid and invalid
-hyperlinks:
-
-Looking at the table above you will notice that it is always possible to
-use the name without any extensions in an hyperlink (e.g., foo).
-The advantage is that you can hide the actual type of a
-document rsp. file and can change it later, e.g., from html
-to shtml or cgi without changing any
-hyperlink references.
-
-
-If you want to continue to use a MIME-type in your hyperlinks (e.g.
-foo.html) the language extension (including an encoding extension
-if there is one) must be on the right hand side of the MIME-type extension
-(e.g., foo.html.en).
-
-
-
-When a cache stores a representation, it associates it with the request URL.
-The next time that URL is requested, the cache can use the stored
-representation. But, if the resource is negotiable at the server,
-this might result in only the first requested variant being cached and
-subsequent cache hits might return the wrong response. To prevent this,
-Apache normally marks all responses that are returned after content negotiation
-as non-cacheable by HTTP/1.0 clients. Apache also supports the HTTP/1.1
-protocol features to allow caching of negotiated responses.
-
-For requests which come from a HTTP/1.0 compliant client (either a
-browser or a cache), the directive CacheNegotiatedDocs can be
-used to allow caching of responses which were subject to negotiation.
-This directive can be given in the server config or virtual host, and
-takes no arguments. It has no effect on requests from HTTP/1.1 clients.
-
-
-
-
diff --git a/docs/manual/custom-error.html.en b/docs/manual/custom-error.html.en
deleted file mode 100644
index 09604ea972b..00000000000
--- a/docs/manual/custom-error.html.en
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
- Customizable responses can be defined to be activated in the
- event of a server detected error or problem.
-
- e.g. if a script crashes and produces a "500 Server Error"
- response, then this response can be replaced with either some
- friendlier text or by a redirection to another URL (local or
- external).
-
-
-
-
- Redirecting to another URL can be useful, but only if some information
- can be passed which can then be used to explain and/or log the
- error/problem
- more clearly.
-
- To achieve this, Apache will define new CGI-like environment
- variables, e.g.
-
- note the At least
-
- Here are some examples...
-
- The syntax is,
-
- where the action can be,
-
-
-
-
-
-
-
-
-If the ErrorDocument specifies a local redirect to a CGI script, the script
-should include a "Status:" header field in its output
-in order to ensure the propagation all the way back to the client
-of the error condition that caused it to be invoked. For instance, a Perl
-ErrorDocument script might include the following:
-
-If the script is dedicated to handling a particular error condition, such as
-404 Not Found, it can use the specific code and
-error text instead.
-
-
-A few notes on general pedagogical style here. In the interest of
-conciseness, all structure declarations here are incomplete --- the
-real ones have more slots that I'm not telling you about. For the
-most part, these are reserved to one component of the server core or
-another, and should be altered by modules with caution. However, in
-some cases, they really are things I just haven't gotten around to
-yet. Welcome to the bleeding edge.
-
-Finally, here's an outline, to give you some bare idea of what's
-coming up, and in what order:
-
-
-
-The handlers themselves are functions of one argument (a
-
-
-
-
-Let's begin with handlers. In order to handle the CGI scripts, the
-module declares a response handler for them. Because of
-
-
-The module needs to maintain some per (virtual)
-server information, namely, the
-
-Finally, this module contains code to handle the
-
-
-A final note on the declared types of the arguments of some of these
-commands: a
-
-
-
-The most important such information is a small set of character
-strings describing attributes of the object being requested, including
-its URI, filename, content-type and content-encoding (these being filled
-in by the translation and type-check handlers which handle the
-request, respectively).
-
-Other commonly used data items are tables giving the MIME headers on
-the client's original request, MIME headers to be sent back with the
-response (which modules can add to at will), and environment variables
-for any subprocesses which are spawned off in the course of servicing
-the request. These tables are manipulated using the
-
-
-
-Here is an abridged declaration, giving the fields most commonly used:
-
-
-
-
-
-
-
- Such handlers can construct a sub-request, using the
- functions
-
- (Server-side includes work by building sub-requests and then
- actually invoking the response handler for them, via the
- function
-
-
-
-They should begin by sending an HTTP response header, using the
-function
-
-Otherwise, they should produce a request body which responds to the
-client as appropriate. The primitives for this are
-
-At this point, you should more or less understand the following piece
-of code, which is the handler which handles
-
-
-
-(Invoking
-One of the problems of writing and designing a server-pool server is
-that of preventing leakage, that is, allocating resources (memory,
-open files, etc.), without subsequently releasing them. The resource
-pool machinery is designed to make it easy to prevent this from
-happening, by allowing resource to be allocated in such a way that
-they are automatically released when the server is done with
-them.
-
-The way this works is as follows: the memory which is allocated, file
-opened, etc., to deal with a particular request are tied to a
-resource pool which is allocated for the request. The pool
-is a data structure which itself tracks the resources in question.
-
-When the request has been processed, the pool is cleared. At
-that point, all the memory associated with it is released for reuse,
-all files associated with it are closed, and any other clean-up
-functions which are associated with the pool are run. When this is
-over, we can be confident that all the resource tied to the pool have
-been released, and that none of them have leaked.
-
-Server restarts, and allocation of memory and resources for per-server
-configuration, are handled in a similar way. There is a
-configuration pool, which keeps track of resources which were
-allocated while reading the server configuration files, and handling
-the commands therein (for instance, the memory that was allocated for
-per-server module configuration, log files and other files that were
-opened, and so forth). When the server restarts, and has to reread
-the configuration files, the configuration pool is cleared, and so the
-memory and file descriptors which were taken up by reading them the
-last time are made available for reuse.
-
-It should be noted that use of the pool machinery isn't generally
-obligatory, except for situations like logging handlers, where you
-really need to register cleanups to make sure that the log file gets
-closed when the server restarts (this is most easily done by using the
-function
-We begin here by describing how memory is allocated to pools, and then
-discuss how other resources are tracked by the resource pool
-machinery.
-
-Memory is allocated to pools by calling the function
-
-Note that there is no
-(It also raises the possibility that heavy use of
-There are functions which allocate initialized memory, and are
-frequently useful. The function
-returns a pointer to 8 bytes worth of memory, initialized to
-
-A pool is really defined by its lifetime more than anything else. There
-are some static pools in http_main which are passed to various
-non-http_main functions as arguments at opportune times. Here they are:
-
-For almost everything folks do, r->pool is the pool to use. But you
-can see how other lifetimes, such as pchild, are useful to some
-modules... such as modules that need to open a database connection once
-per child, and wish to clean it up when the child dies.
-
-You can also see how some bugs have manifested themself, such as setting
-connection->user to a value from r->pool -- in this case
-connection exists
-for the lifetime of ptrans, which is longer than r->pool (especially if
-r->pool is a subrequest!). So the correct thing to do is to allocate
-from connection->pool.
-
-And there was another interesting bug in mod_include/mod_cgi. You'll see
-in those that they do this test to decide if they should use r->pool
-or r->main->pool. In this case the resource that they are registering
-for cleanup is a child process. If it were registered in r->pool,
-then the code would wait() for the child when the subrequest finishes.
-With mod_include this could be any old #include, and the delay can be up
-to 3 seconds... and happened quite frequently. Instead the subprocess
-is registered in r->main->pool which causes it to be cleaned up when
-the entire request is done -- i.e., after the output has been sent to
-the client and logging has happened.
-
-As indicated above, resource pools are also used to track other sorts
-of resources besides memory. The most common are open files. The
-routine which is typically used for this is
-There is also a
-Unlike the case for memory, there are functions to close
-files allocated with
-(Using the
-Pool cleanups live until clear_pool() is called: clear_pool(a) recursively
-calls destroy_pool() on all subpools of a; then calls all the cleanups for a;
-then releases all the memory for a. destroy_pool(a) calls clear_pool(a)
-and then releases the pool structure itself. i.e., clear_pool(a) doesn't
-delete a, it just frees up all the resources and you can start using it
-again immediately.
-
-
-The primitive for creating a sub-pool is
-
-One final note --- sub-requests have their own resource pools, which
-are sub-pools of the resource pool for the main request. The polite
-way to reclaim the resources associated with a sub request which you
-have allocated (using the
-
-(Again, under most circumstances, you shouldn't feel obliged to call
-this function; only 2K of memory or so are allocated for a typical sub
-request, and it will be freed anyway when the main request pool is
-cleared. It is only when you are allocating many, many sub-requests
-for a single main request that you should seriously consider the
-
-
-However, just giving the modules command tables is not enough to
-divorce them completely from the server core. The server has to
-remember the commands in order to act on them later. That involves
-maintaining data which is private to the modules, and which can be
-either per-server, or per-directory. Most things are per-directory,
-including in particular access control and authorization information,
-but also information on how to determine file types from suffixes,
-which can be modified by
-
-Another requirement for emulating the NCSA server is being able to
-handle the per-directory configuration files, generally called
-
-
-Finally, after having served a request which involved reading
-
-
-
-
-(If we are reading a
-
-For the MIME module, the per-dir config creation function just
-
-
-To do that, the server invokes the module's per-directory config merge
-function, if one is present. That function takes three arguments:
-the two structures being merged, and a resource pool in which to
-allocate the result. For the MIME module, all that needs to be done
-is overlay the tables from the new per-directory config structure with
-those from the parent:
-
-
-
-
-
-Another way in which this particular command handler is unusually
-simple is that there are no error conditions which it can encounter.
-If there were, it could return an error message instead of
-
-
-The MIME module's command table has entries for these commands, which
-look like this:
-
-
-
-The only substantial difference is that when a command needs to
-configure the per-server private module data, it needs to go to the
-
-This is a first attempt at writing the lessons I learned when trying to convert the mod_mmap_static module to Apache 2.0. It's by no means definitive and probably won't even be correct in some ways, but it's a start.
-
-These now need to be of type ap_status_t and return a value of that type. Normally the return value will be APR_SUCCESS unless there is some need to signal an error in the cleanup. Be aware that even though you signal an error not all code yet checks and acts upon the error.
-
-These should now be renamed to better signify where they sit in the overall process. So the name gets a small change from mmap_init to mmap_post_config. The arguments passed have undergone a radical change and now look like
-
-Throughout Apache the old pools have been replced by the ap_context_t, though their use remains remarkably similar.
-
-A lot of the data types have been moved into the APR. This means that some have had a name change, such as the one shown above. The following is a brief list of some of the changes that you are likely to have to make.
-
-The new architecture uses a series of hooks to provide for calling your functions. These you'll need to add to your module by way of a new function, static void register_hooks(void). The function is really reasonably straightforward once you understand what needs to be done. Each function that needs calling at some stage in the processing of a request needs to be registered, handlers do not. There are a number of phases where functions can be added, and for each you can specify with a high degree of control the relative order that the function will be called in.
-
-This is the code that was added to mod_mmap_static
-
-This registers 2 functions that need to be called, one in the post_config stage (virtually every module will need this one) and one for the translate_name phase. note that while there are different function names the format of each is identical. So what is the format?
-
-ap_hook_[phase_name](function_name, predecessors, successors, position);
-
-There are 3 hook positions defined...
-
-To define the position you use the position and then modify it with the predecessors and successors. each of the modifiers can be a list of functions that should be called, either before the function is run (predecessors) or after the function has run (successors).
-
-In the mod_mmap_static case I didn't care about the post_config stage, but the mmap_static_xlat MUST be called after the core module had done it's name translation, hence the use of the aszPre to define a modifier to the position HOOK_LAST.
-
-There are now a lot fewer stages to worry about when creating your module definition. The old defintion looked like
-
-The new structure is a great deal simpler...
-
-Some of these read directly across, some don't. I'll try to summarise what should be done below.
-
-The stages that read directly across :
-
-The remainder of the old functions should be registered as hooks. There are the following hook stages defined so far...
- On modern Unix derivatives there exists a nifty mechanism usually called
-dynamic linking/loading of Dynamic Shared Objects (DSO) which
-provides a way to build a piece of program code in a special format for
-loading it at run-time into the address space of an executable program.
-
- This loading can usually be done in two ways: Automatically by a system
-program called In the first way the DSO's are usually called shared libraries or
-DSO libraries and named Symbols in the executable program are usually not referenced by the DSO
-(because it's a reusable library of general code) and hence no further
-resolving has to be done. The executable program has no need to do anything on
-its own to use the symbols from the DSO because the complete resolving is done
-by the Unix loader. (In fact, the code to invoke In the second way the DSO's are usually called shared objects or
-DSO files and can be named with an arbitrary extension (although the
-canonical name is Finally, to take advantage of the DSO's API the executable program has to
-resolve particular symbols from the DSO via Although this DSO mechanism sounds straightforward there is at least one
-difficult step here: The resolving of symbols from the executable program for
-the DSO when using a DSO to extend a program (the second way). Why? Because
-"reverse resolving" DSO symbols from the executable program's symbol set is
-against the library design (where the library has no knowledge about the
-programs it is used by) and is neither available under all platforms nor
-standardized. In practice the executable program's global symbols are often
-not re-exported and thus not available for use in a DSO. Finding a way to
-force the linker to export all global symbols is the main problem one has to
-solve when using DSO for extending a program at run-time.
-
- The shared library approach is the typical one, because it is what the DSO
-mechanism was designed for, hence it is used for nearly all types of libraries
-the operating system provides. On the other hand using shared objects for
-extending a program is not used by a lot of programs.
-
- As of 1998 there are only a few software packages available which use the
-DSO mechanism to actually extend their functionality at run-time: Perl 5 (via
-its XS mechanism and the DynaLoader module), Netscape Server, etc. Starting
-with version 1.3, Apache joined the crew, because Apache already uses a module
-concept to extend its functionality and internally uses a dispatch-list-based
-approach to link external modules into the Apache core functionality. So,
-Apache is really predestined for using DSO to load its modules at run-time.
-
- As of Apache 1.3, the configuration system supports two optional features
-for taking advantage of the modular DSO approach: compilation of the Apache
-core program into a DSO library for shared usage and compilation of the
-Apache modules into DSO files for explicit loading at run-time.
-
- The DSO support for loading individual Apache modules is based on a module
-named To simplify this creation of DSO files for Apache modules (especially for
-third-party modules) a new support program named To place the complete Apache core program into a DSO library (only required
-on some of the supported platforms to force the linker to export the apache
-core symbols -- a prerequisite for the DSO modularization) the rule
- Apache's
-
- To give you an overview of the DSO features of Apache 1.3, here is a short
-and concise summary:
-
-
-
-
-
-
- The above DSO based features of Apache 1.3 have the following advantages:
-
-
-
- DSO has the following disadvantages:
-
-
-
-
-
- A "handler" is an internal Apache representation of the action to be
-performed when a file is called. Generally, files have implicit
-handlers, based on the file type. Normally, all files are simply
-served by the server, but certain file types are "handled"
-separately. Apache 1.1 adds the ability to use handlers explicitly. Based on
-either filename extensions or on location, handlers can be specified
-without relation to file type. This is advantageous both because it is
-a more elegant solution, and because it also allows for both a type
-and a handler to be associated with a file. (See also
-Files with Multiple
-Extensions.) Handlers can either be built into the server or included in a module,
-or they can be added with the Action directive. The built-in
-handlers in the standard distribution are as follows: The following directives will cause requests for files with the
- Then the CGI script is responsible for sending the originally
-requested document (pointed to by the The following directives will enable the In order to implement the handler features, an addition has been
-made to the Apache API that you may wish to
-make use of. Specifically, a new record has been added to the
- If you wish to have your module engage a handler, you need only to
-set
-
-
-
-
-UnixWare users will want to consult build notes
-for various UnixWare versions before compiling.
-
-
-
-If you downloaded a binary distribution, skip to Installing Apache. Otherwise read the next section
-for how to compile the server.
-
-
-
-All configuration of Apache is performed in the
-
- You should also read the instructions in the
-
- Run the
-
- This generates a Makefile for use in stage 3. It also creates a
- Makefile in the support directory, for compilation of the optional
- support programs.
-
-
- (If you want to maintain multiple configurations, you can give a
- option to
-
-
-
-The next step is to install the program and configure it. Apache is
-designed to be configured and run from the same set of directories
-where it is compiled. If you want to run it from somewhere else, make
-a directory and copy the
-
-The next step is to edit the configuration files for the server. This
-consists of setting up various directives in up to three
-central configuration files. By default, these files are located in
-the
-
-First edit
-
-In addition to these three files, the server behavior can be configured
-on a directory-by-directory basis by using
-
-Note that when the server starts it will create a number of
-child processes to handle the requests. If you started Apache
-as the root user, the parent process will continue to run as root
-while the children will change to the user as given in the httpd.conf
-file.
-
-
-
-If when you run
-
-If the server is not running, read the error message displayed
-when you run httpd. You should also check the server
-error_log for additional information (with the default configuration,
-this will be located in the file
-
-If you want your server to continue running after a system reboot, you
-should add a call to
-
-To stop Apache send the parent process a TERM signal. The PID of this
-process is written to the file
-
-For more information about Apache command line options, configuration
-and log files, see Starting Apache. For a
-reference guide to all Apache directives supported by the distributed
-modules, see the Apache directives.
-
-
-
-On Windows, Apache is normally run as a service on Windows NT, or as a
-console application on Windows 95. See also running Apache for Windows.
-
-
- Each Apache configuration directive is described using a common format
- that looks like this:
-
- Each of the directive's attributes, complete with possible values
- where possible, are described in this document.
-
- This indicates the format of the directive as it would appear in a
- configuration file. This syntax is extremely directive-specific, so
- refer to the text of the directive's description for details.
-
- If the directive has a default value (i.e., if you omit it
- from your configuration entirely, the Apache Web server will behave as
- though you set it to a particular value), it is described here. If
- there is no default value, this section should say
- "None".
-
- This indicates where in the server's configuration files the directive
- is legal. It's a comma-separated list of one or more of the following
- values:
-
-
-
-
-
- The directive is only allowed within the designated context;
- if you try to use it elsewhere, you'll get a configuration error that
- will either prevent the server from handling requests in that context
- correctly, or will keep the server from operating at all --
- i.e., the server won't even start.
-
- The valid locations for the directive are actually the result of a
- Boolean OR of all of the listed contexts. In other words, a directive
- that is marked as being valid in "server config,
- .htaccess" can be used in the httpd.conf file
- and in .htaccess files, but not within any
- <Directory> or <VirtualHost> containers.
-
- This directive attribute indicates which configuration override must
- be active in order for the directive to be processed when it appears
- in a .htaccess file. If the directive's
- context
- doesn't permit it to appear in .htaccess files, this
- attribute should say "Not applicable".
-
- Overrides are activated by the
- AllowOverride
- directive, and apply to a particular scope (such as a directory) and
- all descendants, unless further modified by other
- AllowOverride directives at lower levels. The
- documentation for that directive also lists the possible override
- names available.
-
- This indicates how tightly bound into the Apache Web server the
- directive is; in other words, you may need to recompile the server
- with an enhanced set of modules in order to gain access to the
- directive and its functionality. Possible values for this attribute
- are:
-
-
-
-
-
- This quite simply lists the name of the source module which defines
- the directive.
-
- If the directive wasn't part of the original Apache version 1
- distribution, the version in which it was introduced should be listed
- here. If the directive has the same name as one from the NCSA HTTPd
- server, any inconsistencies in behaviour between the two should also
- be mentioned. Otherwise, this attribute should say "No
- compatibility issues."
-
- Each Apache module is described using a common format that looks
- like this:
-
- Each of the attributes, complete with values where possible, are
- described in this document.
-
- This indicates how tightly bound into the Apache Web server the
- module is; in other words, you may need to recompile the server in
- order to gain access to the module and its functionality. Possible
- values for this attribute are:
-
-
-
-
-
-
- This quite simply lists the name of the source file which contains
- the code for the module. This is also the name used by the
- This is a string which identifies the module for use in the LoadModule directive when
- dynamically loading modules. In particular, it is the name
- of the external variable of type module in the source file.
-
- If the module was not part of the original Apache version 2
- distribution, the version in which it was introduced should be listed
- here.
- Dated 15th January 2000 Apache 2.0 has a new architecture that moves the processing of requests from the code server into a MultiProcessing Module (MPM). By selecting the MPM to use you can alter the way the server behaves. Additionally the introduction of the MPM's has led to platforms developing their own optimised modules. On some platforms there is no choice, whilst on others there are different options, each with differing processing models. This list aims to help you select a suitable MPM for your system. Enhancements: Core | Module
-
- This document explains how to install, configure and run
- Apache 1.3 under Novell NetWare 5. Please note that at
- this time, NetWare support is entirely experimental, and is
- recommended only for experienced users. The Apache Group does not
- guarantee that this software will work as documented, or even at
- all. If you find any bugs, or wish to contribute in other ways, please
- use our bug reporting
- page. Warning: Apache on NetWare has not yet been optimized for performance.
-Apache still performs best, and is most reliable on Unix platforms. Over
-time we will improve NetWare performance. Folks doing comparative reviews
-of webserver performance are asked to compare against Apache
-on a Unix platform such as Solaris, FreeBSD, or Linux.
-
-Most of this document assumes that you are installing Apache from a
-binary distribution. If you want to compile Apache yourself (possibly
-to help with development, or to track down bugs), see the section on
-Compiling Apache for NetWare below.
-
-
-
-If running on NetWare 5.0 you must install Service Pack 4.
-
-
-
-
-Service pack 4 is available here.
-
- Information on the latest version of Apache can be found on the
-Apache web server at http://www.apache.org/. This will
-list the current release, any more recent alpha or beta-test releases,
-together with details of mirror web and anonymous ftp sites.
-
-Follow these steps to install Apache on NetWare (assuming you will install to sys:/apache):
-
- Apache may be installed to other volumes besides the default
-
-This will load Apache into an address space called apache. Running multiple instances
-of Apache concurrently on NetWare is possible by loading each instance into its own
-protected address space.
-
-
-After starting Apache it will be listening to port 80 (unless you
-changed the Port, Listen or
-BindAddress directives in the configuration files).
-To connect to the server and access the default page, launch a browser
-and enter the server's name or address.
-
-This should respond with a welcome page, and a link to the Apache
-manual. If nothing happens or you get an error, look in the
-error_log file in the logs directory.
-
-
-
-Once your basic installation is working, you should configure it
-properly by editing the files in the conf directory.
-
-
-To unload Apache running in the OS address space just type the
-following at the console:
-
-When working with Apache it is important to know how it will find the
-configuration files. You can specify a configuration file on the command line
-in two ways:
-
-
-
-If you don't specify a configuration file name with -f, Apache will
-use the file name compiled into the server, usually "conf/httpd.conf". Invoking
-Apache with the -V switch will display this value labeled as SERVER_CONFIG_FILE.
-Apache will then determine its ServerRoot by trying the following, in this order:
-
-
-The server root compiled into the server is usually "sys:/apache".
-invoking apache with the -V switch will display this value
-labeled as HTTPD_ROOT.
-
-
-
-The main differences in Apache for NetWare are:
-
- Because Apache for NetWare is multithreaded, it does not use a
- separate process for each request, as Apache does with
- Unix. Instead there are only threads running: a parent thread, and
- a child which handles the requests. Within the child each request is
- handled by a separate thread.
-
-
- So the "process"-management directives are different:
- MaxRequestsPerChild
- - Like the Unix directive, this controls how many requests a
- process will serve before exiting. However, unlike Unix, a
- process serves all the requests at once, not just one, so if
- this is set, it is recommended that a very high number is
- used. The recommended default, ThreadsPerChild -
- This directive is new, and tells the server how many threads it
- should use. This is the maximum number of connections the server
- can handle at once; be sure and set this number high enough for
- your site if you get a lot of hits. The recommended default is
-
- The directives that accept filenames as arguments now must use
- NetWare filenames instead of Unix ones. However, because Apache
- uses Unix-style names internally, you must use forward slashes, not
- backslashes. Volumes can be used; if omitted, the drive with the
- Apache executable will be assumed. Apache for NetWare contains the ability to load modules at runtime,
- without recompiling the server. If Apache is compiled normally, it
- will install a number of optional modules in the
- Information on creating loadable
- modules is also available. Compiling Apache requires MetroWerks CodeWarrior 5 to be properly
- installed.
-
- First, unpack the Apache distribution into an appropriate
- directory. Then go to the All major pieces of Apache may be built using the ApacheNW.mcp project
- file. This includes modules such as status, info, and proxy. In addition,
- the following project files have been provided as well:
-Setting which addresses and ports Apache uses
-
-
-
-When Apache starts, it connects to some port and address on the
-local machine and waits for incoming requests. By default, it
-listens to all addresses on the machine, and to the port
-as specified by the Port directive in the server configuration.
-However, it can be told to listen to more the one port, or to listen
-to only selected addresses, or a combination. This is often combined
-with the Virtual Host feature which determines how Apache
-responds to different IP addresses, hostnames and ports.
-
-
-BindAddress
-Syntax: BindAddress [ * | IP-address
- | hostname ]
-Default: BindAddress *
-Context: server config
-Status: CoreListen
-Syntax: Listen [ port | IP-address:port ]
-Default: none
-Context: server config
-Status: Core
- Listen 80
- Listen 8000
-
-
-To make the server accept connections on two specified
-interfaces and port numbers, use
-
- Listen 192.170.2.1:80
- Listen 192.170.2.5:8000
-
-
-How this works with Virtual Hosts
-
-BindAddress and Listen do not implement Virtual Hosts. They tell the
-main server what addresses and ports to listen to. If no
-<VirtualHost> directives are used, the server will behave the
-same for all accepted requests. However, <VirtualHost> can be
-used to specify a different behavior for one or more of the addresses
-and ports. To implement a VirtualHost, the server must first be told
-to listen to the address and port to be used. Then a
-<VirtualHost> section should be created for a specified address
-and port to set the behavior of this virtual host. Note that if the
-<VirtualHost> is set for an address and port that the server is
-not listening to, it cannot be accessed.
-
-See also
-
-See also the documentation on
-Virtual Hosts,
-BindAddress directive,
-Port directive,
-DNS Issues
-and
-<VirtualHost> section.
-
-
-
-
-
diff --git a/docs/manual/cgi_path.html.en b/docs/manual/cgi_path.html.en
deleted file mode 100644
index 2b7bd963b15..00000000000
--- a/docs/manual/cgi_path.html.en
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-PATH_INFO Changes in the CGI Environment
-
-
-
-Overview
-
-The Problem
-
-
- Alias /cgi-ralph /usr/local/httpd/cgi-bin/user.cgi/ralph
-
-user.cgi is the CGI script, the "/ralph"
-is information to be passed onto the CGI. If this configuration was in
-place, and a request came for "/cgi-ralph/script/", the
-code would set PATH_INFO to "/ralph/script", and
-SCRIPT_NAME to "/cgi-". Obviously, the latter is
-incorrect. In certain cases, this could even cause the server to
-crash.The Solution
-
-/script", and
-SCRIPT_NAME to "/cgi-ralph". This makes sense and results
-in no server behavior problems. It also permits the script to be
-guaranteed that
-"http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME$PATH_INFO"
-will always be an accessible URL that points to the current script,
-something which was not necessarily true with previous versions of
-Apache.
-
-/ralph"
-information from the Alias directive is lost. This is
-unfortunate, but we feel that using the filesystem to pass along this
-sort of information is not a recommended method, and a script making
-use of it "deserves" not to work. Apache 1.2b3 and later, however, do
-provide a workaround.
-
-Compatibility with Previous Servers
-
-
- $path_info = $ENV{'FILEPATH_INFO'} || $ENV{'PATH_INFO'};
-
-
-Configuration Files
-
-
-
-
-
-
-Main Configuration Files
-
-
-
-
-Related Modules
-
-
-mod_mime
-
-Related Directives
-AccessConfig
-<IfDefine>
-Include
-ResourceConfig
-TypesConfig
-httpd.conf. The
-location of this file is set at compile-time, but may be overridden
-with the -f command line flag. Some sites also have
-srm.conf and access.conf files for historical
-reasons. In addition, other configuration files may be added using
-the Include
-directive. Any directive may be placed in any of these configuration
-files. Changes to the main configuration files are only recognized by
-Apache when it is started or restarted.mime.types by default.
-
-
-
-Syntax of the Configuration Files
-
-apachectl configtest
-or the -t command line option.
-
-
-
-Modules
-
-
-
-
-Related Modules
-
-mod_so
-
-Related Directives
-AddModule
-ClearModuleList
-<IfModule>
-LoadModule
--l command line option.
-
-
-
-Scope of Directives
-
-
-
-
-Related Directives
-<Directory>
-<DirectoryMatch>
-<Files>
-<FilesMatch>
-<Location>
-<LocationMatch>
-<VirtualHost>
-<Directory>,
-<DirectoryMatch>,
-<Files>,
-<FilesMatch>,
-<Location>,
- and
-<LocationMatch>
-
-sections. These sections limit the application of the directives
-which they enclose to particular filesystem locations or URLs. They
-can also be nested, allowing for very fine grained configuration.
-
-<VirtualHost>
-sections, so that they will only apply to requests for a particular
-website.
-
-
-
-.htaccess Files
-
-
-
-
-Related Directives
-AccessFileName
-AllowOverride
-.htaccess, but any name can be specified
-in the AccessFileName directive. Directives placed in
-.htaccess files apply to the directory where you place
-the file, and all sub-directories. The .htaccess files
-follow the same syntax as the main configuration files. Since
-.htaccess files are read on every request, changes made
-in these files take immediate effect.
-
-.htaccess
-files, check the Context
-of the directive. The server administrator further controls what
-directives may be placed in .htaccess files by
-configuring the AllowOverride
-directive in the main configuration files.
-
-
-
-Log files
-
-security warning
-Anyone who can write to the directory where Apache is writing a
-log file can almost certainly gain access to the uid that the server is
-started as, which is normally root. Do NOT give people write
-access to the directory the logs are stored in without being aware of
-the consequences; see the security tips
-document for details.
-
-pid file
-
-logs/httpd.pid. This filename can be changed
-with the PidFile directive. The
-process-id is for use by the administrator in restarting and
-terminating the daemon: on Unix, a HUP or USR1 signal causes the
-daemon to re-read its configuration files and a TERM signal causes it
-to die gracefully; on Windows, use the -k command line option instead.
-For more information see the Stopping and
-Restarting page.
-
-Error log
-
-logs/error_log on Unix or logs/error.log on
-Windows and OS/2. The filename can be set using the ErrorLog directive; different error
-logs can be set for different virtual hosts.
-
-Transfer log
-
-logs/access_log on Unix or
-logs/access.log on Windows and OS/2. The filename can be
-set using a CustomLog
-directive; different transfer logs can be set for different virtual hosts.
-
-
-
-
-
diff --git a/docs/manual/content-negotiation.html.en b/docs/manual/content-negotiation.html.en
deleted file mode 100644
index 7bfaee5afa9..00000000000
--- a/docs/manual/content-negotiation.html.en
+++ /dev/null
@@ -1,588 +0,0 @@
-
-
-Content Negotiation
-
-
-
-About Content Negotiation
-
-
- Accept-Language: fr
-
-
-
- Accept-Language: fr; q=1.0, en; q=0.5
- Accept: text/html; q=1.0, text/*; q=0.8, image/gif; q=0.6,
- image/jpeg; q=0.6, image/*; q=0.5, */*; q=0.1
-
-
-Apache 1.2 supports 'server driven' content negotiation, as defined in
-the HTTP/1.1 specification. It fully supports the Accept,
-Accept-Language, Accept-Charset and Accept-Encoding request headers.
-Apache 1.3.4 also supports 'transparent' content negotiation, which is
-an experimental negotiation protocol defined in RFC 2295 and RFC 2296.
-It does not offer support for 'feature negotiation' as defined in
-these RFCs.
-Negotiation in Apache
-
-
-
-
-*.var file) which
- names the files containing the variants explicitly, or
- Using a type-map file
-
-type-map (or, for backwards-compatibility with
-older Apache configurations, the mime type
-application/x-type-map). Note that to use this feature,
-you must have a handler set in the configuration that defines a
-file suffix as type-map; this is best done with a
-
-
- AddHandler type-map var
-
-
-in the server configuration file. See the comments in the sample config
-file for more details.
- URI: foo
-
- URI: foo.en.html
- Content-type: text/html
- Content-language: en
-
- URI: foo.fr.de.html
- Content-type: text/html;charset=iso-8859-2
- Content-language: fr, de
-
-
-If the variants have different source qualities, that may be indicated
-by the "qs" parameter to the media type, as in this picture (available
-as jpeg, gif, or ASCII-art):
-
-
- URI: foo
-
- URI: foo.jpeg
- Content-type: image/jpeg; qs=0.8
-
- URI: foo.gif
- Content-type: image/gif; qs=0.5
-
- URI: foo.txt
- Content-type: text/plain; qs=0.01
-
-
-
-
-URI:
- Content-Type:
- image/gif, text/plain, or
- text/html; level=3.
- Content-Language:
- en for English,
- kr for Korean, etc.).
- Content-Encoding:
- x-compress
- for compress'd files, and x-gzip for gzip'd files.
- The x- prefix is ignored for encoding comparisons.
- Content-Length:
- Description:
- Multiviews
-
-MultiViews is a per-directory option, meaning it can be set with
-an Options directive within a <Directory>,
-<Location> or <Files>
-section in access.conf, or (if AllowOverride
-is properly set) in .htaccess files. Note that
-Options All does not set MultiViews; you
-have to ask for it by name.
-
-MultiViews is as follows: if the server
-receives a request for /some/dir/foo, if
-/some/dir has MultiViews enabled, and
-/some/dir/foo does not exist, then the server reads the
-directory looking for files named foo.*, and effectively fakes up a
-type map which names all those files, assigning them the same media
-types and content-encodings it would have if the client had asked for
-one of them by name. It then chooses the best match to the client's
-requirements.
-
-MultiViews may also apply to searches for the file named by the
-DirectoryIndex directive, if the server is trying to
-index a directory. If the configuration files specify
-
-
- DirectoryIndex index
-
-
-then the server will arbitrate between index.html
-and index.html3 if both are present. If neither are
-present, and index.cgi is there, the server will run it.
-
-The Negotiation Methods
-
-After Apache has obtained a list of the variants for a given resource,
-either from a type-map file or from the filenames in the directory, it
-invokes one of two methods to decide on the 'best' variant to
-return, if any. It is not necessary to know any of the details of how
-negotiation actually takes place in order to use Apache's content
-negotiation features. However the rest of this document explains the
-methods used for those interested.
-
-
-
Dimensions of Negotiation
-
-
-
-
-
- Dimension
- Notes
-
- Media Type
- Browser indicates preferences with the Accept header field. Each item
-can have an associated quality factor. Variant description can also
-have a quality factor (the "qs" parameter).
-
- Language
- Browser indicates preferences with the Accept-Language header field.
-Each item can have a quality factor. Variants can be associated with none, one
-or more than one language.
-
- Encoding
- Browser indicates preference with the Accept-Encoding header field.
-Each item can have a quality factor.
-
- Charset
- Browser indicates preference with the Accept-Charset header field.
-Each item can have a quality factor.
-Variants can indicate a charset as a parameter of the media type.
- Apache Negotiation Algorithm
-
-
-
-
-
-
-
-LanguagePriority
- directive (if present).
-
-text/* media type but not explicitly associated
- with a particular charset are assumed to be in ISO-8859-1.
-
-Fiddling with Quality Values
-
-Media Types and Wildcards
-
-
- Accept: image/*, */*
-
-
-would indicate that any type starting "image/" is acceptable,
-as is any other type (so the first "image/*" is redundant). Some
-browsers routinely send wildcards in addition to explicit types they
-can handle. For example:
-
- Accept: text/html, text/plain, image/gif, image/jpeg, */*
-
-
-The intention of this is to indicate that the explicitly
-listed types are preferred, but if a different representation is
-available, that is ok too. However under the basic algorithm, as given
-above, the */* wildcard has exactly equal preference to all the other
-types, so they are not being preferred. The browser should really have
-sent a request with a lower quality (preference) value for *.*, such
-as:
-
- Accept: text/html, text/plain, image/gif, image/jpeg, */*; q=0.01
-
-
-The explicit types have no quality factor, so they default to a
-preference of 1.0 (the highest). The wildcard */* is given
-a low preference of 0.01, so other types will only be returned if
-no variant matches an explicitly listed type.
-Variants with no Language
-
-
-
-
-Extensions to Transparent Content Negotiation
-
-Apache extends the transparent content negotiation protocol (RFC 2295)
-as follows. A new {encoding ..} element is used in
-variant lists to label variants which are available with a specific
-content-encoding only. The implementation of the
-RVSA/1.0 algorithm (RFC 2296) is extended to recognize encoded
-variants in the list, and to use them as candidate variants whenever
-their encodings are acceptable according to the Accept-Encoding
-request header. The RVSA/1.0 implementation does not round computed
-quality factors to 5 decimal places before choosing the best variant.
-
-Note on hyperlinks and naming conventions
-
-
-
-
-
-
-
-
-
-Filename
- Valid hyperlink
- Invalid hyperlink
-
-
-foo.html.en
- foo
-
- foo.html-
-
-
-foo.en.html
- foo
- foo.html
-
-
-foo.html.en.gz
- foo
-
- foo.htmlfoo.gz
-
- foo.html.gz
-
-foo.en.html.gz
- foo
- foo.html
-
- foo.html.gz
- foo.gz
-
-foo.gz.html.en
- foo
-
- foo.gz
- foo.gz.htmlfoo.html
-
-
-foo.html.gz.en
- foo
-
- foo.html
- foo.html.gzfoo.gz
-Note on Caching
-
-Custom error responses
-
-
-
-
-
-
-
-
-
-
-
-
-
-REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, image/jpeg
-REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX A.09.05 9000/712)
-REDIRECT_PATH=.:/bin:/usr/local/bin:/etc
-REDIRECT_QUERY_STRING=
-REDIRECT_REMOTE_ADDR=121.345.78.123
-REDIRECT_REMOTE_HOST=ooh.ahhh.com
-REDIRECT_SERVER_NAME=crash.bang.edu
-REDIRECT_SERVER_PORT=80
-REDIRECT_SERVER_SOFTWARE=Apache/0.8.15
-REDIRECT_URL=/cgi-bin/buggy.pl
- REDIRECT_ prefix.
-
- REDIRECT_URL and REDIRECT_QUERY_STRING
- will
- be passed to the new URL (assuming it's a cgi-script or a cgi-include).
- The
- other variables will exist only if they existed prior to the
- error/problem.
- None of these will be set if your ErrorDocument is an
- external redirect (i.e., anything starting with a
- scheme name
- like http:, even if it refers to the same host as the
- server).
-
-
-ErrorDocument 500 /cgi-bin/crash-recover
-ErrorDocument 500 "Sorry, our script crashed. Oh dear
-ErrorDocument 500 http://xxx/
-ErrorDocument 404 /Lame_excuses/not_found.html
-ErrorDocument 401 /Subscription/how_to_subscribe.html
- ErrorDocument
-<3-digit-code> action
-
-
-
-Custom error responses and redirects
-
-
-
-
-REDIRECT_. REDIRECT_ environment
-variables are created from the CGI environment variables which existed
-prior to the redirect, they are renamed with a REDIRECT_
-prefix, i.e., HTTP_USER_AGENT becomes
-REDIRECT_HTTP_USER_AGENT. In addition to these new
-variables, Apache will define REDIRECT_URL and
-REDIRECT_STATUS to help the script trace its origin.
-Both the original URL and the URL being redirected to can be logged in
-the access log.
-
-
- :
- print "Content-type: text/html\n";
- printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
- :
-
-Apache API notes
-
-These are some notes on the Apache API and the data structures you
-have to deal with, etc. They are not yet nearly complete, but
-hopefully, they will help you get your bearings. Keep in mind that
-the API is still subject to change as we gain experience with it.
-(See the TODO file for what might be coming). However,
-it will be easy to adapt modules to any changes that are made.
-(We have more modules to adapt than you do).
-
-
-
-Basic concepts.
-
-We begin with an overview of the basic concepts behind the
-API, and how they are manifested in the code.
-
-Handlers, Modules, and Requests
-
-Apache breaks down request handling into a series of steps, more or
-less the same way the Netscape server API does (although this API has
-a few more stages than NetSite does, as hooks for stuff I thought
-might be useful in the future). These are:
-
-
-
-
-These phases are handled by looking at each of a succession of
-modules, looking to see if each of them has a handler for the
-phase, and attempting invoking it if so. The handler can typically do
-one of three things:
-
-SetEnv, which don't really fit well elsewhere.
-
-
-
-Most phases are terminated by the first module that handles them;
-however, for logging, `fixups', and non-access authentication
-checking, all handlers always run (barring an error). Also, the
-response phase is unique in that modules may declare multiple handlers
-for it, via a dispatch table keyed on the MIME type of the requested
-object. Modules may declare a response-phase handler which can handle
-any request, by giving it the key OK.
- DECLINED. In this case, the
- server behaves in all respects as if the handler simply hadn't
- been there.
- */* (i.e., a
-wildcard MIME type specification). However, wildcard handlers are
-only invoked if the server has already tried and failed to find a more
-specific response handler for the MIME type of the requested object
-(either none existed, or they all declined).request_rec structure. vide infra), which returns an
-integer, as above.A brief tour of a module
-
-At this point, we need to explain the structure of a module. Our
-candidate will be one of the messier ones, the CGI module --- this
-handles both CGI scripts and the ScriptAlias config file
-command. It's actually a great deal more complicated than most
-modules, but if we're going to have only one example, it might as well
-be the one with its fingers in every place.ScriptAlias, it also has handlers for the name
-translation phase (to recognize ScriptAliased URIs), the
-type-checking phase (any ScriptAliased request is typed
-as a CGI script).ScriptAliases in effect;
-the module structure therefore contains pointers to a functions which
-builds these structures, and to another which combines two of them (in
-case the main server and a virtual server both have
-ScriptAliases declared).ScriptAlias command itself. This particular module only
-declares one command, but there could be more, so modules have
-command tables which declare their commands, and describe
-where they are permitted, and how they are to be invoked. pool is a pointer to a resource pool
-structure; these are used by the server to keep track of the memory
-which has been allocated, files opened, etc., either to service a
-particular request, or to handle the process of configuring itself.
-That way, when the request is over (or, for the configuration pool,
-when the server is restarting), the memory can be freed, and the files
-closed, en masse, without anyone having to write explicit code to
-track them all down and dispose of them. Also, a
-cmd_parms structure contains various information about
-the config file being read, and other status information, which is
-sometimes of use to the function which processes a config-file command
-(such as ScriptAlias).
-
-With no further ado, the module itself:
-
-
-/* Declarations of handlers. */
-
-int translate_scriptalias (request_rec *);
-int type_scriptalias (request_rec *);
-int cgi_handler (request_rec *);
-
-/* Subsidiary dispatch table for response-phase handlers, by MIME type */
-
-handler_rec cgi_handlers[] = {
-{ "application/x-httpd-cgi", cgi_handler },
-{ NULL }
-};
-
-/* Declarations of routines to manipulate the module's configuration
- * info. Note that these are returned, and passed in, as void *'s;
- * the server core keeps track of them, but it doesn't, and can't,
- * know their internal structure.
- */
-
-void *make_cgi_server_config (pool *);
-void *merge_cgi_server_config (pool *, void *, void *);
-
-/* Declarations of routines to handle config-file commands */
-
-extern char *script_alias(cmd_parms *, void *per_dir_config, char *fake,
- char *real);
-
-command_rec cgi_cmds[] = {
-{ "ScriptAlias", script_alias, NULL, RSRC_CONF, TAKE2,
- "a fakename and a realname"},
-{ NULL }
-};
-
-module cgi_module = {
- STANDARD_MODULE_STUFF,
- NULL, /* initializer */
- NULL, /* dir config creator */
- NULL, /* dir merger --- default is to override */
- make_cgi_server_config, /* server config */
- merge_cgi_server_config, /* merge server config */
- cgi_cmds, /* command table */
- cgi_handlers, /* handlers */
- translate_scriptalias, /* filename translation */
- NULL, /* check_user_id */
- NULL, /* check auth */
- NULL, /* check access */
- type_scriptalias, /* type_checker */
- NULL, /* fixups */
- NULL, /* logger */
- NULL /* header parser */
-};
-
-
-How handlers work
-
-The sole argument to handlers is a request_rec structure.
-This structure describes a particular request which has been made to
-the server, on behalf of a client. In most cases, each connection to
-the client generates only one request_rec structure.A brief tour of the
-
-The request_recrequest_rec contains pointers to a resource pool
-which will be cleared when the server is finished handling the
-request; to structures containing per-server and per-connection
-information, and most importantly, information on the request itself.ap_table_get and ap_table_set routines.
- Note that the Content-type header value cannot be
- set by module content-handlers using the ap_table_*()
- routines. Rather, it is set by pointing the content_type
- field in the request_rec structure to an appropriate
- string. E.g.,
-
-Finally, there are pointers to two data structures which, in turn,
-point to per-module configuration structures. Specifically, these
-hold pointers to the data structures which the module has built to
-describe the way it has been configured to operate in a given
-directory (via
- r->content_type = "text/html";
-
-.htaccess files or
-<Directory> sections), for private data it has
-built in the course of servicing the request (so modules' handlers for
-one phase can pass `notes' to their handlers for other phases). There
-is another such configuration vector in the server_rec
-data structure pointed to by the request_rec, which
-contains per (virtual) server configuration data.
-struct request_rec {
-
- pool *pool;
- conn_rec *connection;
- server_rec *server;
-
- /* What object is being requested */
-
- char *uri;
- char *filename;
- char *path_info;
- char *args; /* QUERY_ARGS, if any */
- struct stat finfo; /* Set by server core;
- * st_mode set to zero if no such file */
-
- char *content_type;
- char *content_encoding;
-
- /* MIME header environments, in and out. Also, an array containing
- * environment variables to be passed to subprocesses, so people can
- * write modules to add to that environment.
- *
- * The difference between headers_out and err_headers_out is that
- * the latter are printed even on error, and persist across internal
- * redirects (so the headers printed for ErrorDocument handlers will
- * have them).
- */
-
- table *headers_in;
- table *headers_out;
- table *err_headers_out;
- table *subprocess_env;
-
- /* Info about the request itself... */
-
- int header_only; /* HEAD request, as opposed to GET */
- char *protocol; /* Protocol, as given to us, or HTTP/0.9 */
- char *method; /* GET, HEAD, POST, etc. */
- int method_number; /* M_GET, M_POST, etc. */
-
- /* Info for logging */
-
- char *the_request;
- int bytes_sent;
-
- /* A flag which modules can set, to indicate that the data being
- * returned is volatile, and clients should be told not to cache it.
- */
-
- int no_cache;
-
- /* Various other config info which may change with .htaccess files
- * These are config vectors, with one void* pointer for each module
- * (the thing pointed to being the module's business).
- */
-
- void *per_dir_config; /* Options set in config files, etc. */
- void *request_config; /* Notes on *this* request */
-
-};
-
-
-
-Where request_rec structures come from
-
-Most request_rec structures are built by reading an HTTP
-request from a client, and filling in the fields. However, there are
-a few exceptions:
-
-
-
-
-*.var file), or a CGI script which returned a
- local `Location:', then the resource which the user requested
- is going to be ultimately located by some URI other than what
- the client originally supplied. In this case, the server does
- an internal redirect, constructing a new
- request_rec for the new URI, and processing it
- almost exactly as if the client had requested the new URI
- directly. ErrorDocument is in scope, the same internal
- redirect machinery comes into play.ap_sub_req_lookup_file,
- ap_sub_req_lookup_uri, and
- ap_sub_req_method_uri; these construct a new
- request_rec structure and processes it as you
- would expect, up to but not including the point of actually
- sending a response. (These functions skip over the access
- checks if the sub-request is for a file in the same directory
- as the original request).ap_run_sub_req).
-Handling requests, declining, and returning error
- codes
-
-As discussed above, each handler, when invoked to handle a particular
-request_rec, has to return an int to
-indicate what happened. That can either be
-
-
-
-
-Note that if the error code returned is REDIRECT, then
-the module should put a Location in the request's
-headers_out, to indicate where the client should be
-redirected to. Special considerations for response
- handlers
-
-Handlers for most phases do their work by simply setting a few fields
-in the request_rec structure (or, in the case of access
-checkers, simply by returning the correct error code). However,
-response handlers have to actually send a request back to the client. ap_send_http_header. (You don't have to do
-anything special to skip sending the header for HTTP/0.9 requests; the
-function figures out on its own that it shouldn't do anything). If
-the request is marked header_only, that's all they should
-do; they should return after that, without attempting any further
-output. ap_rputc
-and ap_rprintf, for internally generated output, and
-ap_send_fd, to copy the contents of some FILE *
-straight to the client. GET requests
-which have no more specific handler; it also shows how conditional
-GETs can be handled, if it's desirable to do so in a
-particular response handler --- ap_set_last_modified checks
-against the If-modified-since value supplied by the
-client, if any, and returns an appropriate code (which will, if
-nonzero, be USE_LOCAL_COPY). No similar considerations apply for
-ap_set_content_length, but it returns an error code for
-symmetry.
-int default_handler (request_rec *r)
-{
- int errstatus;
- FILE *f;
-
- if (r->method_number != M_GET) return DECLINED;
- if (r->finfo.st_mode == 0) return NOT_FOUND;
-
- if ((errstatus = ap_set_content_length (r, r->finfo.st_size))
- || (errstatus = ap_set_last_modified (r, r->finfo.st_mtime)))
- return errstatus;
-
- f = fopen (r->filename, "r");
-
- if (f == NULL) {
- log_reason("file permissions deny server access",
- r->filename, r);
- return FORBIDDEN;
- }
-
- register_timeout ("send", r);
- ap_send_http_header (r);
-
- if (!r->header_only) send_fd (f, r);
- ap_pfclose (r->pool, f);
- return OK;
-}
-
-
-Finally, if all of this is too much of a challenge, there are a few
-ways out of it. First off, as shown above, a response handler which
-has not yet produced any output can simply return an error code, in
-which case the server will automatically produce an error response.
-Secondly, it can punt to some other handler by invoking
-ap_internal_redirect, which is how the internal redirection
-machinery discussed above is invoked. A response handler which has
-internally redirected should always return OK. ap_internal_redirect from handlers which are
-not response handlers will lead to serious confusion).
-
-Special considerations for authentication
- handlers
-
-Stuff that should be discussed here in detail:
-
-
-
-
-ap_auth_type,
- ap_auth_name, and ap_requires.
- ap_get_basic_auth_pw,
- which sets the connection->user structure field
- automatically, and ap_note_basic_auth_failure, which
- arranges for the proper WWW-Authenticate: header
- to be sent back).
-Special considerations for logging handlers
-
-When a request has internally redirected, there is the question of
-what to log. Apache handles this by bundling the entire chain of
-redirects into a list of request_rec structures which are
-threaded through the r->prev and r->next
-pointers. The request_rec which is passed to the logging
-handlers in such cases is the one which was originally built for the
-initial request from the client; note that the bytes_sent field will
-only be correct in the last request in the chain (the one for which a
-response was actually sent).
-
-Resource allocation and resource pools
-ap_pfopen, which also
-arranges for the underlying file descriptor to be closed before any
-child processes, such as for CGI scripts, are execed), or
-in case you are using the timeout machinery (which isn't yet even
-documented here). However, there are two benefits to using it:
-resources allocated to a pool never leak (even if you allocate a
-scratch string, and just forget about it); also, for memory
-allocation, ap_palloc is generally faster than
-malloc.
-Allocation of memory in pools
-ap_palloc, which takes two arguments, one being a pointer to
-a resource pool structure, and the other being the amount of memory to
-allocate (in chars). Within handlers for handling
-requests, the most common way of getting a resource pool structure is
-by looking at the pool slot of the relevant
-request_rec; hence the repeated appearance of the
-following idiom in module code:
-
-int my_handler(request_rec *r)
-{
- struct my_structure *foo;
- ...
-
- foo = (foo *)ap_palloc (r->pool, sizeof(my_structure));
-}
-
-ap_pfree ---
-ap_palloced memory is freed only when the associated
-resource pool is cleared. This means that ap_palloc does not
-have to do as much accounting as malloc(); all it does in
-the typical case is to round up the size, bump a pointer, and do a
-range check.
-ap_palloc
-could cause a server process to grow excessively large. There are
-two ways to deal with this, which are dealt with below; briefly, you
-can use malloc, and try to be sure that all of the memory
-gets explicitly freed, or you can allocate a sub-pool of
-the main pool, allocate your memory in the sub-pool, and clear it out
-periodically. The latter technique is discussed in the section on
-sub-pools below, and is used in the directory-indexing code, in order
-to avoid excessive storage allocation when listing directories with
-thousands of files).
-Allocating initialized memory
-ap_pcalloc has the same
-interface as ap_palloc, but clears out the memory it
-allocates before it returns it. The function ap_pstrdup
-takes a resource pool and a char * as arguments, and
-allocates memory for a copy of the string the pointer points to,
-returning a pointer to the copy. Finally ap_pstrcat is a
-varargs-style function, which takes a pointer to a resource pool, and
-at least two char * arguments, the last of which must be
-NULL. It allocates enough memory to fit copies of each
-of the strings, as a unit; for instance:
-
- ap_pstrcat (r->pool, "foo", "/", "bar", NULL);
-
-"foo/bar".
-Commonly-used pools in the Apache Web server
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Tracking open files, etc.
-ap_pfopen, which
-takes a resource pool and two strings as arguments; the strings are
-the same as the typical arguments to fopen, e.g.,
-
- ...
- FILE *f = ap_pfopen (r->pool, r->filename, "r");
-
- if (f == NULL) { ... } else { ... }
-
-ap_popenf routine, which parallels the
-lower-level open system call. Both of these routines
-arrange for the file to be closed when the resource pool in question
-is cleared.
-ap_pfopen, and ap_popenf,
-namely ap_pfclose and ap_pclosef. (This is
-because, on many systems, the number of files which a single process
-can have open is quite limited). It is important to use these
-functions to close files allocated with ap_pfopen and
-ap_popenf, since to do otherwise could cause fatal errors on
-systems such as Linux, which react badly if the same
-FILE* is closed more than once.
-close functions is not mandatory, since the
-file will eventually be closed regardless, but you should consider it
-in cases where your module is opening, or could open, a lot of files).
-Other sorts of resources --- cleanup functions
-
-More text goes here. Describe the the cleanup primitives in terms of
-which the file stuff is implemented; also,
-spawn_process.
-Fine control --- creating and dealing with sub-pools, with a note
-on sub-requests
-
-On rare occasions, too-free use of ap_palloc() and the
-associated primitives may result in undesirably profligate resource
-allocation. You can deal with such a case by creating a
-sub-pool, allocating within the sub-pool rather than the main
-pool, and clearing or destroying the sub-pool, which releases the
-resources which were associated with it. (This really is a
-rare situation; the only case in which it comes up in the standard
-module set is in case of listing directories, and then only with
-very large directories. Unnecessary use of the primitives
-discussed here can hair up your code quite a bit, with very little
-gain). ap_make_sub_pool,
-which takes another pool (the parent pool) as an argument. When the
-main pool is cleared, the sub-pool will be destroyed. The sub-pool
-may also be cleared or destroyed at any time, by calling the functions
-ap_clear_pool and ap_destroy_pool, respectively.
-(The difference is that ap_clear_pool frees resources
-associated with the pool, while ap_destroy_pool also
-deallocates the pool itself. In the former case, you can allocate new
-resources within the pool, and clear it again, and so forth; in the
-latter case, it is simply gone). ap_sub_req_... functions)
-is ap_destroy_sub_req, which frees the resource pool.
-Before calling this function, be sure to copy anything that you care
-about which might be allocated in the sub-request's resource pool into
-someplace a little less volatile (for instance, the filename in its
-request_rec structure). ap_destroy_... functions).
-
-Configuration, commands and the like
-
-One of the design goals for this server was to maintain external
-compatibility with the NCSA 1.3 server --- that is, to read the same
-configuration files, to process all the directives therein correctly,
-and in general to be a drop-in replacement for NCSA. On the other
-hand, another design goal was to move as much of the server's
-functionality into modules which have as little as possible to do with
-the monolithic server core. The only way to reconcile these goals is
-to move the handling of most commands from the central server into the
-modules. AddType and
-DefaultType directives, and so forth. In general, the
-governing philosophy is that anything which can be made
-configurable by directory should be; per-server information is
-generally used in the standard set of modules for information like
-Aliases and Redirects which come into play
-before the request is tied to a particular place in the underlying
-file system. .htaccess files, though even in the NCSA server they can
-contain directives which have nothing at all to do with access
-control. Accordingly, after URI -> filename translation, but before
-performing any other phase, the server walks down the directory
-hierarchy of the underlying filesystem, following the translated
-pathname, to read any .htaccess files which might be
-present. The information which is read in then has to be
-merged with the applicable information from the server's own
-config files (either from the <Directory> sections
-in access.conf, or from defaults in
-srm.conf, which actually behaves for most purposes almost
-exactly like <Directory />)..htaccess files, we need to discard the storage allocated
-for handling them. That is solved the same way it is solved wherever
-else similar problems come up, by tying those structures to the
-per-transaction resource pool. Per-directory configuration structures
-
-Let's look out how all of this plays out in mod_mime.c,
-which defines the file typing handler which emulates the NCSA server's
-behavior of determining file types from suffixes. What we'll be
-looking at, here, is the code which implements the
-AddType and AddEncoding commands. These
-commands can appear in .htaccess files, so they must be
-handled in the module's private per-directory data, which in fact,
-consists of two separate tables for MIME types and
-encoding information, and is declared as follows:
-
-
-typedef struct {
- table *forced_types; /* Additional AddTyped stuff */
- table *encoding_types; /* Added with AddEncoding... */
-} mime_dir_config;
-
-
-When the server is reading a configuration file, or
-<Directory> section, which includes one of the MIME
-module's commands, it needs to create a mime_dir_config
-structure, so those commands have something to act on. It does this
-by invoking the function it finds in the module's `create per-dir
-config slot', with two arguments: the name of the directory to which
-this configuration information applies (or NULL for
-srm.conf), and a pointer to a resource pool in which the
-allocation should happen. .htaccess file, that resource pool
-is the per-request resource pool for the request; otherwise it is a
-resource pool which is used for configuration data, and cleared on
-restarts. Either way, it is important for the structure being created
-to vanish when the pool is cleared, by registering a cleanup on the
-pool if necessary). ap_pallocs the structure above, and a creates a couple of
-tables to fill it. That looks like this:
-
-
-void *create_mime_dir_config (pool *p, char *dummy)
-{
- mime_dir_config *new =
- (mime_dir_config *) ap_palloc (p, sizeof(mime_dir_config));
-
- new->forced_types = ap_make_table (p, 4);
- new->encoding_types = ap_make_table (p, 4);
-
- return new;
-}
-
-
-Now, suppose we've just read in a .htaccess file. We
-already have the per-directory configuration structure for the next
-directory up in the hierarchy. If the .htaccess file we
-just read in didn't have any AddType or
-AddEncoding commands, its per-directory config structure
-for the MIME module is still valid, and we can just use it.
-Otherwise, we need to merge the two structures somehow.
-void *merge_mime_dir_configs (pool *p, void *parent_dirv, void *subdirv)
-{
- mime_dir_config *parent_dir = (mime_dir_config *)parent_dirv;
- mime_dir_config *subdir = (mime_dir_config *)subdirv;
- mime_dir_config *new =
- (mime_dir_config *)ap_palloc (p, sizeof(mime_dir_config));
-
- new->forced_types = ap_overlay_tables (p, subdir->forced_types,
- parent_dir->forced_types);
- new->encoding_types = ap_overlay_tables (p, subdir->encoding_types,
- parent_dir->encoding_types);
-
- return new;
-}
-
-
-As a note --- if there is no per-directory merge function present, the
-server will just use the subdirectory's configuration info, and ignore
-the parent's. For some modules, that works just fine (e.g., for the
-includes module, whose per-directory configuration information
-consists solely of the state of the XBITHACK), and for
-those modules, you can just not declare one, and leave the
-corresponding structure slot in the module itself NULL.Command handling
-
-Now that we have these structures, we need to be able to figure out
-how to fill them. That involves processing the actual
-AddType and AddEncoding commands. To find
-commands, the server looks in the module's command table.
-That table contains information on how many arguments the commands
-take, and in what formats, where it is permitted, and so forth. That
-information is sufficient to allow the server to invoke most
-command-handling functions with pre-parsed arguments. Without further
-ado, let's look at the AddType command handler, which
-looks like this (the AddEncoding command looks basically
-the same, and won't be shown here):
-
-
-char *add_type(cmd_parms *cmd, mime_dir_config *m, char *ct, char *ext)
-{
- if (*ext == '.') ++ext;
- ap_table_set (m->forced_types, ext, ct);
- return NULL;
-}
-
-
-This command handler is unusually simple. As you can see, it takes
-four arguments, two of which are pre-parsed arguments, the third being
-the per-directory configuration structure for the module in question,
-and the fourth being a pointer to a cmd_parms structure.
-That structure contains a bunch of arguments which are frequently of
-use to some, but not all, commands, including a resource pool (from
-which memory can be allocated, and to which cleanups should be tied),
-and the (virtual) server being configured, from which the module's
-per-server configuration data can be obtained if required.NULL; this causes an error to be printed out on the
-server's stderr, followed by a quick exit, if it is in
-the main config files; for a .htaccess file, the syntax
-error is logged in the server error log (along with an indication of
-where it came from), and the request is bounced with a server error
-response (HTTP error status, code 500).
-command_rec mime_cmds[] = {
-{ "AddType", add_type, NULL, OR_FILEINFO, TAKE2,
- "a mime type followed by a file extension" },
-{ "AddEncoding", add_encoding, NULL, OR_FILEINFO, TAKE2,
- "an encoding (e.g., gzip), followed by a file extension" },
-{ NULL }
-};
-
-
-The entries in these tables are:
-
-
-
-
-Finally, having set this all up, we have to use it. This is
-ultimately done in the module's handlers, specifically for its
-file-typing handler, which looks more or less like this; note that the
-per-directory configuration structure is extracted from the
-(void *) pointer, which is passed in the
- cmd_parms structure to the command handler ---
- this is useful in case many similar commands are handled by the
- same function.
- AllowOverride
- option, and an additional mask bit, RSRC_CONF,
- indicating that the command may appear in the server's own
- config files, but not in any .htaccess
- file.
- TAKE2 indicates two pre-parsed arguments. Other
- options are TAKE1, which indicates one pre-parsed
- argument, FLAG, which indicates that the argument
- should be On or Off, and is passed in
- as a boolean flag, RAW_ARGS, which causes the
- server to give the command the raw, unparsed arguments
- (everything but the command name itself). There is also
- ITERATE, which means that the handler looks the
- same as TAKE1, but that if multiple arguments are
- present, it should be called multiple times, and finally
- ITERATE2, which indicates that the command handler
- looks like a TAKE2, but if more arguments are
- present, then it should be called multiple times, holding the
- first argument constant.
- NULL).
-request_rec's per-directory configuration vector by using
-the ap_get_module_config function.
-
-
-int find_ct(request_rec *r)
-{
- int i;
- char *fn = ap_pstrdup (r->pool, r->filename);
- mime_dir_config *conf = (mime_dir_config *)
- ap_get_module_config(r->per_dir_config, &mime_module);
- char *type;
-
- if (S_ISDIR(r->finfo.st_mode)) {
- r->content_type = DIR_MAGIC_TYPE;
- return OK;
- }
-
- if((i=ap_rind(fn,'.')) < 0) return DECLINED;
- ++i;
-
- if ((type = ap_table_get (conf->encoding_types, &fn[i])))
- {
- r->content_encoding = type;
-
- /* go back to previous extension to try to use it as a type */
-
- fn[i-1] = '\0';
- if((i=ap_rind(fn,'.')) < 0) return OK;
- ++i;
- }
-
- if ((type = ap_table_get (conf->forced_types, &fn[i])))
- {
- r->content_type = type;
- }
-
- return OK;
-}
-
-
-
-Side notes --- per-server configuration, virtual
- servers, etc.
-
-The basic ideas behind per-server module configuration are basically
-the same as those for per-directory configuration; there is a creation
-function and a merge function, the latter being invoked where a
-virtual server has partially overridden the base server configuration,
-and a combined structure must be computed. (As with per-directory
-configuration, the default if no merge function is specified, and a
-module is configured in some virtual server, is that the base
-configuration is simply ignored). cmd_parms data to get at it. Here's an example, from the
-alias module, which also indicates how a syntax error can be returned
-(note that the per-directory configuration argument to the command
-handler is declared as a dummy, since the module doesn't actually have
-per-directory config data):
-
-
-char *add_redirect(cmd_parms *cmd, void *dummy, char *f, char *url)
-{
- server_rec *s = cmd->server;
- alias_server_conf *conf = (alias_server_conf *)
- ap_get_module_config(s->module_config,&alias_module);
- alias_entry *new = ap_push_array (conf->redirects);
-
- if (!ap_is_url (url)) return "Redirect to non-URL";
-
- new->fake = f; new->real = url;
- return NULL;
-}
-
-
-
diff --git a/docs/manual/developer/modules.html.en b/docs/manual/developer/modules.html.en
deleted file mode 100644
index b066223466f..00000000000
--- a/docs/manual/developer/modules.html.en
+++ /dev/null
@@ -1,200 +0,0 @@
-
-
-
-From Apache 1.3 to Apache 2.0
-
-
Modules
-The easier changes...
-
-
-Cleanup Routines
-Initialisation Routines
-
-
-
-Data Types
-
-
-
-
-
-The messier changes...
-
-Register Hooks
-
-static void register_hooks(void)
-{
- static const char * const aszPre[]={ "http_core.c",NULL };
- ap_hook_post_config(mmap_post_config,NULL,NULL,HOOK_MIDDLE);
- ap_hook_translate_name(mmap_static_xlat,aszPre,NULL,HOOK_LAST);
-};
-
-
-
-Module Definition
-
-
-module MODULE_VAR_EXPORT [module_name]_module =
-{
- STANDARD_MODULE_STUFF,
- /* initializer */
- /* dir config creater */
- /* dir merger --- default is to override */
- /* server config */
- /* merge server config */
- /* command handlers */
- /* handlers */
- /* filename translation */
- /* check_user_id */
- /* check auth */
- /* check access */
- /* type_checker */
- /* fixups */
- /* logger */
- /* header parser */
- /* child_init */
- /* child_exit */
- /* post read-request */
-};
-
-
-module MODULE_VAR_EXPORT [module_name]_module =
-{
- STANDARD20_MODULE_STUFF,
- /* create per-directory config structures */
- /* merge per-directory config structures */
- /* create per-server config structures */
- /* merge per-server config structures */
- /* command handlers */
- /* handlers */
- /* register hooks */
- };
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/manual/handler.html.en b/docs/manual/handler.html.en
deleted file mode 100644
index 1dbad4256ea..00000000000
--- a/docs/manual/handler.html.en
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-Apache 1.3
-
-Originally written by
-Dynamic Shared Object (DSO)
-Support
-
-Ralf S. Engelschall <rse@apache.org>, April 1998
-
-Background
-
-ld.so when an executable program is started or
-manually from within the executing program via a programmatic system interface
-to the Unix loader through the system calls dlopen()/dlsym().
-
-libfoo.so or
-libfoo.so.1.2. They reside in a system directory (usually
-/usr/lib) and the link to the executable program is established
-at build-time by specifying -lfoo to the linker command. This
-hard-codes library references into the executable program file so that at
-start-time the Unix loader is able to locate libfoo.so in
-/usr/lib, in paths hard-coded via linker-options like
--R or in paths configured via the environment variable
-LD_LIBRARY_PATH. It then resolves any (yet unresolved) symbols in
-the executable program which are available in the DSO.
-
-ld.so is part of
-the run-time startup code which is linked into every executable program which
-has been bound non-static). The advantage of dynamic loading of common library
-code is obvious: the library code needs to be stored only once, in a system
-library like libc.so, saving disk space for every program.
-
-foo.so). These files usually stay inside a
-program-specific directory and there is no automatically established link to
-the executable program where they are used. Instead the executable program
-manually loads the DSO at run-time into its address space via
-dlopen(). At this time no resolving of symbols from the DSO for
-the executable program is done. But instead the Unix loader automatically
-resolves any (yet unresolved) symbols in the DSO from the set of symbols
-exported by the executable program and its already loaded DSO libraries
-(especially all symbols from the ubiquitous libc.so). This way
-the DSO gets knowledge of the executable program's symbol set as if it had
-been statically linked with it in the first place.
-
-dlsym() for later use
-inside dispatch tables etc. In other words: The executable program has to
-manually resolve every symbol it needs to be able to use it. The advantage of
-such a mechanism is that optional program parts need not be loaded (and thus
-do not spend memory) until they are needed by the program in question. When
-required, these program parts can be loaded dynamically to extend the base
-program's functionality.
-
-Practical Usage
-
-Implementation
-
-mod_so.c which has to be
-statically compiled into the Apache core. It is the only module besides
-http_core.c which cannot be put into a DSO itself
-(bootstrapping!). Practically all other distributed Apache modules then can
-then be placed into a DSO by individually enabling the DSO build for them via
-configure's --enable-shared option (see top-level
-INSTALL file) or by changing the AddModule command
-in your src/Configuration into a SharedModule
-command (see src/INSTALL file). After a module is compiled into
-a DSO named mod_foo.so you can use mod_so's LoadModule command in your
-httpd.conf file to load this module at server startup or restart.
-
-apxs (APache
-eXtenSion) is available. It can be used to build DSO based modules
-outside of the Apache source tree. The idea is simple: When
-installing Apache the configure's make install
-procedure installs the Apache C header files and puts the platform-dependent
-compiler and linker flags for building DSO files into the apxs
-program. This way the user can use apxs to compile his Apache
-module sources without the Apache distribution source tree and without having
-to fiddle with the platform-dependent compiler and linker flags for DSO
-support.
-
-SHARED_CORE has to be enabled via configure's
---enable-rule=SHARED_CORE option (see top-level
-INSTALL file) or by changing the Rule command in
-your Configuration file to Rule SHARED_CORE=yes (see
-src/INSTALL file). The Apache core code is then placed into a DSO
-library named libhttpd.so. Because one cannot link a DSO against
-static libraries on all platforms, an additional executable program named
-libhttpd.ep is created which both binds this static code and
-provides a stub for the main() function. Finally the
-httpd executable program itself is replaced by a bootstrapping
-code which automatically makes sure the Unix loader is able to load and start
-libhttpd.ep by providing the LD_LIBRARY_PATH to
-libhttpd.so.
-
-Supported Platforms
-
-src/Configure script currently has only limited but
-adequate built-in knowledge on how to compile DSO files, because as already
-mentioned this is heavily platform-dependent. Nevertheless all major Unix
-platforms are supported. The definitive current state (May 1999) is this:
-
-
-
-
-
-(actually tested versions in parenthesis)
-
-
-o FreeBSD (2.1.5, 2.2.x, 3.x, 4.x)
-o OpenBSD (2.x)
-o NetBSD (1.3.1)
-o BSDI (3.x, 4.x)
-o Linux (Debian/1.3.1, RedHat/4.2)
-o Solaris (2.4, 2.5, 2.6, 2.7)
-o SunOS (4.1.3)
-o Digital UNIX (4.0)
-o IRIX (5.3, 6.2)
-o HP/UX (10.20)
-o UnixWare (2.01, 2.1.2)
-o SCO (5.0.4)
-o AIX (3.2, 4.1.5, 4.2, 4.3)
-o ReliantUNIX/SINIX (5.43)
-o SVR4 (-)
-o Mac OS X Server (1.0)
-o Mac OS (10.0 preview 1)
-o OpenStep/Mach (4.2)
-o DGUX (??)
-o NetWare (5.1)
-
-
-
-o Ultrix (no dlopen-style interface under this platform)
-
-
-Usage Summary
-
-
-
-
-
-httpd binary) into a DSO libhttpd.so, an executable
-program libhttpd.ep and a bootstrapping executable program
-httpd (Notice: this is only required on some of the supported
-platforms to force the linker to export the Apache core symbols, which in turn
-is a prerequisite for the DSO modularization):
-
-
-
-
-configure (preferred):
-
-
-
-
-$ ./configure --prefix=/path/to/install
- --enable-rule=SHARED_CORE ...
-$ make install
-
-
-
-
-- Edit src/Configuration:
- << Rule SHARED_CORE=default
- >> Rule SHARED_CORE=yes
- << EXTRA_CFLAGS=
- >> EXTRA_CFLAGS= -DSHARED_CORE_DIR=\"/path/to/install/libexec\"
-$ make
-$ cp src/libhttpd.so* /path/to/install/libexec/
-$ cp src/libhttpd.ep /path/to/install/libexec/
-$ cp src/httpd /path/to/install/bin/
-
-mod_foo.c, into its own DSO mod_foo.so:
-
-
-
-
-configure (preferred):
-
-
-
-
-$ ./configure --prefix=/path/to/install
- --enable-shared=foo
-$ make install
-
-
-
-
-- Edit src/Configuration:
- << AddModule modules/xxxx/mod_foo.o
- >> SharedModule modules/xxxx/mod_foo.so
-$ make
-$ cp src/xxxx/mod_foo.so /path/to/install/libexec
-- Edit /path/to/install/etc/httpd.conf
- >> LoadModule foo_module /path/to/install/libexec/mod_foo.so
-
-mod_foo.c, into its own DSO mod_foo.so
-
-
-
-
-configure (preferred):
-
-
-
-
-$ ./configure --add-module=/path/to/3rdparty/mod_foo.c
- --enable-shared=foo
-$ make install
-
-
-
-
-$ cp /path/to/3rdparty/mod_foo.c /path/to/apache-1.3/src/modules/extra/
-- Edit src/Configuration:
- >> SharedModule modules/extra/mod_foo.so
-$ make
-$ cp src/xxxx/mod_foo.so /path/to/install/libexec
-- Edit /path/to/install/etc/httpd.conf
- >> LoadModule foo_module /path/to/install/libexec/mod_foo.so
-
-mod_foo.c, into its own DSO mod_foo.so outside
-of the Apache source tree:
-
-
-
-
-apxs:
-
-
-
-$ cd /path/to/3rdparty
-$ apxs -c mod_foo.c
-$ apxs -i -a -n foo mod_foo.so
-
-Advantages & Disadvantages
-
-
-
-
-LoadModule
- httpd.conf configuration commands instead of
- Configuration AddModule commands at build-time.
- For instance this way one is able to run different server instances
- (standard & SSL version, minimalistic & powered up version
- [mod_perl, PHP3], etc.) with only one Apache installation.
-apxs
- pair you can both work outside the Apache source tree and only need an
- apxs -i command followed by an apachectl
- restart to bring a new version of your currently developed module
- into the running Apache server.
-
-
-
-
-ld -lfoo) on all platforms (for instance a.out-based
- platforms usually don't provide this functionality while ELF-based
- platforms do) you cannot use the DSO mechanism for all types of modules.
- Or in other words, modules compiled as DSO files are restricted to only
- use symbols from the Apache core, from the C library (libc)
- and all other dynamic or static libraries used by the Apache core, or
- from static library archives (libfoo.a) containing position
- independent code. The only chances to use other code is to either make
- sure the Apache core itself already contains a reference to it, loading
- the code yourself via dlopen() or enabling the
- SHARED_CHAIN rule while building Apache when your platform
- supports linking DSO files against DSO libraries.
-SHARED_CORE feature because this
- way the global symbols are forced to be exported. As a consequence the
- Apache src/Configure script automatically enforces
- SHARED_CORE on these platforms when DSO features are used in
- the Configuration file or on the configure command line.
-Apache's Handler Use
-
-
-
-
-What is a Handler
-
-
-
-
-
-
-Related Modules
-
-
-mod_actions
-mod_asis
-mod_cgi
-mod_imap
-mod_info
-mod_include
-mod_mime
-mod_negotiation
-mod_status
-
-Related Directives
-
-
-Action
-AddHandler
-RemoveHandler
-SetHandler
-
-
-
-default_handler(), which is the
- handler used by default to handle static content.
- (core)
-
-
-Examples
-
-Modifying static content using a CGI script
-
-html extension to trigger the launch of the
-footer.pl CGI script.
- Action add-footer /cgi-bin/footer.pl
- AddHandler add-footer html
-
-
-PATH_TRANSLATED
-environment variable) and making whatever modifications or additions
-are desired.Files with HTTP headers
-
-send-as-is
-handler, which is used for files which contain their own HTTP headers.
-All files in the /web/htdocs/asis/ directory will be
-processed by the send-as-is handler, regardless of their
-filename extensions.
- <Directory /web/htdocs/asis>
- SetHandler send-as-is
- </Directory>
-
-
-
-
-Programmer's Note
-
-request_rec structure:
- char *handler
-
-r->handler to the name of the handler at any time
-prior to the invoke_handler stage of the
-request. Handlers are implemented as they were before, albeit using
-the handler name instead of a content type. While it is not
-necessary, the naming convention for handlers is to use a
-dash-separated word, with no slashes, so as to not invade the media
-type name-space.
-
-
-
-
-
-![[Apache Documentation]](images/apache_header.gif)
-
-
-
-
-
-
-
- FAQ
-
-
- Directives
-
-
- Modules
-
-
- Search
-
-
-
-
-
-
-
-Apache HTTP Server Version 2.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Release Notes
-
-New Features in Version 2.0
-
-Upgrading to Version 2.0
-
-
-Apache License
-
-
-
-
-Reference Manual
-
-Compiling and Installing
-
-Starting
-
-Stopping or Restarting
-
-Run-time Configuration Directives
-
-Modules: By Type or
- Alphabetical
-
-Dynamic Shared Object (DSO) Support
-
-The Apache API
-
-
-
-
-Platform Specific Notes
-
-Microsoft Windows
-
-Novell Netware 5
-
-HP MPE/iX
-
-UnixWare
-
-TPF
-
-
-
-![]()
-
-
-
-
-
-Using the Apache HTTP Server
-
-Configuration Files
-
-Server-Wide Configuration
-
-Virtual Hosts
-
-Handlers
-
-Content negotiation
-
-Environment Variables
-
-Using SetUserID Execution for CGI
-
-General Performance hints
-
-Security tips
-
-URL Rewriting Guide
-
-
-
-Other Topics
-
-Frequently Asked Questions
-
-Tutorials
-
-Documentation for Developers
-
-Other Notes
- Compiling and Installing Apache 1.3
-
-This document covers compilation and installation of Apache on Unix
-systems only. For compiling and installation on Windows, see Using Apache with Microsoft Windows and for
-TPF see Installing the Apache 1.3 HTTP
-Server on TPF.
-
-Downloading Apache
-
-Information on the latest version of Apache can be found on the Apache
-web server at http://www.apache.org/. This will
-list the current release, any more recent beta-test release, together
-with details of mirror web and anonymous ftp sites.
-
-Compiling Apache
-
-Compiling Apache consists of three steps: Firstly select which Apache
-modules you want to include into the server. Secondly create a
-configuration for your operating system. Thirdly compile the
-executable.
-src
-directory of the Apache distribution. Change into this directory.
-
-
-
-
-The modules we place in the Apache distribution are the ones we have
-tested and are used regularly by various members of the Apache
-development group. Additional modules contributed by members or third
-parties with specific needs or functions are available at
-<http://www.apache.org/dist/contrib/modules/>.
-There are instructions on that page for linking these modules into the
-core Apache code.
-
-Configuration file. Uncomment lines corresponding to
- those optional modules you wish to include (among the AddModule lines
- at the bottom of the file), or add new lines corresponding to
- additional modules you have downloaded or written. (See API.html for preliminary docs on how to
- write Apache modules). Advanced users can comment out some of the
- default modules if they are sure they will not need them (be careful
- though, since many of the default modules are vital for the correct
- operation and security of the server).
- Configuration
- file to see if you need to set any of the Rule lines.
-
-
- Configure script as given below. However
- if this fails or you have any special requirements (e.g., to include
- an additional library required by an optional module) you might need
- to edit one or more of the following options in the
- Configuration file:
- EXTRA_CFLAGS, LIBS, LDFLAGS, INCLUDES.
- Configure script:
-
-
-
- (*: Depending on Configuration and your system, Configure
- might not print these lines. That's OK).
- % Configure
- Using 'Configuration' as config file
- + configured for <whatever> platform
- + setting C compiler to <whatever> *
- + setting C compiler optimization-level to <whatever> *
- + Adding selected modules
- + doing sanity check on compiler and options
- Creating Makefile in support
- Creating Makefile in main
- Creating Makefile in os/unix
- Creating Makefile in modules/standard
-
- Configure to tell it to read an alternative
- Configuration file, such as Configure -file
- Configuration.ai).
- make.
-Installing Apache
-
-You will have a binary file called httpd in the
-src directory. A binary distribution of Apache will
-supply this file. conf, logs and
-icons directories into it. In either case you should
-read the security tips
-describing how to set the permissions on the server root directory.conf directory and are called srm.conf,
-access.conf and httpd.conf. To help you get
-started there are same files in the conf directory of the
-distribution, called srm.conf-dist,
-access.conf-dist and httpd.conf-dist. Copy
-or rename these files to the names without the -dist.
-Then edit each of the files. Read the comments in each file carefully.
-Failure to setup these files correctly could lead to your server not
-working or being insecure. You should also have an additional file in
-the conf directory called mime.types. This
-file usually does not need editing.
-
-httpd.conf. This sets up general attributes
-about the server: the port number, the user it runs as, etc. Next
-edit the srm.conf file; this sets up the root of the
-document tree, special functions like server-parsed HTML or internal
-imagemap parsing, etc. Finally, edit the access.conf
-file to at least set the base cases of access.
-
-.htaccess
-files in directories accessed by the server.
-
-Set your system time properly!
-
-Proper operation of a public web server requires accurate time
-keeping, since elements of the HTTP protocol are expressed as the time
-of day. So, it's time to investigate setting up NTP or some other
-time synchronization system on your Unix box, or whatever the
-equivalent on NT would be.
-
-Starting and Stopping the Server
-
-To start the server, simply run httpd. This will look for
-httpd.conf in the location compiled into the code (by
-default /usr/local/apache/conf/httpd.conf). If
-this file is somewhere else, you can give the real
-location with the -f argument. For example:
-
-
- /usr/local/apache/httpd -f /usr/local/apache/conf/httpd.conf
-
-
-If all goes well this will return to the command prompt almost
-immediately. This indicates that the server is now up and running. If
-anything goes wrong during the initialization of the server you will
-see an error message on the screen.
-
-If the server started ok, you can now use your browser to
-connect to the server and read the documentation. If you are running
-the browser on the same machine as the server and using the default
-port of 80, a suitable URL to enter into your browser is
-
-
- http://localhost/
-
-
-httpd it complained about being unable to
-"bind" to an address, then either some other process is already using
-the port you have configured Apache to use, or you are running httpd
-as a normal user but trying to use a port below 1024 (such as the
-default port 80).
-
-error_log in the
-logs directory).
-
-httpd to your system startup files
-(typically rc.local or a file in an
-rc.N directory). This will start Apache as root.
-Before doing this ensure that your server is properly configured
-for security and access restrictions.
-
-httpd.pid in the
-logs directory (unless configured otherwise). Do not
-attempt to kill the child processes because they will be renewed by
-the parent. A typical command to stop the server is:
-
-
- kill -TERM `cat /usr/local/apache/logs/httpd.pid`
-
-
-Compiling Support Programs
-
-In addition to the main httpd server which is compiled
-and configured as above, Apache includes a number of support programs.
-These are not compiled by default. The support programs are in the
-support directory of the distribution. To compile
-the support programs, change into this directory and type
-
- make
-
-
-
-
-
diff --git a/docs/manual/invoking.html.en b/docs/manual/invoking.html.en
deleted file mode 100644
index 4309e1d6feb..00000000000
--- a/docs/manual/invoking.html.en
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-Starting Apache
-
-Invoking Apache
-
-On Unix, the httpd program is usually run as a daemon
-which executes continuously, handling requests. It is possible to
-invoke Apache by the Internet daemon inetd each time a
-connection to the HTTP service is made (use the ServerType directive) but this is
-not recommended.
-
-Command line options
-The following options are recognized on the httpd command line:
-
-
-
-
-
-
diff --git a/docs/manual/mod/directive-dict.html.en b/docs/manual/mod/directive-dict.html.en
deleted file mode 100644
index 03a9c3f67e9..00000000000
--- a/docs/manual/mod/directive-dict.html.en
+++ /dev/null
@@ -1,265 +0,0 @@
-
-
-
- -d serverroot
-/usr/local/apache on Unix, /apache on
-Windows and /os2httpd on OS/2.
-
--D name
--f config
-/, then it is taken to be a
-path relative to the ServerRoot. The
-default is conf/httpd.conf.
-
--C "directive"
--c "directive"
--X
--v
--V
--L
--l
-
-
-Give a list of directives together with expected arguments and places
-where the directive is valid, then exit. (Apache 1.2 to 1.3.3. Later
-versions use -L instead).
-
-
-
--h
-
-
-Give a list of all modules compiled into the server, then exit. (Up to
-Apache 1.3.3. Later versions use -l instead).
-
-
--S
--t
--T
-command instead.
-
--T
--k option
--?
-Terms Used to Describe Apache Directives
-
-
-
-
- Default:
- directive-name default-value
-
- Context: context-list
-
- Override: override
-
- Status: status
-
- Module: module-name
-
- Compatibility: compatibility notes
- Directive Terms
-
-
-
- Syntax
-
- Default
-
- Context
-
-
-
- Override
-
- Status
-
-
-
-
- Module
-
- Compatibility
- Terms Used to Describe Apache Modules
-
-
-
-
- Source File: source-file
-
- Module Identifier: module-identifier
-
- Compatibility: compatibility notes
- Module Terms
-
-
-
-
- Status
-
-
-
-
- Source File
- <IfModule>
- directive.
-
- Module Identifier
-
- Compatibility
- Apache 2.0 - Available MPM's
-
-Platforms
-
-Unix
-
-
-
-
-
-MPM
-Description
-Maintainer
-
-
-prefork
-The prefork MPM reproduces the behaviour of Apache 1.3.
-Ryan Bloom
-
-
-mpmt_pthread
-This MPM uses a multi-process, multi-threaded model to provide good scability and stability.
-Ryan Bloom
-
-
-dexter
-This is Manoj's plaything. It has a number of hybrid features that Manoj has been looking at to improve performance.
-Manoj
-Windows
-
-
-
-
-
-MPM
-Description
-Maintainer
-
-
-mpm_winnt
-The Windows MPM, this is a multi-threaded model with a parent watchdog process.
-Bill Stoddard
-OS/2
-
-
-
-
-
-MPM
-Description
-Maintainer
-
-
-spmt_os2
-Single process, multiple thread MPM for OS2.
-Brian Havard
-BeOS
-
-
-
-
-
-MPM
-Description
-Maintainer
-
-
-mpmt_beos
-Multi-threaded MPM for BeOS. This follows the mpmt_pthread model.
-David Reid
-
-David Reid, 15th January 2000
-
-
-
diff --git a/docs/manual/new_features_2_0.html.en b/docs/manual/new_features_2_0.html.en
deleted file mode 100644
index c537c374726..00000000000
--- a/docs/manual/new_features_2_0.html.en
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-Overview of New Features in Apache 2.0
-
-
-
-Core Enhancements:
-
-
-
-
-Module Enhancements:
-
-
-
-
-
-
-
-
-
diff --git a/docs/manual/platform/netware.html b/docs/manual/platform/netware.html
deleted file mode 100644
index 8add778b5f1..00000000000
--- a/docs/manual/platform/netware.html
+++ /dev/null
@@ -1,278 +0,0 @@
-
-
-
-Using Apache With Novell NetWare 5
-
-
-
-
-
-
-
-
-Requirements
-
-Apache 1.3 is designed to run on NetWare 5.0 and 5.1.
-Downloading Apache for NetWare 5
-
-Installing Apache for NetWare
-
-There is no Apache install program for NetWare currently. You will need
-to compile apache and copy the files over to the server manually. An
-install program will be posted at a later date.
-
-
-
-Apache on a NetWare volume
- sys:/Apache called conf
- sys:/apache/conf directory
- and rename them all as *.conf files
- sys:/apache to the search path. EXAMPLE: search add sys:\apache
-sys volume.
-
-Running Apache for NetWare
-
-To start Apache just type apache at the console. This
-will load apache in the OS address space. If you prefer to load
-Apache in a protected address space you may specify the address space
-with the load statement as follows:
-
- load address space = apache apache
-
-
- unload apache
-
-If apache is running in a protected address space specify the
-address space in the unload statement:
-
- unload address space = apache apache
-
-
-
-
- apache -f "vol:/my server/conf/my.conf"
- apache -f test/test.conf
-
-In these cases, the proper ServerRoot should be set in the configuration file.
-
-
-
-
-Configuring Apache for NetWare
-
-Apache is configured by files in the conf
-directory. These are the same as files used to configure the Unix
-version, but there are a few different directives for Apache on
-NetWare. See the Apache documentation for all the
-available directives.
-
-
-
-
-MaxRequestsPerChild
- 0, does not cause the process to ever exit.
- ThreadsPerChild 50.
- ThreadStackSize 65536.
- \Apache\modules directory. To activate these, or other
- modules, the new LoadModule
- directive must be used. For example, to active the status module,
- use the following (in addition to the status-activating directives
- in access.conf):
- LoadModule status_module modules/status
-
- Compiling Apache for NetWare
-
-src subdirectory of the Apache
- distribution and unzip ApacheNW.mcp.gz. You may use a
- recent version of WinZip to accomplish this or gzip for Windows. The main
- Metrowerks project file for Apache (ApacheNW.mcp) is now ready
- to use. Just double click on it from within explorer and it should
- automatically launch MetroWerks CodeWarrior.
-
- /apache-1.3/src/support/htpasswd.mcp.gz
- /apache-1.3/src/support/htdigest.mcp.gz
-
-
-
htpasswd.mcp.gz and htdigest.mcp.gz will also need
-to be unzipped before they can be used with MetroWerks CodeWarrior.
-
-Once Apache has been compiled, it needs to be installed in its server
- root directory. The default is the sys:/Apache
- directory.
-Before running the server you must fill out the conf directory. -Copy the *.conf-dist-nw from the distribution conf directory -and rename *.conf. Edit the ServerRoot entries to your -actual server root (for example "sys:/apache"). Copy over -the conf/magic and conf/mime.types files as well. - - - - - diff --git a/docs/manual/platform/perf-bsd44.html b/docs/manual/platform/perf-bsd44.html deleted file mode 100644 index c5e978c2b98..00000000000 --- a/docs/manual/platform/perf-bsd44.html +++ /dev/null @@ -1,254 +0,0 @@ - - -
-- -Edit the following two files: -
/usr/include/sys/socket.h
- /usr/src/sys/sys/socket.h
-In each file, look for the following:
-- /* - * Maximum queue length specifiable by listen. - */ - #define SOMAXCONN 5 -- -Just change the "5" to whatever appears to work. I bumped the two -machines I was having problems with up to 32 and haven't noticed the -problem since. - -
- -After the edit, recompile the kernel and recompile the Apache server -then reboot. - -
- -FreeBSD 2.1 seems to be perfectly happy, with SOMAXCONN -set to 32 already. - -
-
-
-Addendum for very heavily loaded BSD servers
-
-from Chuck Murcko <chuck@telebase.com>
-
-
- -If you're running a really busy BSD Apache server, the following are useful -things to do if the system is acting sluggish:
- -
- -
-maxusers 256 -- -Maxusers drives a lot of other kernel parameters: - -
-# Network options. NMBCLUSTERS defines the number of mbuf clusters and -# defaults to 256. This machine is a server that handles lots of traffic, -# so we crank that value. -options NMBCLUSTERS=4096 # mbuf clusters at 4096 - -# -# Misc. options -# -options CHILD_MAX=512 # maximum number of child processes -options OPEN_MAX=512 # maximum fds (breaks RPC svcs) -- -
- -In many cases, NMBCLUSTERS must be set much larger than would appear -necessary at first glance. The reason for this is that if the browser -disconnects in mid-transfer, the socket fd associated with that particular -connection ends up in the TIME_WAIT state for several minutes, during -which time its mbufs are not yet freed. Another reason is that, on server -timeouts, some connections end up in FIN_WAIT_2 state forever, because -this state doesn't time out on the server, and the browser never sent -a final FIN. For more details see the -FIN_WAIT_2 page. - -
- -Some more info on mbuf clusters (from sys/mbuf.h): -
-/* - * Mbufs are of a single size, MSIZE (machine/machparam.h), which - * includes overhead. An mbuf may add a single "mbuf cluster" of size - * MCLBYTES (also in machine/machparam.h), which has no additional overhead - * and is used instead of the internal data area; this is done when - * at least MINCLSIZE of data must be stored. - */ -- -
- -CHILD_MAX and OPEN_MAX are set to allow up to 512 child processes (different -than the maximum value for processes per user ID) and file descriptors. -These values may change for your particular configuration (a higher OPEN_MAX -value if you've got modules or CGI scripts opening lots of connections or -files). If you've got a lot of other activity besides httpd on the same -machine, you'll have to set NPROC higher still. In this example, the NPROC -value derived from maxusers proved sufficient for our load. - -
-
-To increase the size of the listen() queue, you need to
-adjust the value of SOMAXCONN. SOMAXCONN is not derived from maxusers,
-so you'll always need to increase that yourself. We use a value guaranteed
-to be larger than Apache's default for the listen() of 128, currently.
-The actual value for SOMAXCONN is set in sys/socket.h.
-The best way to adjust this parameter is run-time, rather than changing
-it in this header file and thus hardcoding a value in the kernel and
-elsewhere. To do this, edit /etc/rc.local and add the
-following line:
-
- /usr/sbin/sysctl -w kern.somaxconn=256 -- -
-
-We used 256 but you can tune it for your own setup. In
-many cases, however, even the default value of 128 (for
-later versions of FreeBSD) is OK.
-
-
- -Caveats - -
- -Be aware that your system may not boot with a kernel that is configured -to use more resources than you have available system RAM. -ALWAYS -have a known bootable kernel available when tuning your system this way, -and use the system tools beforehand to learn if you need to buy more -memory before tuning. - -
- -RPC services will fail when the value of OPEN_MAX is larger than 256. -This is a function of the original implementations of the RPC library, -which used a byte value for holding file descriptors. BSDI has partially -addressed this limit in its 2.1 release, but a real fix may well await -the redesign of RPC itself. - -
- -Finally, there's the hard limit of child processes configured in Apache. - -
- -For versions of Apache later than 1.0.5 you'll need to change the -definition for HARD_SERVER_LIMIT in httpd.h and -recompile if you need to run more than the default 150 instances of httpd. - -
- -From conf/httpd.conf-dist: - -
-# Limit on total number of servers running, i.e., limit on the number -# of clients who can simultaneously connect --- if this limit is ever -# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW. -# It is intended mainly as a brake to keep a runaway server from taking -# Unix with it as it spirals down... - -MaxClients 150 -- -Know what you're doing if you bump this value up, and make sure you've -done your system monitoring, RAM expansion, and kernel tuning beforehand. -Then you're ready to service some serious hits! - -
- -Thanks to Tony Sanders and Chris Torek at BSDI for their -helpful suggestions and information. - -
- -"M. Teterin" <mi@ALDAN.ziplink.net> writes:
-
It really does help if your kernel and frequently used utilities -are fully optimized. Rebuilding the FreeBSD kernel on an AMD-133 -(486-class CPU) web-server with-
--m486 -fexpensive-optimizations -fomit-frame-pointer -O2
-helped reduce the number of "unable" errors, because the CPU was -often maxed out.
- -
- Patch ID OSF350-195 for V3.2C- Patch IDs for V3.2E and V3.2F should be available soon. - There is no known reason why the Patch ID OSF360-350195 - won't work on these releases, but such use is not officially - supported by Digital. This patch kit will not be needed for - V3.2G when it is released. -
- Patch ID OSF360-350195 for V3.2D -
-From mogul@pa.dec.com (Jeffrey Mogul) -Organization DEC Western Research -Date 30 May 1996 00:50:25 GMT -Newsgroups comp.unix.osf.osf1 -Message-ID <4oirch$bc8@usenet.pa.dec.com> -Subject Re: Web Site Performance -References 1 - - - -In article <skoogDs54BH.9pF@netcom.com> skoog@netcom.com (Jim Skoog) writes: ->Where are the performance bottlenecks for Alpha AXP running the ->Netscape Commerce Server 1.12 with high volume internet traffic? ->We are evaluating network performance for a variety of Alpha AXP ->runing DEC UNIX 3.2C, which run DEC's seal firewall and behind ->that Alpha 1000 and 2100 webservers. - -Our experience (running such Web servers as altavista.digital.com -and www.digital.com) is that there is one important kernel tuning -knob to adjust in order to get good performance on V3.2C. You -need to patch the kernel global variable "somaxconn" (use dbx -k -to do this) from its default value of 8 to something much larger. - -How much larger? Well, no larger than 32767 (decimal). And -probably no less than about 2048, if you have a really high volume -(millions of hits per day), like AltaVista does. - -This change allows the system to maintain more than 8 TCP -connections in the SYN_RCVD state for the HTTP server. (You -can use "netstat -An |grep SYN_RCVD" to see how many such -connections exist at any given instant). - -If you don't make this change, you might find that as the load gets -high, some connection attempts take a very long time. And if a lot -of your clients disconnect from the Internet during the process of -TCP connection establishment (this happens a lot with dialup -users), these "embryonic" connections might tie up your somaxconn -quota of SYN_RCVD-state connections. Until the kernel times out -these embryonic connections, no other connections will be accepted, -and it will appear as if the server has died. - -The default value for somaxconn in Digital UNIX V4.0 will be quite -a bit larger than it has been in previous versions (we inherited -this default from 4.3BSD). - -Digital UNIX V4.0 includes some other performance-related changes -that significantly improve its maximum HTTP connection rate. However, -we've been using V3.2C systems to front-end for altavista.digital.com -with no obvious performance bottlenecks at the millions-of-hits-per-day -level. - -We have some Webstone performance results available at - http://www.digital.com/info/alphaserver/news/webff.html - -[The document referenced above is no longer at that URL -- Ed.] - -I'm not sure if these were done using V4.0 or an earlier version -of Digital UNIX, although I suspect they were done using a test -version of V4.0. - --Jeff - -- - - diff --git a/docs/manual/platform/perf-hp.html b/docs/manual/platform/perf-hp.html deleted file mode 100644 index ca902a09fe8..00000000000 --- a/docs/manual/platform/perf-hp.html +++ /dev/null @@ -1,122 +0,0 @@ - - - -
- ----------------------------------------------------------------------------- - -From mogul@pa.dec.com (Jeffrey Mogul) -Organization DEC Western Research -Date 31 May 1996 21:01:01 GMT -Newsgroups comp.unix.osf.osf1 -Message-ID <4onmmd$mmd@usenet.pa.dec.com> -Subject Digital UNIX V3.2C Internet tuning patch info - ----------------------------------------------------------------------------- - -Something that probably few people are aware of is that Digital -has a patch kit available for Digital UNIX V3.2C that may improve -Internet performance, especially for busy web servers. - -This patch kit is one way to increase the value of somaxconn, -which I discussed in a message here a day or two ago. - -I've included in this message the revised README file for this -patch kit below. Note that the original README file in the patch -kit itself may be an earlier version; I'm told that the version -below is the right one. - -Sorry, this patch kit is NOT available for other versions of Digital -UNIX. Most (but not quite all) of these changes also made it into V4.0, -so the description of the various tuning parameters in this README -file might be useful to people running V4.0 systems. - -This patch kit does not appear to be available (yet?) from - http://www.service.digital.com/html/patch_service.html -so I guess you'll have to call Digital's Customer Support to get it. - --Jeff - -DESCRIPTION: Digital UNIX Network tuning patch - - Patch ID: OSF350-146 - - SUPERSEDED PATCHES: OSF350-151, OSF350-158 - - This set of files improves the performance of the network - subsystem on a system being used as a web server. There are - additional tunable parameters included here, to be used - cautiously by an informed system administrator. - -TUNING - - To tune the web server, the number of simultaneous socket - connection requests are limited by: - - somaxconn Sets the maximum number of pending requests - allowed to wait on a listening socket. The - default value in Digital UNIX V3.2 is 8. - This patch kit increases the default to 1024, - which matches the value in Digital UNIX V4.0. - - sominconn Sets the minimum number of pending connections - allowed on a listening socket. When a user - process calls listen with a backlog less - than sominconn, the backlog will be set to - sominconn. sominconn overrides somaxconn. - The default value is 1. - - The effectiveness of tuning these parameters can be monitored by - the sobacklog variables available in the kernel: - - sobacklog_hiwat Tracks the maximum pending requests to any - socket. The initial value is 0. - - sobacklog_drops Tracks the number of drops exceeding the - socket set backlog limit. The initial - value is 0. - - somaxconn_drops Tracks the number of drops exceeding the - somaxconn limit. When sominconn is larger - than somaxconn, tracks the number of drops - exceeding sominconn. The initial value is 0. - - TCP timer parameters also affect performance. Tuning the following - require some knowledge of the characteristics of the network. - - tcp_msl Sets the tcp maximum segment lifetime. - This is the maximum lifetime in half - seconds that a packet can be in transit - on the network. This value, when doubled, - is the length of time a connection remains - in the TIME_WAIT state after a incoming - close request is processed. The unit is - specified in 1/2 seconds, the initial - value is 60. - - tcp_rexmit_interval_min - Sets the minimum TCP retransmit interval. - For some WAN networks the default value may - be too short, causing unnecessary duplicate - packets to be sent. The unit is specified - in 1/2 seconds, the initial value is 1. - - tcp_keepinit This is the amount of time a partially - established connection will sit on the listen - queue before timing out (e.g., if a client - sends a SYN but never answers our SYN/ACK). - Partially established connections tie up slots - on the listen queue. If the queue starts to - fill with connections in SYN_RCVD state, - tcp_keepinit can be decreased to make those - partial connects time out sooner. This should - be used with caution, since there might be - legitimate clients that are taking a while - to respond to SYN/ACK. The unit is specified - in 1/2 seconds, the default value is 150 - (ie. 75 seconds). - - The hashlist size for the TCP inpcb lookup table is regulated by: - - tcbhashsize The number of hash buckets used for the - TCP connection table used in the kernel. - The initial value is 32. For best results, - should be specified as a power of 2. For - busy Web servers, set this to 2048 or more. - - The hashlist size for the interface alias table is regulated by: - - inifaddr_hsize The number of hash buckets used for the - interface alias table used in the kernel. - The initial value is 32. For best results, - should be specified as a power of 2. - - ipport_userreserved The maximum number of concurrent non-reserved, - dynamically allocated ports. Default range - is 1025-5000. The maximum value is 65535. - This limits the numer of times you can - simultaneously telnet or ftp out to connect - to other systems. - - tcpnodelack Don't delay acknowledging TCP data; this - can sometimes improve performance of locally - run CAD packages. Default is value is 0, - the enabled value is 1. - - Digital UNIX version: - - V3.2C -Feature V3.2C patch V4.0 -======= ===== ===== ==== -somaxconn X X X -sominconn - X X -sobacklog_hiwat - X - -sobacklog_drops - X - -somaxconn_drops - X - -tcpnodelack X X X -tcp_keepidle X X X -tcp_keepintvl X X X -tcp_keepcnt - X X -tcp_keepinit - X X -TCP keepalive per-socket - - X -tcp_msl - X - -tcp_rexmit_interval_min - X - -TCP inpcb hashing - X X -tcbhashsize - X X -interface alias hashing - X X -inifaddr_hsize - X X -ipport_userreserved - X - -sysconfig -q inet - - X -sysconfig -q socket - - X - -
-Date: Wed, 05 Nov 1997 16:59:34 -0800 -From: Rick Jones <raj@cup.hp.com> -Reply-To: raj@cup.hp.com -Organization: Network Performance -Subject: HP-UX tuning tips -- -Here are some tuning tips for HP-UX to add to the tuning page. - -
-
-For HP-UX 9.X: Upgrade to 10.20
-For HP-UX 10.[00|01|10]: Upgrade to 10.20
-
-
- -For HP-UX 10.20: - -
- -Install the latest cumulative ARPA Transport Patch. This will allow you -to configure the size of the TCP connection lookup hash table. The -default is 256 buckets and must be set to a power of two. This is -accomplished with adb against the *disc* image of the kernel. The -variable name is tcp_hash_size. - -Notice that it's critically important that you use "W" to write a 32 bit -quantity, not "w" to write a 16 bit value when patching the disc image because -the tcp_hash_size variable is a 32 bit quantity. - -
- -How to pick the value? Examine the output of - -ftp://ftp.cup.hp.com/dist/networking/tools/connhist and see how many -total TCP connections exist on the system. You probably want that number -divided by the hash table size to be reasonably small, say less than 10. -Folks can look at HP's SPECweb96 disclosures for some common settings. -These can be found at -http://www.specbench.org/. If an HP-UX system was -performing at 1000 SPECweb96 connections per second, the TIME_WAIT time -of 60 seconds would mean 60,000 TCP "connections" being tracked. - -
- -Folks can check their listen queue depths with - -ftp://ftp.cup.hp.com/dist/networking/misc/listenq. - -
- -If folks are running Apache on a PA-8000 based system, they should -consider "chatr'ing" the Apache executable to have a large page size. -This would be "chatr +pi L <BINARY>." The GID of the running executable -must have MLOCK privileges. Setprivgrp(1m) should be consulted for -assigning MLOCK. The change can be validated by running Glance and -examining the memory regions of the server(s) to make sure that they -show a non-trivial fraction of the text segment being locked. - -
- -If folks are running Apache on MP systems, they might consider writing a -small program that uses mpctl() to bind processes to processors. A -simple pid % numcpu algorithm is probably sufficient. This might even go -into the source code. - -
- -If folks are concerned about the number of FIN_WAIT_2 connections, they -can use nettune to shrink the value of tcp_keepstart. However, they -should be careful there - certainly do not make it less than oh two to -four minutes. If tcp_hash_size has been set well, it is probably OK to -let the FIN_WAIT_2's take longer to timeout (perhaps even the default -two hours) - they will not on average have a big impact on performance. - -
- -There are other things that could go into the code base, but that might -be left for another email. Feel free to drop me a message if you or -others are interested. - -
- -sincerely, - -
-
-rick jones
-
-http://www.cup.hp.com/netperf/NetperfPage.html
-
-
-
-
-
-
diff --git a/docs/manual/platform/perf.html b/docs/manual/platform/perf.html
deleted file mode 100644
index 73bd5b5b20f..00000000000
--- a/docs/manual/platform/perf.html
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-- -Other links: - -
- open("/usr/lib/locale/TZ/MET", O_RDONLY) = 3
- read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 7944) = 778
- close(3) = 0
-
-
- This version of Apache includes changes allowing it to run on
- IBM's EBCDIC-based
- TPF
- (Transaction Processing Facility) operating system.
- Unless otherwise noted TPF version 4.1 PUT09 is required.
-
- Refer to htdocs/manual/install-tpf.html
- for step-by-step installation instructions.
-
- As this is the first cut at making Apache run on TPF,
- performance tuning has not been done.
-
- This port builds upon the EBCDIC changes
- previously made to Apache.
-
-
- The distributed configuration files (httpd.conf-dist and - mime.types, both located in the conf subdirectory) - work on TPF. Performance considerations may dictate setting KeepAlive to "Off" - (the default is "On") or lowering the Timeout value from the default - 300 seconds (5 minutes) in order to reduce the number of active ECBs on your system. -
- - --
tpf_process_signals() function.
- Additionally, the default action for an alarm on TPF is to take
- an OPR-7777 dump and exit. (On UNIX the default is the equivalent
- of exit() with no dump taken.)
- These differences necessitated a few modifications:
- ap_block_alarms() &
- ap_unblock_alarms()
- tpf_process_signals() calls
- select() calls to prevent blocking.
- Some simple functions & definitions initially needed to be added
- on TPF, such as FD_SET().
- We've put these in src/os/tpf/os.h for now.
-
TPF-specific conversion tables between US-ASCII and - EBCDIC (character set IBM-1047 to be exact) were created - and put into ebcdic.c in the src/os/tpf directory. -
- -Various minor changes (such as casting) were made due to - differences in how some functions are implemented on TPF. -
- -- -In addition, make sure that USE_FCNTL_SERIALIZE_ACCEPT is defined (if not -defined by Apache autoconfiguration). To reduce instances of connections -in FIN_WAIT_2 state, you may also want to define NO_LINGCLOSE (Apache 1.2 -only). - -
- -NOTE: Unixware 2.1.2 and later already have patch ptf3123 -included
- -In addition, make sure that USE_FCNTL_SERIALIZE_ACCEPT is defined (if not -defined by Apache autoconfiguration). To reduce instances of connections -in FIN_WAIT_2 state, you may also want to define NO_LINGCLOSE (Apache 1.2 -only).
- -Thanks to Joe Doupnik <JRD@cc.usu.edu> and Rich Vaughn -<rvaughn@aad.com> for additional info for UnixWare builds.
- - - - diff --git a/docs/manual/platform/win_compiling.html b/docs/manual/platform/win_compiling.html deleted file mode 100644 index a415747e41e..00000000000 --- a/docs/manual/platform/win_compiling.html +++ /dev/null @@ -1,182 +0,0 @@ - - -
-There are many important points before you begin compiling Apache. - See Using Apache with Microsoft Windows - before you begin.
- -Compiling Apache requires Microsoft Visual C++ 5.0 (or later) to be - properly installed. It is easiest to compile with the command-line tools - (nmake, etc...). Consult the VC++ manual to determine how to install - them. Be especially aware that the vcvars32.bat file from the - Program Files/DevStudio/VC/bin folder may be required to prepare the - command-line environment for command-line builds!
- -First, unpack the Apache distribution into an appropriate
- directory. Open a command-line prompt, and change to the
- src subdirectory of the Apache distribution.
The master Apache makefile instructions are contained in the
- Makefile.win file. To compile Apache on Windows, simply
- use one of the following commands:
-
nmake /f Makefile.win _apacher (release build)
-nmake /f Makefile.win _apached (debug build)
-These will both compile Apache. The latter will include debugging - information in the resulting files, making it easier to find bugs and - track down problems.
- -Apache can also be compiled using VC++'s Visual Studio development - environment. To simplify this process, a Visual Studio workspace, - Apache.dsw, is provided in the src folder. This workspace exposes - the entire list of working .dsp projects that are required for the - complete Apache binary release. It includes dependencies between - the projects to assure that they are built in the appropriate order.
- -Notice: The Apache/VisualStudio project files are distributed - in VisualStudio 6.0 (98) format. In fact you may build with - VisualStudio 5.0 (97) but you must first use the perl script command:
- -- cd src\helpers - cvstodsp5.pl -- -
Without running the script you will be able to load and build Apache,
- however VisualStudio 97 in particular will not recognize the /ZI flag
- to the C compiler for the debugging mode. This script toggles the
- new /ZI flag back to /Zi for Debug builds, among other adjustments.
- The converse script in src/helpers/dsp5tocvs.pl will
- reverse the adjustments, and we ask you to do so before submitting
- patches against any .dsp project files.
The Apache.dsw workspace and makefile.win nmake script both build the - .dsp projects of the Apache server in the following sequence:
- -lib\apr\aprlib.dsp
- lib\apr\aprlibdll.dsp requires aprlib
- lib\pcre\dftables.dsp
- lib\pcre\pcre.dsp requires dftables
- lib\pcre\pcreposix.dsp requires dftables and pcre
- lib\expat-lite\xmltok.dsp
- lib\expat-lite\xmlparse.dsp requires xmltok
- main\gen_uri_delims.dsp
- main\gen_test_char.dsp
- ApacheCore.dsp requires all of the above
- Apache.dsp requires ApacheCore and aprlibdll
-os\win32 subdirectory contains
- project files for the optional modules.
-
-os\win32\ApacheModuleAuthAnon.dsp
- os\win32\ApacheModuleAuthDigest.dsp
- os\win32\ApacheModuleCERNMeta.dsp
- os\win32\ApacheModuleExpires.dsp
- os\win32\ApacheModuleFileCache.dsp
- os\win32\ApacheModuleHeaders.dsp
- os\win32\ApacheModuleInfo.dsp
- os\win32\ApacheModuleRewrite.dsp
- os\win32\ApacheModuleSpeling.dsp
- os\win32\ApacheModuleStatus.dsp
- os\win32\ApacheModuleUserTrack.dsp
- modules\proxy\ApacheModuleProxy.dsp
-support\ folder contains project files for additional
- programs that are not part of the apache runtime, but are used by
- the administrator to test Apache and maintain password and log files.
-
-support\ab.dsp
- support\htdigest.dsp
- support\htpasswd.dsp
- support\logresolve.dsp
- support\rotatelogs.dsp
-Once Apache has been compiled, it needs to be installed in its server
- root directory. The default is the \Apache
- directory, on the current hard drive.
To build and install all the files into the desired folder dir - automatically, use one the following nmake commands: - -
nmake /f Makefile.win installr INSTDIR=dir
- (for release build)
- nmake /f Makefile.win installd INSTDIR=dir
- (for debug build)
-This will install the following:
- -dir\Apache.exe - Apache executable
- dir\aprlib.dll - Apache Portable Runtime shared library
- dir\ApacheCore.dll - Apache Core application
- dir\modules\ApacheModule*.dll - Loadable Apache
- modules
- dir\bin\*.exe - Administrator support executables
- dir\conf - Empty configuration directory
- dir\logs - Empty logging directory
-If you do not have nmake, or wish to install in a different directory, - be sure to use a similar naming scheme, or use the following shortcut.
- -To simplify the process, dependencies between all projects - are defined in the Microsoft VisualStudio workspace file: - -
- src/Apache.dsw -- -
This assures that lower-level sources are rebuilt from within - VisualStudio. The top level project is InstallBin, which invokes - Makefile.win to move the compiled executables and dlls. You may - personalize the INSTDIR= setting by changing the Settings for - InstallBin, Build command line entry under the General tab. - The default from within the InstallBin.dsp project is one level up - (..) from the src tree.
- -Warning about building Apache from the development tree
- -Only the .dsp files are distributed between release builds. The - .mak files are NOT regenerated, due to the tremendous waste of - reviewer's time. Therefore, you cannot rely on the NMAKE commands - above to build revised .dsp project files unless you then export - all .mak files yourself from the project. This is unnecessary if - you build from withing the Microsoft DeveloperStudio environment.
- -Before running the server you must fill out the conf directory. - Copy the *.conf-dist-win from the distribution conf directory - and rename *.conf. Edit the @@ServerRoot@@ entries to your - actual server root (for example "C:\apache"). Copy over - the conf/magic and conf/mime.types files as well.
- - - - diff --git a/docs/manual/platform/win_service.html b/docs/manual/platform/win_service.html deleted file mode 100644 index 6fb76bc9fdb..00000000000 --- a/docs/manual/platform/win_service.html +++ /dev/null @@ -1,325 +0,0 @@ - - - -Apache can be run as a service on Windows NT/2000. (There is also some - HIGHLY EXPERIMENTAL support for similar behavior on - Windows 95/98, introduced with Apache 1.3.13).
- -Installing Apache as a service should only be done once you can - successfully run it in a console window. See - Using Apache with Microsoft Windows - before you attempt to install or run Apache as a service. Changes to the - httpd.conf file should always be followed by starting Apache as a console - window. If this succeeds, the service should succeed.
- -NOTE: Prior to version 1.3.13, the configuration was not - tested prior to performing the installation, and a lack of - service dependencies often caused the console window to succeed, but the - service would still fail. See below if you are - having problems running a version of Apache prior to 1.3.13 to resolve the - issue. If you have this problem with version 1.3.13 or greater, first try - uninstalling (-u) and re-installing (-i) the Apache service.
- -To start Apache as a service, you first need to install it as a - service. Multiple Apache services can be installed, each with a - different name and configuration. To install the default Apache - service named "Apache", run the "Install Apache as Service (NT only)" - option from the Start menu. Once this is done you can start the "Apache" - service by opening the Services window (in the Control Panel), selecting - Apache, then clicking on Start. Apache will now be running, hidden in the - background. You can later stop Apache by clicking on Stop. As an - alternative to using the Services window, you can start and stop the - "Apache" service from the command line with
- -- NET START APACHE - NET STOP APACHE -- -
See Controlling Apache as a Service - for more information on installing and controlling Apache services.
- -Apache, unlike many other Windows NT/2000 services, logs any - errors to it's own error.log file in the logs folder within the - Apache server root folder. You will not find Apache error - details in the Windows NT Event Log.
- -After starting Apache as a service (or if you have trouble starting it) - you can test it using the same procedure - as for running in a console window. Remember to use the command:
- -- apache -n "service name" -- -
to assure you are using the service's configuration.
- - -Note: The -n option to specify a service name is only available - with Apache 1.3.7 and later. Earlier versions of Apache only - support the default service name 'Apache'.
- -You can install Apache as a Windows NT service as follows:
- -- apache -i -n "service name" -- -
To install a service to use a particular configuration, specify the - configuration file when the service is installed:
- -- apache -i -n "service name" -f "\my server\conf\my.conf" -- -
To remove an Apache service, use:
- -- apache -u -n "service name" -- -
The default "service name", if one is not specified, is "Apache".
- -Once a service is installed, you can use the -n option, in - conjunction with other options, to refer to a service's configuration file. - For example:
- -To test a service's configuration file:
-- apache -n "service name" -t -- -
To start a console Apache using a service's configuration file:
-- apache -n "service name" -- -
Prior to Apache release 1.3.13, the dependencies required to - successfully start an installed service were not configured. - After installing a service using earlier versions of Apache, - you must follow these steps: - -
- Run regedt32 - Select Window - "HKEY_LOCAL_MACHINE on Local Machine" from the menu - Double-click to open the SYSTEM, then the CurrentControlSet keys - Scroll down and click on the Apache servicename - Select Edit - Add Value... from the menu - Fill in the Add Value dialog with - Value Name: DependOnGroup - Data Type: REG_MULTI_SZ - and click OK - Leave the Multi-String Editor dialog empty and click OK - Select Edit - Add Value... from the menu - Fill in the Add Value dialog with - Value Name: DependOnService - Data Type: REG_MULTI_SZ - and click OK - Type the following list (one per line) in the Multi-String Editor dialog - Tcpip - Afd - and click OK -- -
If you are using COM or DCOM components from a third party module, ISAPI, - or other add-in scripting technologies such as ActiveState Perl, you may - also need to add the entry Rpcss to the DependOnService list. To avoid - exposing the TCP port 135 when it is unnecessary, Apache does not create - that entry upon installation. Follow the directions above to find or - create the DependOnService value, double click that value if it already - exists, and add the Rpcss entry to the list.
- - -When Apache is first installed as a service (e.g. with the -i option) - it will run as user "System" (the LocalSystem account). There should - be few issues if all resources for the web server reside on the local - system, but it has broad security privilages to affect the local machine!
- -- LocalSystem is a very privileged account locally, so - you shouldn't run any shareware applications there. - However, it has no network privileges and cannot leave - the machine via any NT-secured mechanism, including - file system, named pipes, DCOM, or secure RPC. -- -
NEVER grant network privilages to the SYSTEM account! - Create a new user account instead, grant the appropriate privilages to - that user, and use the the 'Log On As:' option. Select the Start Menu -> - Settings -> Control Panel -> Services -> apache service ... and click - the "Startup" button to access this setting.
- -- A service that runs in the context of the LocalSystem account - inherits the security context of the SCM. It is not associated with - any logged-on user account and does not have credentials (domain name, - user name, and password) to be used for verification. -- -
The SYSTEM account has no privilages to the network, so shared pages or - a shared installation of Apache is invisible to the service. If you intend - to use any network resources, the following steps should help:
- -If you allow the account to log in as a user, then you can log in yourself - and test that the account has the privilages to execute the scripts, read - the web pages, and that you can start Apache in a console window. If this - works, and you have followed the steps above, Apache should execute as - a service with no problems.
-Note: error code 2186 is a good indication that you need - to review the 'Log On As' configuration, since the server can't access a - required network resource.
- - -When starting Apache as a service you may encounter an error message from - Windows service manager. For example if you try to start Apache using the Services - applet in Windows Control Panel you may get the following message; -
- Could not start the apache service on \\COMPUTER - Error 1067; The process terminated unexpectedly. --
You will get this error if there is any problem starting Apache. In order to see - what is causing the problem you should follow the instructions - for Testing Apache at the Command Prompt.
- -Also, Apache 1.3.13 now records startup errors in the Application Event Log - under Windows NT/2000, if Apache is run as a service. Run the Event Viewer - and select Log ... Application to see these events. - -
Check the Application Event Log with the Event Viewer in case of any - problems, even if no error message pops up to warn you that an error - occured.
- -Multiple instances of Apache can be installed and run as services. Signal - an installed Apache service to start, restart, or shutdown/stop - as follows:
- -- apache -n "service name" -k start - apache -n "service name" -k restart - apache -n "service name" -k shutdown - apache -n "service name" -k stop -- -
For the default "Apache" service, the -n Apache option is still required, - since the -k commands without the -n option are directed at Apache running - in a console window. The quotes are only required if the service name - contains spaces.
- -Note: the -k stop alias for the -k shutdown command was introduced - in Apache version 1.3.13. Earlier versions of Apache will only - recognize the -k shutdown option. Prior to 1.3.3, Apache did not recognize - any -k options at all!
- -In addition, you can use the native NT NET command to - start and stop Apache services as follows:
- -- NET START "service name" - NET STOP "service name" -- -
Again, quotes are only required if the service name contains spaces.
- -Note: The service options for Windows 95 and 98 are only available - with Apache 1.3.13 and later. Earlier versions of Apache only - supported Apache in a console window for Windows 95/98.
- -There is some support for Apache on Windows 95/98 to behave in a similar - manner as a service on Windows NT/2000. It is highly experimental, - if it works (at all) the Apache Sofware Foundation will not attest to it's - reliability or future support. Proceed at your own risk!
- -Once you have confirmed that Apache runs correctly at the - Command Prompt you can install, control - and uninstall it with the same commands as the Windows NT/2000 version.
- -There are, however, significant differences that you should note:
- -Apache will attempt to start and if successful it will run in the - background. If you run the command - -
- Apache -n "service name" -k start -- - via a shortcut on your desktop, for example, then if the service starts - successfully a console window will flash up but immediately disappears. - If Apache detects any errors on startup such as a incorrect entries in the - httpd.conf file, then the console window will remain visible. This will - display an error message which will be useful in tracking down the cause of - the problem. - -
Windows 95/98 does not support NET START or NET STOP commands so you must - use Apache's Service Control options at a command prompt. You may wish to - set up a shortcut for each of these commands so that you can just choose - it from the start menu or desktop to perform the required action.
- -Apache and Windows 95/98 offer no support for running the Apache service - as a specific user with network privilages. In fact, Windows 95/98 offers - no security on the local machine, either. This is the simple reason that - the Apache Software Foundation never endorses the use of Windows 95/98 as a - public httpd server. These facilities exist only to assist the user in - developing web content and learning the Apache server, and perhaps as a - intranet server on a secured, private network.
- - - - diff --git a/docs/manual/platform/windows.html b/docs/manual/platform/windows.html deleted file mode 100644 index f7d5d6f884d..00000000000 --- a/docs/manual/platform/windows.html +++ /dev/null @@ -1,511 +0,0 @@ - - - -This document explains how to install, configure and run - Apache 2.0 under Microsoft Windows. If you find any bugs, or wish - to contribute in other ways, please use our - bug reporting page.
- -Most of this document assumes that you are installing Windows from a - binary distribution. If you want to compile Apache yourself (possibly - to help with development, or to track down bugs), see - Compiling Apache for Microsoft Windows. - -
Apache 2.0 is designed to run on Windows NT 4.0 and Windows 2000. The - binary installer will only work with the x86 family of processors, such - as Intel's. Apache may also run on Windows 95 and 98, but these have not - been tested, and are never recommended for production servers. In all - cases TCP/IP networking must be installed.
- -If running on Windows 95, the "Winsock2" upgrade MUST BE INSTALLED. - "Winsock2" for Windows 95 is available - here.
- -If running on NT 4.0, installing Service Pack 3 or 6 is recommended, as - Service Pack 4 created known issues with TCPIP/WinSock integrety that - were resolved in later Service Packs.
- -Warning: as of alpha 2.0a4 Windows 95 (and possibly 98) do not - run at all. Please don't let that stop you, however, from contributing - the fixes required to make that platform run successfully.
- -Information on the latest version of Apache can be found on the - Apache web server at - http://www.apache.org/httpd. This will list the current release, - any more recent alpha or beta-test releases, together with details of - mirror web and anonymous ftp sites.
- -You should download the version of Apache for Windows with the
- .exe extension. This is a single file containing Apache,
- ready to install and run. There may also be a .zip file
- containing the source code, to compile Apache yourself. (If there is
- no .zip file, the source will be available in a
- .tar.gz file but this will contain Unix line endings. You
- will have to convert at least the .mak and
- .dsp files to have DOS line endings before MSVC will
- understand them).
Notice: alpha versions are not distributed in binary form (as - an .exe ready-to-run version). You must use the Microsoft Visual C++ - compiler version 5 or 6 (bundled in VisualStudio 97 and 98). Read - Compiling Apache for Microsoft Windows - for compilation/installation instructions.
- -Run the Apache .exe file you downloaded above. This will - ask for:
- -\Program Files\Apache Group\Apache although you can
- change this to any other directory)
-
- During the installation, Apache will configure the files in the - conf directory for your chosen installation - directory. However if any of the files in this directory already exist - they will not be overwritten. Instead the new copy of - the corresponding file will be left with the extension - .default. So, for example, if - conf\httpd.conf already exists it will not be altered, - but the version which would have been installed will be left in - conf\httpd.conf.default. After the installation has - finished you should manually check to see what in new in the - .default file, and if necessary update your existing - configuration files.
- -Also, if you already have a file called htdocs\index.html - then it will not be overwritten (no index.html.default - file will be installed either). This should mean it a safe to install - Apache over an existing installation (but you will have to stop the - existing server running before doing the installation, then start the - new one after the installation is finished).
- -After installing Apache, you should edit the configuration files in - the conf directory as required. These files will be - configured during the install ready for Apache to be run from the - directory where it was installed, with the documents served from the - subdirectory htdocs. There are lots of other options - which should be set before you start really using Apache. However to - get started quickly the files should work as installed.
- -To run Apache from a console window, select the "Start Apache as - console app" option from the Start menu (in Apache 1.3.4 and earlier, - this option was called "Apache Server"). This will open a console - window and start Apache running inside it. The window will remain - active until you stop Apache. To stop Apache running, either select - the "Shutdown Apache console app" icon option from the Start menu - (this is not available in Apache 1.3.4 or earlier), or see Signalling Console Apache when Running for how - to control Apache from the command line.
- -If the Apache console window closes immediately (or unexpectedly), - run the "Command Prompt" from the Start Menu - Programs list. Change - to the folder to which you installed Apache, type the command apache, - and read the error message. Then change to the logs folder, and review - the error.log file for configuration mistakes. If you accepted the - defaults when you installed Apache, the commands would be:
- -- c: - cd "\program files\apache group\apache" - apache - Wait for Apache to exit, or press Ctrl+C - cd logs - more <error.log -- -
Complete the steps above before you proceed to attempt to - start Apache as a Window NT/2000 service!
- -To start Apache as a service, you first need to install it as a - service. Multiple Apache services can be installed, each with a - different name and configuration. To install the default Apache - service named "Apache", run the "Install Apache as Service (NT only)" - option from the Start menu. Once this is done you can start the "Apache" - service by opening the Services window (in the Control Panel), selecting Apache, - then clicking on Start. Apache will now be running in the background. You - can later stop Apache by clicking on Stop. As an alternative to using - the Services window, you can start and stop the "Apache" service from the control - line with:
- -- NET START APACHE - NET STOP APACHE -- -
See Signalling Service Apache when Running - for more information on installing and controlling Apache services.
- -Apache, unlike many other Windows NT/2000 services, logs any - errors to it's own error.log file in the logs folder within the - Apache server root folder. You will not find Apache error - details in the Windows NT Event Log.
- -After starting Apache running (either in a console window or as a - service) if will be listening to port 80 (unless you changed the - Port, Listen or BindAddress - directives in the configuration files). To connect to the server and - access the default page, launch a browser and enter this URL:
- -- http://localhost/ -- -
This should respond with a welcome page, and a link to the Apache - manual. If nothing happens or you get an error, look in the - error_log file in the logs directory. - If your host isn't connected to the net, you may have to use - this URL:
- -- http://127.0.0.1/ -- -
Once your basic installation is working, you should configure it - properly by editing the files in the conf directory. - Again, if you change the configuration of the Windows NT/2000 - service for Apache, first attempt to start it from the command - line to assure that the service starts with no errors.
- -Because Apache
Apache is configured by files in the conf - directory. These are the same as files used to configure the Unix - version, but there are a few different directives for Apache on - Windows. See the Apache documentation for all the - available directives.
- -The main differences in Apache for Windows are:
- -Because Apache for Windows is multithreaded, it does not use a - separate process for each request, as Apache does with - Unix. Instead there are usually only two Apache processes running: - a parent process, and a child which handles the requests. Within - the child each request is handled by a separate thread. -
- - So the "process"-management directives are different: -
MaxRequestsPerChild
- - Like the Unix directive, this controls how many requests a
- process will serve before exiting. However, unlike Unix, a
- process serves all the requests at once, not just one, so if
- this is set, it is recommended that a very high number is
- used. The recommended default, MaxRequestsPerChild
- 0, does not cause the process to ever exit.
-
- Warning: The server configuration file is reread when the
- new child process is started. If you have modified httpd.conf,
- the new child may not start or you may receive unexpected results.
-
-
ThreadsPerChild -
- This directive is new, and tells the server how many threads it
- should use. This is the maximum number of connections the server
- can handle at once; be sure and set this number high enough for
- your site if you get a lot of hits. The recommended default is
- ThreadsPerChild 50.
The directives that accept filenames as arguments now must use - Windows filenames instead of Unix ones. However, because Apache - uses Unix-style names internally, you must use forward slashes, not - backslashes. Drive letters can be used; if omitted, the drive with - the Apache executable will be assumed.
-Apache for Windows contains the ability to load modules at runtime,
- without recompiling the server. If Apache is compiled normally, it
- will install a number of optional modules in the
- \Apache\modules directory. To activate these, or other
- modules, the new LoadModule
- directive must be used. For example, to active the status module,
- use the following (in addition to the status-activating directives
- in access.conf):
- LoadModule status_module modules/ApacheModuleStatus.dll --
Information on creating loadable - modules is also available.
-Apache can also load ISAPI Extensions (i.e., Internet Server
- Applications), such as those used by Microsoft's IIS, and other
- Windows servers. More information
- is available. Note that Apache
Note: The -n option to specify a service name is only available - with Apache 1.3.7 and later. Earlier versions of Apache only support - the default service name 'Apache'.
- -You can install Apache as a Windows NT service as follows: - -
- apache -k install -n "service name" -- - To install a service to use a particular configuration, specify the - configuration file when the service is installed: - -
- apache -k install -n "service name" -f "\my server\conf\my.conf" -- - To remove an Apache service, use - -
- apache -k uninstall -n "service name" -- - The default "service name", if one is not specified, is "Apache". - -
Once a service is installed, you can use the -n option, in - conjunction with other options, to refer to a service's configuration - file. For example:
- -To test a service's configuration file:
- -- apache -n "service name" -t -- -
To start a console Apache using a service's configuration file:
- -- apache -n "service name" -- -
Important Note on service dependencies:
- -Prior to Apache release 1.3.13, the dependencies required to - successfully start an installed service were not configured. - After installing a service using earlier versions of Apache, - you must follow these steps: - -
- Run regedt32 - Select Window - "HKEY_LOCAL_MACHINE on Local Machine" from the menu - Double-click to open the SYSTEM, then the CurrentControlSet keys - Scroll down and click on the Apache servicename - Select Edit - Add Value... from the menu - Fill in the Add Value dialog with - Value Name: DependOnGroup - Data Type: REG_MULTI_SZ - and click OK - Leave the Multi-String Editor dialog empty and click OK - Select Edit - Add Value... from the menu - Fill in the Add Value dialog with - Value Name: DependOnService - Data Type: REG_MULTI_SZ - and click OK - Type the following list (one per line) in the Multi-String Editor dialog - Tcpip - Afd - and click OK -- -
If you are using COM or DCOM components from a third party module, ISAPI, - or other add-in scripting technologies such as ActiveState Perl, you may - also need to add the entry Rpcss to the DependOnService list. To avoid - exposing the TCP port 135 when it is unnecessary, Apache does not create - that entry upon installation. Follow the directions above to find or - create the DependOnService value, double click that value if it already - exists, and add the Rpcss entry to the list.
- -The Start menu icons and the NT Service manager can provide a simple - interface for administering Apache. But in some cases it is easier to - work from the command line.
- -When working with Apache it is important to know how it will find the - configuration files. You can specify a configuration file on the command line - in two ways: - -
apache -f "c:\my server\conf\my.conf"-
apache -f test\test.conf-
apache -n "service name"- - In these cases, the proper ServerRoot should be set in the configuration file. - -
If you don't specify a configuration file name with -f or -n, Apache will - use the file name compiled into the server, usually "conf/httpd.conf". Invoking - Apache with the -V switch will display this value labeled as SERVER_CONFIG_FILE. - Apache will then determine its ServerRoot by trying the following, in this order:
- -The server root compiled into the server is usually "/apache". - invoking apache with the -V switch will display this value - labeled as HTTPD_ROOT.
- -When invoked from the start menu, Apache is usually passed no arguments, - so using the registry entry is the preferred technique for console Apache.
- -During a binary installation, a version-specific registry key is created - in the Windows registry: - -
- HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3.7 - - HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\2.0a3 -- -
This key is compiled into the server and can enable you to test - new versions without affecting the current version. Of course - you must take care not to install the new version on top of the - old version in the file system.
- -If you did not do a binary install then Apache will in some - scenarios complain that about the missing registry key. This - warning can be ignored if it otherwise was able to find its - configuration files.
- -The value of this key is the "ServerRoot" directory, containing the - conf directory. When Apache starts it will read the - httpd.conf file from this directory. If this file - contains a ServerRoot directive which is different from - the directory obtained from the registry key above, Apache will forget - the registry key and use the directory from the configuration file. - If you copy the Apache directory or configuration files to a new - location it is vital that you update the ServerRoot - directory in the httpd.conf file to the new location. - -
To run Apache from the command line as a console application, use the - following command: - -
- apache -- - Apache will execute, and will remain running until it is stopped by pressing - control-C. - -
On Windows NT, multiple instances of Apache can be run as services. - Signal an Apache service to start, restart, or shutdown as follows:
- -- apache -n "service name" -k start - apache -n "service name" -k restart - apache -n "service name" -k shutdown -- -
In addition, you can use the native NT NET command to - start and stop Apache services as follows:
- -- NET START "service name" - NET STOP "service name" -- -
On Windows 95, Apache runs as a console application. You can tell a - running Apache to stop by opening another console window and typing:
- -- apache -k shutdown -- -
This should be used instead of pressing Control-C in the running - Apache console window, because it lets Apache end any current - transactions and cleanup gracefully.
- -You can also tell Apache to restart. This makes it re-read the - configuration files. Any transactions in progress are allowed to - complete without interruption. To restart Apache, run
- -- apache -k restart -- -
Note for people familiar with the Unix version of Apache: these
- commands provide a Windows equivalent to kill -TERM
- pid and kill -USR1 pid. The command
- line option used, -k, was chosen as a reminder of the
- "kill" command used on Unix.
<Directory>, <Location> and <Files> can contain
-directives which only apply to specified directories, URLs or files
-respectively. Also htaccess files can be used inside a directory to
-apply directives to that directory. This document explains how these
-different sections differ and how they relate to each other when
-Apache decides which directives apply for a particular directory or
-request URL.
-
-<Directory> is also allowed in
-<Location> (except a sub-<Files>
-section). Semantically however some things, and the most
-notable are AllowOverride and the two options
-FollowSymLinks and SymLinksIfOwnerMatch,
-make no sense in <Location>,
-<LocationMatch> or <DirectoryMatch>.
-The same for <Files> -- syntactically everything
-is fine, but semantically some things are different.
-
-<Directory> (except regular expressions) and
- .htaccess done simultaneously (with .htaccess overriding
- <Directory>)
-
-<DirectoryMatch>, and
- <Directory> with regular expressions
-
-<Files> and <FilesMatch> done
- simultaneously
- <Location> and <LocationMatch> done
- simultaneously
- <Directory>, each group is processed in
-the order that they appear in the configuration
-files. <Directory> (group 1 above) is processed in
-the order shortest directory component to longest. If multiple
-<Directory> sections apply to the same directory
-they they are processed in the configuration file order. The
-configuration files are read in the order httpd.conf, srm.conf and
-access.conf. Configurations included via the Include
-directive will be treated as if they were inside the including file
-at the location of the Include directive.
-
-
-
-Sections inside <VirtualHost> sections are applied
-after the corresponding sections outside the virtual host
-definition. This allows virtual hosts to override the main server
-configuration. (Note: this only works correctly from 1.2.2 and 1.3a2
-onwards. Before those releases sections inside virtual hosts were
-applied before the main server).
-
-
- -
<Directory> and/or
- <Files>.
-<Location>
-<Directory>. This is
- a legacy mistake because the proxy existed prior to
- <Location>. A future version of the config
- language should probably switch this to
- <Location>.
--Note about .htaccess parsing: -
-
-<Location> and symbolic links:
-
Options FollowSymLinks"
- or "Options SymLinksIfOwnerMatch" inside a
- <Location>, <LocationMatch>
- or <DirectoryMatch> section
- (the options are simply ignored).
- Using the options in question is only possible inside a
- <Directory> section (or a .htaccess file).
-
-<Files> and Options:
-
Options
- directive inside a <Files> section has no effect.
--Another note: -
- -<Location>/<LocationMatch>
- sequence performed just before the name translation phase (where
- Aliases and DocumentRoots are used to
- map URLs to filenames). The results of this sequence are
- completely thrown away after the translation has completed.
-This document explains some of the directives provided by the -core server which are used to configure -the basic operations of the server.
- -|
-Related Directives - -ServerName -ServerAdmin -ServerSignature -ServerTokens -UseCanonicalName - |
The ServerAdmin and ServerTokens
-directives control what information about the server will be presented
-in server-generated documents such as error messages.
-The ServerTokens directive sets the value of the
-Server HTTP response header field.
The ServerName and UseCanonicalName
-directives are used by the server to determine how to construct
-self-referential URLs. For example, when a client requests a
-directory, but does not include the trailing slash in the directory
-name, Apache must redirect the client to the full name including the
-trailing slash so that the client will correctly resolve relative
-references in the document.
|
-Related Directives - -CoreDumpDirectory -DocumentRoot -ErrorLog -Lockfile -PidFile -ScoreBoardFile -ServerRoot - |
These directives control the locations of the various files that
-Apache needs for proper operation. When the pathname used does not
-begin with a slash "/", the files are located relative to the
-ServerRoot. Be careful about locating files in paths
-which are writable by non-root users. See the security tips documentation for
-more details.
|
-Related Directives - -BS2000Account -Group -MaxClients -MaxRequestsPerChild -MaxSpareServers -MinSpareServers -ServerType -StartServers -ThreadsPerChild -User - |
When ServerType is set to its recommended value of
-Standalone, Apache 1.3 for Unix is a pre-forking web
-server. A single control process is responsible for launching child
-processes which listen for connections and serve them when they
-arrive. Apache always tries to maintain several spare or
-idle server processes, which stand ready to serve incoming requests.
-In this way, clients do not need to wait for a new child processes to
-be forked before their requests can be served.
The StartServers, MinSpareServers,
-MaxSpareServers, and MaxServers regulate how
-the parent process creates children to serve requests. In general,
-Apache is very self-regulating, so most sites do not need to adjust
-these directives from their default values. Sites which need to serve
-more than 256 simultaneous requests may need to increase
-MaxClients, while sites with limited memory may need to
-decrease MaxClients to keep the server from thrashing
-(swapping memory to disk and back). More information about tuning
-process creation is provided in the performance hints documentation.
While the parent process is usually started as root under Unix
-in order to bind to port 80, the child processes are launched
-by Apache as a less-privileged user. The User and
-Group directives are used to set the privileges
-of the Apache child processes. The child processes must
-be able to read all the content that will be served, but
-should have as few privileges beyond that as possible.
-In addition, unless suexec is used,
-these directives also set the privileges which will be inherited
-by CGI scripts.
MaxRequestsPerChild controls how frequently the server
-recycles processes by killing old ones and launching new ones.
Under Windows, Apache launches one control process and one
-child process. The child process creates multiple threads to
-serve requests. The number of threads is controlled by the
-ThreadsPerChild directive.
|
-Related Directives - -BindAddress -KeepAlive -KeepAliveTimeout -Listen -ListenBackLog -MaxKeepAliveRequests -Port -SendBufferSize -TimeOut - |
When Apache starts, it connects to some port and address on the
-local machine and waits for incoming requests. By default, it listens
-to all addresses on the machine, and to the port as specified by the
-Port directive in the server configuration. However, it
-can be told to listen to more than one port, to listen to only
-selected addresses, or a combination. This is often combined with the
-Virtual Host feature which determines how Apache
-responds to different IP addresses, hostnames and ports.
There are two directives used to restrict or specify which addresses
-and ports Apache listens to. The BindAddress directive
-is used to restrict the server to listening to a single IP address.
-The Listen directive can be used to specify multiple
-IP addresses and/or Ports to which Apache will listen.
The ListenBackLog, SendBufferSize, and
-TimeOut directives are used to adjust how Apache
-interacts with the network.
The KeepAlive, KeepAliveTimeout,
-and MaxKeepAliveRequests directives are used to
-configure how Apache handles persistent connections.
|
-Related Directives - -LimitRequestBody -LimitRequestFields -LimitRequestFieldsize -LimitRequestLine -RLimitCPU -RLimitMEM -RLimitNPROC -ThreadStackSize - |
The LimitRequest* directives are used to place limits
-on the amount of resources Apache will use in reading requests
-from clients. By limiting these values, some kinds of denial
-of service attacks can be mitigated.
The RLimit* directives are used to limit the amount
-of resources which can be used by processes forked off from
-the Apache children. In particular, this will control
-resources used by CGI scripts and SSI exec commands.
The ThreadStackSize directive is used only
-on Netware to control the stack size.
This document covers stopping and restarting Apache on Unix -only. Windows users should see Signalling -Apache when running.
- -You will notice many httpd executables running on your system,
-but you should not send signals to any of them except the parent, whose
-pid is in the PidFile. That is to
-say you shouldn't ever need to send signals to any process except the
-parent. There are three signals that you can send the parent:
-TERM, HUP, and USR1, which will
-be described in a moment.
-
-
To send a signal to the parent you should issue a command such as: -
- -You can read about its progress by issuing: - -- kill -TERM `cat /usr/local/apache/logs/httpd.pid` -
- -Modify those examples to match your -ServerRoot and -PidFile settings. - -- tail -f /usr/local/apache/logs/error_log -
As of Apache 1.3 we provide a script src/support/apachectl
-which can be used to start, stop, and restart Apache. It may need a
-little customization for your system, see the comments at the top of
-the script.
-
-
Sending the TERM signal to the parent causes it to
-immediately attempt to kill off all of its children. It may take it
-several seconds to complete killing off its children. Then the
-parent itself exits. Any requests in progress are terminated, and no
-further requests are served.
-
-
Sending the HUP signal to the parent causes it to kill off
-its children like in TERM but the parent doesn't exit. It
-re-reads its configuration files, and re-opens any log files.
-Then it spawns a new set of children and continues
-serving hits.
-
-
Users of the
-status module
-will notice that the server statistics are
-set to zero when a HUP is sent.
-
-
Note: If your configuration file has errors in it when -you issue a -restart then your parent will not restart, it will exit with an error. -See below for a method of avoiding this. - -
Note: prior to release 1.2b9 this code is quite unstable -and shouldn't be used at all. - -
The USR1 signal causes the parent process to advise
-the children to exit after their current request (or to exit immediately
-if they're not serving anything). The parent re-reads its configuration
-files and re-opens its log files. As each child dies off the parent
-replaces it with a child from the new generation of the
-configuration, which begins serving new requests immediately.
-
-
This code is designed to always respect the -MaxClients, -MinSpareServers, -and MaxSpareServers settings. -Furthermore, it respects StartServers -in the following manner: if after one second at least StartServers new -children have not been created, then create enough to pick up the slack. -This is to say that the code tries to maintain both the number of children -appropriate for the current load on the server, and respect your wishes -with the StartServers parameter. - -
Users of the
-status module
-will notice that the server statistics
-are not set to zero when a USR1 is sent. The
-code
-was written to both minimize the time in which the server is unable to serve
-new requests (they will be queued up by the operating system, so they're
-not lost in any event) and to respect your tuning parameters. In order
-to do this it has to keep the scoreboard used to keep track
-of all children across generations.
-
-
The status module will also use a G to indicate those
-children which are still serving requests started before the graceful
-restart was given.
-
-
At present there is no way for a log rotation script using
-USR1 to know for certain that all children writing the
-pre-restart log have finished. We suggest that you use a suitable delay
-after sending the USR1 signal before you do anything with the
-old log. For example if most of your hits take less than 10 minutes to
-complete for users on low bandwidth links then you could wait 15 minutes
-before doing anything with the old log.
-
-
Note: If your configuration file has errors in it when
-you issue a
-restart then your parent will not restart, it will exit with an error.
-In the case of graceful
-restarts it will also leave children running when it exits. (These are
-the children which are "gracefully exiting" by handling their last request.)
-This will cause problems if you attempt to restart the server -- it will
-not be able to bind to its listening ports. Before doing a restart, you
-can check the syntax of the configuration files with the -t
-command line argument (see Starting
-Apache). This still will not guarantee that the server will restart
-correctly. To check the semantics of the configuration files as well
-as the syntax, you can try starting httpd as a non-root user. If
-there are no errors it will attempt to open its sockets and logs and
-fail because it's not root (or because the currently running httpd
-already has those ports bound). If it fails for any other reason then
-it's probably a config file error and the error should be fixed before
-issuing the graceful restart.
-
-
-
Prior to Apache 1.2b9 there were several race conditions -involving the restart and die signals (a simple description of race -condition is: a time-sensitive problem, as in if something happens at just -the wrong time it won't behave as expected). For those architectures that -have the "right" feature set we have eliminated as many as we can. -But it should be noted that there still do exist race conditions on -certain architectures. - -
Architectures that use an on disk
-ScoreBoardFile
-have the potential to corrupt their scoreboards. This can result in
-the "bind: Address already in use" (after HUP) or
-"long lost child came home!" (after USR1). The former is
-a fatal error, while the latter just causes the server to lose a scoreboard
-slot. So it might be advisable to use graceful restarts, with
-an occasional hard restart. These problems are very difficult to work
-around, but fortunately most architectures do not require a scoreboard file.
-See the ScoreBoardFile documentation for a method to determine if your
-architecture uses it.
-
-
NEXT and MACHTEN (68k only) have small race
-conditions
-which can cause a restart/die signal to be lost, but should not cause the
-server to do anything otherwise problematic.
-
-
-
All architectures have a small race condition in each child involving -the second and subsequent requests on a persistent HTTP connection -(KeepAlive). It may exit after reading the request line but before -reading any of the request headers. There is a fix that was discovered -too late to make 1.2. In theory this isn't an issue because the KeepAlive -client has to expect these events because of network latencies and -server timeouts. In practice it doesn't seem to affect anything either --- in a test case the server was restarted twenty times per second and -clients successfully browsed the site without getting broken images or -empty documents. - - - - diff --git a/docs/manual/suexec.html.en b/docs/manual/suexec.html.en deleted file mode 100644 index 3d8623df04e..00000000000 --- a/docs/manual/suexec.html.en +++ /dev/null @@ -1,518 +0,0 @@ - - -
--
-The suEXEC feature -- introduced in Apache 1.2 -- provides -Apache users the ability to run CGI and SSI -programs under user IDs different from the user ID of the calling web-server. -Normally, when a CGI or SSI program executes, it runs as the same user who is -running the web server. -
- --Used properly, this feature can reduce considerably the security risks involved -with allowing users to develop and run private CGI or SSI programs. However, -if suEXEC is improperly configured, it can cause any number of problems and -possibly create new holes in your computer's security. If you aren't familiar -with managing setuid root programs and the security issues they present, we -highly recommend that you not consider using suEXEC. -
- - - --Before jumping head-first into this document, you should be aware of the -assumptions made on the part of the Apache Group and this document. -
- --First, it is assumed that you are using a UNIX derivate operating system that -is capable of setuid and setgid operations. -All command examples are given in this regard. Other platforms, if they are -capable of supporting suEXEC, may differ in their configuration. -
- --Second, it is assumed you are familiar with some basic concepts of your -computer's security and its administration. This involves an understanding -of setuid/setgid operations and the various effects they -may have on your system and its level of security. -
- --Third, it is assumed that you are using an unmodified -version of suEXEC code. All code for suEXEC has been carefully scrutinized and -tested by the developers as well as numerous beta testers. Every precaution -has been taken to ensure a simple yet solidly safe base of code. Altering this -code can cause unexpected problems and new security risks. It is -highly recommended you not alter the suEXEC code unless you -are well versed in the particulars of security programming and are willing to -share your work with the Apache Group for consideration. -
- --Fourth, and last, it has been the decision of the Apache Group to -NOT make suEXEC part of the default installation of Apache. -To this end, suEXEC configuration requires of the administrator careful -attention to details. After due consideration has been given to the various -settings for suEXEC, the administrator may install suEXEC through normal -installation methods. The values for these settings need to be carefully -determined and specified by the administrator to properly maintain system -security during the use of suEXEC functionality. It is through this detailed -process that the Apache Group hopes to limit suEXEC installation only to those -who are careful and determined enough to use it. -
- --Still with us? Yes? Good. Let's move on! -
- - - --Before we begin configuring and installing suEXEC, we will first discuss -the security model you are about to implement. By doing so, you may -better understand what exactly is going on inside suEXEC and what precautions -are taken to ensure your system's security. -
- --suEXEC is based on a setuid "wrapper" program that is -called by the main Apache web server. This wrapper is called when an HTTP -request is made for a CGI or SSI program that the administrator has designated -to run as a userid other than that of the main server. When such a request -is made, Apache provides the suEXEC wrapper with the program's name and the -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: -
- 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. --
- This is to ensure that the user executing the wrapper is truly a user of the - system. --
- 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 contain a leading '/' or have a '..' backreference? - These are not allowed; the target program must reside within the Apache - webspace. --
- Does the target user exist? --
- Does the target group exist? --
- Presently, suEXEC does not allow 'root' to execute CGI/SSI programs. --
- 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. --
- Presently, suEXEC does not allow the 'root' group to execute CGI/SSI - programs. --
- 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. --
- 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. --
- If it doesn't exist, it can't very well contain files. --
- 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? --
- We don't want to open up the directory to others; only the owner user - may be able - to alter this directories contents. --
- If it doesn't exists, it can't very well be executed. --
- We don't want to give anyone other than the owner the ability to - change the program. --
- We do not want to execute programs that will then change our UID/GID again. --
- Is the user the owner of the file? --
- 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). --
- Here is where suEXEC ends and the target program begins. --
-This is the standard operation of the the suEXEC wrapper's security model. -It is somewhat stringent and can impose new limitations and guidelines for -CGI/SSI design, but it was developed carefully step-by-step with security -in mind. -
- --For more information as to how this security model can limit your possibilities -in regards to server configuration, as well as what security risks can be -avoided with a proper suEXEC setup, see the -"Beware the Jabberwock" -section of this document. -
- - - -
-Here's where we begin the fun. If you use Apache 1.2 or prefer to configure
-Apache 1.3 with the "src/Configure" script you have to edit
-the suEXEC header file and install the binary in its proper location
-manually. This procedure is described in an
-extra document.
-The following sections describe the configuration and installation
-for Apache 1.3 with the AutoConf-style interface (APACI).
-
-APACI's suEXEC configuration options
-
--enable-suexec
---suexec-caller=UID
---suexec-docroot=DIR
---datadir=/home/apache" the directory
- "/home/apache/htdocs" is used as document root for
- the suEXEC wrapper.
---suexec-logfile=FILE
---suexec-userdir=DIR
---suexec-uidmin=UID
---suexec-gidmin=GID
---suexec-safepath=PATH
-
-Checking your suEXEC setup
-Before you compile and install the suEXEC wrapper you can check
-the configuration with the --layout option.
-
-Example output:
-
- suEXEC setup: - suexec binary: /usr/local/apache/sbin/suexec - document root: /usr/local/apache/share/htdocs - userdir suffix: public_html - logfile: /usr/local/apache/var/log/suexec_log - safe path: /usr/local/bin:/usr/bin:/bin - caller ID: www - minimum user ID: 100 - minimum group ID: 100 -- - -
-Compiling and installing the suEXEC wrapper
-If you have enabled the suEXEC feature with the --enable-suexec option
-the suexec binary (together with Apache itself) is automatically built
-if you execute the command "make".
-
-After all components have been built you can execute the command
-"make install" to install them.
-The binary image "suexec" is installed in the directory defined by
-the --sbindir option. Default location is "/usr/local/apache/sbin/suexec".
-
-Please note that you need root privileges for
-the installation step. In order for the wrapper to set the user ID, it
-must be installed as owner root and must have the
-setuserid execution bit set for file modes.
-
-Upon startup of Apache, it looks for the file "suexec" in the "sbin" -directory (default is "/usr/local/apache/sbin/suexec"). -If Apache finds a properly configured suEXEC wrapper, it will print -the following message to the error log: -
- [notice] suEXEC mechanism enabled (wrapper: /path/to/suexec) --If you don't see this message at server startup, the server is most -likely not finding the wrapper program where it expects it, or the -executable is not installed setuid root. -
-Virtual Hosts:
-One way to use the suEXEC wrapper is through the
-User and
-Group directives in
-VirtualHost
-definitions. By setting these directives to values different from the
-main server user ID, all requests for CGI resources will be executed as
-the User and Group defined for that
-<VirtualHost>. If only one or
-neither of these directives are specified for a
-<VirtualHost> then the main
-server userid is assumed.
-
-User directories:
-The suEXEC wrapper can also be used to execute CGI programs as
-the user to which the request is being directed. This is accomplished by
-using the "~" character prefixing the user
-ID for whom execution is desired.
-The only requirement needed for this feature to work is for CGI
-execution to be enabled for the user and that the script must meet the
-scrutiny of the security checks above.
-
-
-The suEXEC wrapper will write log information to the file defined -with the --suexec-logfile option as indicated above. If you feel you have -configured and installed the wrapper properly, have a look at this log -and the error_log for the server to see where you may have gone astray. -
- - - --NOTE! This section may not be complete. For the latest -revision of this section of the documentation, see the Apache Group's -Online Documentation -version. -
- --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. -
- 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.) --
- 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. --
- Again, this can cause Big Trouble if you try - this without knowing what you are doing. Stay away from it - if at all possible. --
In order to assist folks upgrading, we maintain a document
-describing information critical to existing Apache users. These are
-intended to be brief notes, and you should be able to find more
-information in either the New
-Features document, or in the src/CHANGES file.
-
-
autoconf and libtool
-system for configuring the build processes. Using this system
-is similar to, but not the same as, using the APACI system in
-Apache 1.3. Further documentation to follow.CacheNegotiatedDocs directive now takes
-the argument on or off. Existing
-instances of CacheNegotiatedDocs should be replaced
-with CachNegotiatedDocs on.ErrorDocument directive no longer uses a single
-quote at the beginning of the argument to indicate a text message.
-Instead, you should enclose the message in double quotes. For
-example, existing instances of ErrorDocument 403 "Some
-Message should be replaced with ErrorDocument 403 "Some
-Message". As long as the second argument is not a valid URL or
-pathname, it will be treated as a text message.AccessConfig and ResourceConfig
-directives no longer exist. Existing instances of these directives
-can be replaced with the Include directive which
-has equivalent functionality. If you were making use of the
-default values of these directives without including them in
-the configuration files, you may need to add
-Include conf/access.conf and Include conf/srm.conf
-to your httpd.conf.ExtendedStatus directive no longer exists.ServerType directive no longer exists.CoreDumpDirectory directive no longer exists.Extensive changes were made to the server API in Apache 2.0. -Existing modules designed for the Apache 1.3 API will not -work in Apache 2.0 without modification. Details to follow. - - - - diff --git a/docs/manual/vhosts/fd-limits.html.en b/docs/manual/vhosts/fd-limits.html.en deleted file mode 100644 index 6b9d0f93c46..00000000000 --- a/docs/manual/vhosts/fd-limits.html.en +++ /dev/null @@ -1,59 +0,0 @@ - - -
--When using a large number of Virtual Hosts, Apache may run out of available -file descriptors (sometimes called file handles if each Virtual -Host specifies different log files. -The total number of file descriptors used by Apache is one for each distinct -error log file, one for every other log file directive, plus 10-20 for -internal use. Unix operating systems limit the number of file descriptors that -may be used by a process; the limit is typically 64, and may usually be -increased up to a large hard-limit. -
-Although Apache attempts to increase the limit as required, this -may not work if: -
-#!/bin/sh
-ulimit -S -n 100
-exec httpd
--Please see the -Descriptors and Apache -document containing further details about file descriptor problems and how -they can be solved on your operating system. -
- - - - diff --git a/docs/manual/vhosts/index.html.en b/docs/manual/vhosts/index.html.en deleted file mode 100644 index bb4a0f89312..00000000000 --- a/docs/manual/vhosts/index.html.en +++ /dev/null @@ -1,65 +0,0 @@ - - - -The term Virtual Host refers to the practice of maintaining -more than one server on one machine, as differentiated by their apparent -hostname. For example, it is often desirable for companies sharing a -web server to have their own domains, with web servers accessible as -www.company1.com and www.company2.com, -without requiring the user to know any extra path information.
- -Apache was one of the first servers to support IP-based -virtual hosts right out of the box. Versions 1.1 and later of -Apache support both, IP-based and name-based virtual hosts (vhosts). -The latter variant of virtual hosts is sometimes also called host-based or -non-IP virtual hosts.
- -Below is a list of documentation pages which explain all details -of virtual host support in Apache version 1.3 and later.
- -Folks trying to debug their virtual host configuration may find the
-Apache -S command line switch useful. It will dump out a
-description of how Apache parsed the configuration file. Careful
-examination of the IP addresses and server names may help uncover
-configuration mistakes.
-
-
-
-
diff --git a/docs/manual/vhosts/name-based.html.en b/docs/manual/vhosts/name-based.html.en
deleted file mode 100644
index 1d834f29893..00000000000
--- a/docs/manual/vhosts/name-based.html.en
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
Early versions of HTTP (like many other protocols, e.g. FTP) -required a different IP address for each virtual host on the server. -On some platforms this can limit the number of virtual hosts you can -run, and because there are concerns about the availability of IP -addresses it is strongly discouraged by the registraries (ARIN, RIPE, -and APNIC).
- -The HTTP/1.1 protocol, and a common extension to
-HTTP/1.0, includes a method for the server to identify
-what name it is being addressed as. Apache 1.1 and later support this
-approach as well as the old IP-address-per-hostname method.
The benefits of using the name-based virtual hosts is a practically -unlimited number of servers, ease of configuration and use, and it -requires no additional hardware or software. The main disadvantage is -that the client must support this part of the protocol. Almost all -browsers do, but there are still tiny numbers of very old browsers in -use which do not. This can cause problems, although a possible -solution is addressed below.
- -Using name-based virtual hosts is quite easy, and superficially looks
-like the old method. The notable difference between IP-based and
-name-based virtual host configuration is the
-NameVirtualHost
-directive which specifies an IP address that should be used as a
-target for name-based virtual hosts, or the wildcard * to
-indicate that the server only does name-based virtual hosting (no
-IP-based virtual hosting).
For example, suppose that both www.domain.tld and
-www.otherdomain.tld point at the IP address of your
-server. Then you simply add to one of the Apache configuration files
-(most likely httpd.conf or srm.conf) code
-similar to the following:
- NameVirtualHost * - - <VirtualHost *> - ServerName www.domain.tld - DocumentRoot /www/domain - </VirtualHost> - - <VirtualHost *> - ServerName www.otherdomain.tld - DocumentRoot /www/otherdomain - </VirtualHost> -- -
Of course, any additional directives can (and should) be placed
-into the <VirtualHost> section. To make this work,
-all that is needed is to make sure that the names
-www.domain.tld and www.otherdomain.tld
-are pointing to the right IP address.
-
-
Note: When you specify an IP address in a NameVirtualHost
-directive then requests to that IP address will only ever be served
-by matching <VirtualHost>s. The "main server" will
-never be served from the specified IP address.
-If you specify a wildcard then the "main server" isn't used at all.
-If you start to use virtual hosts you should stop using the "main server"
-as an independent server and rather use it as a place for
-configuration directives that are common for all your virtual hosts.
-In other words, you should add a <VirtualHost> section for
-every server (hostname) you want to maintain on your server.
-
-
Additionally, many servers may wish to be accessible by more than
-one name. For example, the example server might want to be accessible
-as domain.tld, or www2.domain.tld, assuming
-the IP addresses pointed to the same server. In fact, one might want it
-so that all addresses at domain.tld were picked up by the
-server. This is possible with the
-ServerAlias
-directive, placed inside the <VirtualHost> section. For
-example:
- ServerAlias domain.tld *.domain.tld -- -
Note that you can use * and ? as wild-card
-characters.
You also might need ServerAlias if you are
-serving local users who do not always include the domain name.
-For example, if local users are
-familiar with typing "www" or "www.foobar" then you will need to add
-ServerAlias www www.foobar. It isn't possible for the
-server to know what domain the client uses for their name resolution
-because the client doesn't provide that information in the request.
-The ServerAlias directive is generally a way to have different
-hostnames pointing to the same virtual host.
-
As mentioned earlier, there are still some clients in use who -do not send the required data for the name-based virtual hosts to work -properly. These clients will always be sent the pages from the -first virtual host listed for that IP address (the -primary name-based virtual host).
- -There is a possible workaround with the
-ServerPath
-directive, albeit a slightly cumbersome one:
Example configuration: - -
- NameVirtualHost 111.22.33.44 - - <VirtualHost 111.22.33.44> - ServerName www.domain.tld - ServerPath /domain - DocumentRoot /web/domain - </VirtualHost> -- -
What does this mean? It means that a request for any URI beginning
-with "/domain" will be served from the virtual host
-www.domain.tld This means that the pages can be accessed as
-http://www.domain.tld/domain/ for all clients, although
-clients sending a Host: header can also access it as
-http://www.domain.tld/.
In order to make this work, put a link on your primary virtual host's page -to http://www.domain.tld/domain/ -Then, in the virtual host's pages, be sure to use either purely -relative links (e.g., "file.html" or -"../icons/image.gif" or links containing the prefacing -/domain/ -(e.g., "http://www.domain.tld/domain/misc/file.html" or -"/domain/misc/file.html").
- -This requires a bit of -discipline, but adherence to these guidelines will, for the most part, -ensure that your pages will work with all browsers, new and old.
- -See also: ServerPath configuration -example
- - - - diff --git a/httpd.dsp b/httpd.dsp deleted file mode 100644 index bbf11f72d5e..00000000000 --- a/httpd.dsp +++ /dev/null @@ -1,553 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ApacheCore" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=ApacheCore - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ApacheCore.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ApacheCore.mak" CFG="ApacheCore - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ApacheCore - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "ApacheCore - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe - -!IF "$(CFG)" == "ApacheCore - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "LibR" -# PROP BASE Intermediate_Dir "LibR" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "LibR" -# PROP Intermediate_Dir "LibR" -# PROP Target_Dir "" -RSC=rc.exe -# ADD BASE RSC /l 0x409 -# ADD RSC /l 0x409 -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /I ".\modules\mpm\winnt" /I ".\lib\expat-lite" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "ApacheCore - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "LibD" -# PROP BASE Intermediate_Dir "LibD" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "LibD" -# PROP Intermediate_Dir "LibD" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -RSC=rc.exe -# ADD BASE RSC /l 0x409 -# ADD RSC /l 0x409 -# ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c -# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /I ".\modules\mpm\winnt" /I ".\lib\expat-lite" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "ApacheCore - Win32 Release" -# Name "ApacheCore - Win32 Debug" -# Begin Group "Configuration" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" -# Begin Source File - -SOURCE=.\include\ap_config.h -# End Source File -# Begin Source File - -SOURCE=.\include\ap_mmn.h -# End Source File -# Begin Source File - -SOURCE=.\ApacheCore.def -# PROP Exclude_From_Build 1 -# End Source File -# Begin Source File - -SOURCE=.\buildmark.c -# End Source File -# Begin Source File - -SOURCE=.\include\http_conf_globals.h -# End Source File -# Begin Source File - -SOURCE=.\os\win32\modules.c -# End Source File -# Begin Source File - -SOURCE=.\os\win32\os.h -# End Source File -# End Group -# Begin Group "Generated Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\main\gen_test_char.exe - -!IF "$(CFG)" == "ApacheCore - Win32 Release" - -# Begin Custom Build - Generating test_char.h -InputPath=.\main\gen_test_char.exe - -".\main\test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - .\main\gen_test_char.exe >.\main\test_char.h - echo Generated test_char.h from gen_test_char.exe - -# End Custom Build - -!ELSEIF "$(CFG)" == "ApacheCore - Win32 Debug" - -# Begin Custom Build - Generating test_char.h -InputPath=.\main\gen_test_char.exe - -".\main\test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - .\main\gen_test_char.exe >.\main\test_char.h - echo Generated test_char.h from gen_test_char.exe - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\main\gen_uri_delims.exe - -!IF "$(CFG)" == "ApacheCore - Win32 Release" - -# Begin Custom Build - Generating uri_delims.h -InputPath=.\main\gen_uri_delims.exe - -".\main\uri_delims.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - .\main\gen_uri_delims.exe >.\main\uri_delims.h - echo Generated uri_delims.h from gen_uri_delims.exe - -# End Custom Build - -!ELSEIF "$(CFG)" == "ApacheCore - Win32 Debug" - -# Begin Custom Build - Generating uri_delims.h -InputPath=.\main\gen_uri_delims.exe - -".\main\uri_delims.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - .\main\gen_uri_delims.exe >.\main\uri_delims.h - echo Generated uri_delims.h from gen_uri_delims.exe - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\main\test_char.h -# End Source File -# Begin Source File - -SOURCE=.\main\uri_delims.h -# End Source File -# End Group -# Begin Group "ap_buckets" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\ap\ap_buckets.c -# End Source File -# Begin Source File - -SOURCE=.\include\ap_buckets.h -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_buckets_eos.c -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_buckets_file.c -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_buckets_flush.c -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_buckets_heap.c -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_buckets_pipe.c -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_buckets_pool.c -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_buckets_refcount.c -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_buckets_simple.c -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_buckets_socket.c -# End Source File -# End Group -# Begin Group "ap_general" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\ap\ap_base64.c -# End Source File -# Begin Source File - -SOURCE=.\include\ap_base64.h -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_hooks.c -# End Source File -# Begin Source File - -SOURCE=.\include\ap_hooks.h -# End Source File -# Begin Source File - -SOURCE=.\include\ap_ring.h -# End Source File -# Begin Source File - -SOURCE=.\ap\ap_sha1.c -# End Source File -# Begin Source File - -SOURCE=.\include\ap_sha1.h -# End Source File -# End Group -# Begin Group "httpd" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\main\http_config.c -# End Source File -# Begin Source File - -SOURCE=.\include\http_config.h -# End Source File -# Begin Source File - -SOURCE=.\main\http_connection.c -# End Source File -# Begin Source File - -SOURCE=.\include\http_connection.h -# End Source File -# Begin Source File - -SOURCE=.\main\http_core.c -# End Source File -# Begin Source File - -SOURCE=.\include\http_core.h -# End Source File -# Begin Source File - -SOURCE=.\main\http_log.c -# End Source File -# Begin Source File - -SOURCE=.\include\http_log.h -# End Source File -# Begin Source File - -SOURCE=.\include\http_main.h -# End Source File -# Begin Source File - -SOURCE=.\main\http_protocol.c -# End Source File -# Begin Source File - -SOURCE=.\include\http_protocol.h -# End Source File -# Begin Source File - -SOURCE=.\main\http_request.c -# End Source File -# Begin Source File - -SOURCE=.\include\http_request.h -# End Source File -# Begin Source File - -SOURCE=.\main\http_vhost.c -# End Source File -# Begin Source File - -SOURCE=.\include\http_vhost.h -# End Source File -# Begin Source File - -SOURCE=.\include\httpd.h -# End Source File -# End Group -# Begin Group "modules" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\modules\standard\mod_access.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_actions.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_alias.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_asis.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_auth.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_autoindex.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_cgi.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_dir.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_env.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_imap.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_include.c -# End Source File -# Begin Source File - -SOURCE=.\os\win32\mod_isapi.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_log_config.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_mime.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_negotiation.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_setenvif.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_so.c -# End Source File -# Begin Source File - -SOURCE=.\modules\standard\mod_userdir.c -# End Source File -# End Group -# Begin Group "util" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\main\buff.c -# End Source File -# Begin Source File - -SOURCE=.\include\buff.h -# End Source File -# Begin Source File - -SOURCE=.\main\rfc1413.c -# End Source File -# Begin Source File - -SOURCE=.\include\rfc1413.h -# End Source File -# Begin Source File - -SOURCE=.\main\util.c -# End Source File -# Begin Source File - -SOURCE=.\main\util_cfgtree.c -# End Source File -# Begin Source File - -SOURCE=.\include\util_cfgtree.h -# End Source File -# Begin Source File - -SOURCE=.\include\util_charset.h -# End Source File -# Begin Source File - -SOURCE=.\main\util_date.c -# End Source File -# Begin Source File - -SOURCE=.\include\util_date.h -# End Source File -# Begin Source File - -SOURCE=.\include\util_ebcdic.h -# End Source File -# Begin Source File - -SOURCE=.\main\util_filter.c -# End Source File -# Begin Source File - -SOURCE=.\include\util_filter.h -# End Source File -# Begin Source File - -SOURCE=.\main\util_md5.c -# End Source File -# Begin Source File - -SOURCE=.\include\util_md5.h -# End Source File -# Begin Source File - -SOURCE=.\main\util_script.c -# End Source File -# Begin Source File - -SOURCE=.\include\util_script.h -# End Source File -# Begin Source File - -SOURCE=.\main\util_uri.c -# End Source File -# Begin Source File - -SOURCE=.\include\util_uri.h -# End Source File -# Begin Source File - -SOURCE=.\os\win32\util_win32.c -# End Source File -# Begin Source File - -SOURCE=.\main\util_xml.c -# End Source File -# Begin Source File - -SOURCE=.\include\util_xml.h -# End Source File -# End Group -# Begin Group "mpm_winnt" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\include\ap_listen.h -# End Source File -# Begin Source File - -SOURCE=.\include\ap_mpm.h -# End Source File -# Begin Source File - -SOURCE=.\main\listen.c -# End Source File -# Begin Source File - -SOURCE=.\modules\mpm\winnt\mpm.h -# End Source File -# Begin Source File - -SOURCE=.\include\mpm_common.h -# End Source File -# Begin Source File - -SOURCE=.\modules\mpm\winnt\mpm_default.h -# End Source File -# Begin Source File - -SOURCE=.\include\mpm_status.h -# End Source File -# Begin Source File - -SOURCE=.\modules\mpm\winnt\mpm_winnt.c -# End Source File -# Begin Source File - -SOURCE=.\modules\mpm\winnt\mpm_winnt.h -# End Source File -# Begin Source File - -SOURCE=.\modules\mpm\winnt\registry.c -# End Source File -# Begin Source File - -SOURCE=.\modules\mpm\winnt\service.c -# End Source File -# End Group -# End Target -# End Project diff --git a/libhttpd.def b/libhttpd.def deleted file mode 100644 index 0d2eb756859..00000000000 --- a/libhttpd.def +++ /dev/null @@ -1,440 +0,0 @@ -; apachecore.def : - -LIBRARY ApacheCore -DESCRIPTION '' - -EXPORTS - ; Add new API calls to the end of this list. - - - - - ap_add_cgi_vars - ap_add_common_vars - ap_add_loaded_module - ap_add_module - ap_add_named_module - ap_add_per_dir_conf - ap_add_per_url_conf - ap_add_version_component - ap_allow_options - ap_allow_overrides - - - ap_auth_name - ap_auth_type - ap_basic_http_header - ap_bclose - ap_bcreate - ap_bfilbuf - - ap_bflsbuf - ap_bflush - ap_bgetopt - ap_bgets - - - ap_blookc - - ap_bonerror - - - ap_bputs - - ap_bsetflag - ap_bsetopt - - - - - - - - ap_cfg_closefile - ap_cfg_getc - ap_cfg_getline - ap_chdir_file - - ap_check_cmd_context - ap_checkmask - - ap_clear_module_list - - - ap_close_piped_log - ap_construct_server - ap_construct_url - ap_content_type_tolower - - - ap_core_translate - ap_count_dirs - - ap_create_environment - - ap_create_per_dir_config - ap_custom_response - ap_default_port_for_request - ap_default_port_for_scheme - ap_default_type - - - ap_destroy_sub_req - ap_die - ap_discard_request_body - ap_document_root - - ap_error_log2stderr - ap_escape_html - ap_escape_path_segment - ap_escape_quotes - ap_escape_shell_cmd - - ap_finalize_request_protocol - ap_find_command - ap_find_command_in_modules - ap_find_last_token - ap_find_linked_module - ap_find_module_name - ap_find_path_info - ap_find_token - ap_get_basic_auth_pw - ap_get_client_block - - ap_get_limit_req_body - ap_get_remote_host - ap_get_remote_logname - ap_get_server_built - ap_get_server_name - ap_get_server_port - ap_get_server_version - - ap_get_token - ap_getparents - ap_getword - ap_getword_conf - ap_getword_conf_nc - ap_getword_nc - ap_getword_nulls - ap_getword_nulls_nc - ap_getword_white - ap_getword_white_nc - - ap_gname2id - - - ap_ht_time - ap_ind - ap_index_of_response - ap_init_virtual_host - ap_internal_redirect - ap_internal_redirect_handler - ap_is_directory - - ap_is_initial_req - ap_is_matchexp - ap_is_url - - - - - ap_log_assert - - - - - - ap_make_dirstr_parent - ap_make_dirstr_prefix - ap_make_full_path - - - ap_matches_request_vhost - ap_md5 - ap_md5_binary - ap_md5contextTo64 - ap_md5digest - ap_meets_conditions - ap_no2slash - ap_note_auth_failure - ap_note_basic_auth_failure - - - - - ap_note_digest_auth_failure - - - ap_open_piped_log - ap_os_canonical_filename - ap_os_case_canonical_filename - ap_os_escape_path - - - ap_parseHTTPdate - ap_parse_hostinfo_components - ap_parse_uri - ap_parse_uri_components - - ap_pcfg_open_custom - ap_pcfg_openfile - - - - - ap_pduphostent - - - - ap_pgethostbyname - - - ap_pregcomp - ap_pregfree - ap_pregsub - ap_psignature - - - - - - ap_rationalize_mtime - - - ap_remove_loaded_module - ap_remove_module - ap_requires - - ap_rflush - ap_rind - ap_rputc - ap_rputs - - ap_run_sub_req - ap_rwrite - ap_satisfies - ap_scan_script_header_err - - ap_scan_script_header_err_core - ap_scan_script_header_err_strs - - ap_send_fd - - ap_send_http_header - ap_send_http_trace - - ap_send_size - ap_server_root_relative - - ap_set_content_length - ap_set_etag - ap_set_keepalive - ap_set_last_modified - ap_setup_client_block - ap_should_client_block - - ap_some_auth_required - - - ap_str_tolower - ap_strcasecmp_match - ap_strcmp_match - ap_sub_req_lookup_file - ap_sub_req_lookup_uri - - - - - - - - - - - ap_uname2id - - ap_unescape_url - ap_unparse_uri_components - ap_update_mtime - - - ap_vbprintf - - - - - - - - - regcomp - regexec - regfree - access_module - alias_module - ap_bprintf - ap_bputstrs - - - ap_limit_section - ap_loaded_modules - ap_log_error - - ap_log_rerror - - - - - - ap_rprintf - ap_rvputs - - - ap_server_argv0 - ap_server_root - ap_set_file_slot - ap_set_flag_slot - ap_set_string_slot - ap_set_string_slot_lower - - - - - asis_module - auth_module - autoindex_module - - config_log_module - core_module - dir_module - env_module - imap_module - - mime_module - negotiation_module - - setenvif_module - - top_module - - ap_method_number_of - ap_exists_config_define - ap_single_module_configure - ap_make_etag - - - ap_find_list_item - - - ap_size_list_item - ap_get_list_item - - ap_get_status_line - - - - - - - - - - - - ap_sub_req_method_uri - ap_regerror - ap_regexec - ap_field_noparam - ap_pbase64decode - ap_pbase64encode - ap_base64encode - ap_base64encode_binary - ap_base64encode_len - ap_base64decode - ap_base64decode_binary - ap_base64decode_len - ap_SHA1Init - ap_SHA1Update_binary - ap_SHA1Update - ap_SHA1Final - ap_sha1_base64 - ap_show_hook - ap_hook_sort_register - ap_hook_process_connection - ap_process_http_connection - ap_hook_check_user_id - ap_hook_auth_checker - ap_hook_fixups - regerror - ap_send_error_response - ap_start_shutdown - - ap_read_config - ap_server_pre_read_config - ap_server_post_read_config - ap_setup_prelinked_modules - - - - - ap_debug_module_hooks - ap_debug_module_name - ap_global_hook_pool - ap_hook_pre_connection - ap_hook_post_read_request - ap_hook_log_transaction - ap_hook_http_method - ap_hook_default_port - ap_hook_translate_name - ap_hook_type_checker - ap_hook_access_checker - ap_hook_header_parser - ap_hook_post_config - ap_hook_open_logs - ap_hook_child_init - - ap_get_status_table - ap_run_default_port - ap_run_http_method - ap_bread_core - ap_bwrite_core - ap_vbputstrs - -; Exclusively provided for http_main.c - ap_register_hooks - ap_prelinked_modules - ap_preloaded_modules - ap_post_config_hook - ap_run_pre_config - ap_run_rewrite_args - ap_show_directives - ap_show_modules - ap_util_uri_init - ap_mpm_run - ap_hook_deregister_all - ap_run_open_logs - ap_process_config_tree - ap_server_config_defines - ap_sort_hooks - ap_fini_vhost_config - ap_fixup_virtual_hosts - ap_conftree - -; -; util_xml.h - ap_text_append - ap_xml_parse_input - ap_xml_to_text - ap_xml_empty_elem - ap_xml_quote_string - ap_xml_quote_elem - ap_xml_insert_uri -; -; buckets - ap_bucket_create_transient - ap_bucket_split_shared - ap_bucket_make_shared - ap_bucket_destroy_shared - ap_bucket_create_pool - - ap_os_create_privileged_process diff --git a/libhttpd.dsp b/libhttpd.dsp deleted file mode 100644 index 78c38706033..00000000000 --- a/libhttpd.dsp +++ /dev/null @@ -1,100 +0,0 @@ -# Microsoft Developer Studio Project File - Name="ApacheCoreDll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=ApacheCoreDll - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "ApacheCoreDll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ApacheCoreDll.mak" CFG="ApacheCoreDll - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ApacheCoreDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "ApacheCoreDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "ApacheCoreDll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir ".\CoreR" -# PROP BASE Intermediate_Dir ".\CoreR" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\CoreR" -# PROP Intermediate_Dir ".\CoreR" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /map /machine:I386 /base:@"os\win32\BaseAddr.ref",ApacheCore -# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /map /machine:I386 /out:".\CoreR/ApacheCore.dll" /base:@"os\win32\BaseAddr.ref",ApacheCore - -!ELSEIF "$(CFG)" == "ApacheCoreDll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir ".\CoreD" -# PROP BASE Intermediate_Dir ".\CoreD" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir ".\CoreD" -# PROP Intermediate_Dir ".\CoreD" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /GX /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /ZI /c -# ADD CPP /nologo /MDd /W3 /GX /Od /I ".\include" /I ".\lib\apr\include" /I ".\os\win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /FD /ZI /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "_DEBUG" /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /map /debug /machine:I386 /base:@"os\win32\BaseAddr.ref",ApacheCore -# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /map /debug /machine:I386 /out:".\CoreD/ApacheCore.dll" /base:@"os\win32\BaseAddr.ref",ApacheCore - -!ENDIF - -# Begin Target - -# Name "ApacheCoreDll - Win32 Release" -# Name "ApacheCoreDll - Win32 Debug" -# Begin Source File - -SOURCE=.\os\win32\ApacheCore.c -# End Source File -# Begin Source File - -SOURCE=.\ApacheCore.def -# End Source File -# End Target -# End Project diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c deleted file mode 100644 index bc2f3b9ab45..00000000000 --- a/modules/arch/win32/mod_isapi.c +++ /dev/null @@ -1,1294 +0,0 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - *