A resource may be available in several different
representations. For example, it might be available in
@@ -109,7 +109,7 @@ Accept: text/html; q=1.0, text/*; q=0.8, image/gif; q=0.6, image/jpeg; q=0.6, im
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
@@ -125,7 +125,7 @@ Accept: text/html; q=1.0, text/*; q=0.8, image/gif; q=0.6, image/jpeg; q=0.6, im
results.
-
A type map is a document which is associated with the handler
named type-map (or, for backwards-compatibility with
@@ -237,7 +237,7 @@ Content-type: text/plain; qs=0.01
typemap documentation.
After httpd has obtained a list of the variants for a given
resource, either from a type-map file or from the filenames in
@@ -309,7 +309,7 @@ Content-type: text/plain; qs=0.01
variant selection algorithm' defined in RFC 2296.
-
httpd can use the following algorithm to select the 'best'
variant (if any) to return to the browser. This algorithm is
@@ -443,8 +443,8 @@ Content-type: text/plain; qs=0.01
httpd sometimes changes the quality values from what would
be expected by a strict interpretation of the httpd
@@ -456,7 +456,7 @@ Content-type: text/plain; qs=0.01
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
@@ -495,7 +495,7 @@ Content-type: text/plain; qs=0.01
send the explicit information to start with work as expected.
New in httpd 2.0, some exceptions have been added to the
negotiation algorithm to allow graceful fallback when language
@@ -553,8 +553,8 @@ Header append Vary cookie
httpd extends the transparent content negotiation protocol (RFC
2295) as follows. A new {encoding ..} element is used in
@@ -567,7 +567,7 @@ header. The RVSA/1.0 implementation does not round computed quality
factors to 5 decimal places before choosing the best variant.
If you are using language negotiation you can choose between
different naming conventions, because files can have more than
@@ -677,7 +677,7 @@ factors to 5 decimal places before choosing the best variant.
When a cache stores a representation, it associates it with
the request URL. The next time that URL is requested, the cache
@@ -713,7 +713,7 @@ factors to 5 decimal places before choosing the best variant.
Custom error documents are configured using the ErrorDocument directive,
which may be used in global,
@@ -93,7 +93,7 @@ ErrorDocument 401 /subscription/how_to_subscribe.html
Redirecting to another URL can be useful, but only if some
information can be passed which can then be used to explain or log
@@ -138,7 +138,7 @@ REDIRECT_URL=/cgi-bin/buggy.pl
as the server).
If you point your ErrorDocument to some variety of
dynamic handler such as a server-side include document, CGI
@@ -171,7 +171,7 @@ printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
Provided with your installation of the Apache HTTP Server is a
directory of custom error documents translated into 16 different
@@ -211,7 +211,7 @@ printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
tr
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
@@ -170,7 +170,7 @@
as above.
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
@@ -269,13 +269,13 @@
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.
The request_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
@@ -386,7 +386,7 @@ void *request_config; /* Notes on *this* request */
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
@@ -526,8 +526,8 @@ void *request_config; /* Notes on *this* request */
not response handlers will lead to serious confusion).
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
@@ -562,7 +562,7 @@ void *request_config; /* Notes on *this* request */
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
@@ -667,8 +667,8 @@ void *request_config; /* Notes on *this* request */
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
@@ -788,7 +788,7 @@ void *request_config; /* Notes on *this* request */
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 ap_pfopen, which takes a
@@ -878,7 +878,7 @@ void *request_config; /* Notes on *this* request */
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
@@ -922,7 +922,7 @@ void *request_config; /* Notes on *this* request */
similar problems come up, by tying those structures to the per-transaction
resource pool.
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
@@ -1024,7 +1024,7 @@ void *request_config; /* Notes on *this* request */
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
@@ -1177,8 +1177,8 @@ void *request_config; /* Notes on *this* request */
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
@@ -1220,7 +1220,7 @@ void *request_config; /* Notes on *this* request */
This is actually rather simple in theory, but the code is
complex. First of all, it is important that everybody realize that
there are three filter lists for each request, but they are all
@@ -180,14 +180,14 @@ Default_handler --> sub_request_core
The final topic. :-) Mod_Asis is a bit of a hack, but the
handler needs to remove all filters except for connection filters, and
send the data. If you are using mod_asis, all other
bets are off.
The absolutely last point is that the reason this code was so hard to
get right, was because we had hacked so much to force it to work. I
wrote most of the hacks originally, so I am very much to blame.
@@ -209,7 +209,7 @@ Default_handler --> sub_request_core
The httpd's core modules offer a predefinined list of hooks
used during the standard request processing
phase. Creating a new hook will expose a function that
@@ -59,11 +59,11 @@
Use the AP_DECLARE_HOOK macro, which needs to be given
the return type of the hook function, the name of the hook, and the
arguments. For example, if the hook returns an int and
@@ -76,7 +76,7 @@
they want to use the hook.
Each source file that exports a hook has a private structure
which is used to record the module functions that use the hook.
This is declared as follows:
The source file that exports the hook has to implement a
function that will call the hook. There are currently three
possible ways to do this. In all cases, the calling function is
@@ -142,7 +142,7 @@
-
In the example above, we didn't use the three arguments in
the hook registration function that control calling order of
all the functions registered within the hook.
@@ -236,7 +236,7 @@ mode MODULE_VAR_EXPORT my_module =
This document will discuss several cases where mod_lua can be used
to either ease up a phase of the request processing or create more transparency in
@@ -56,7 +56,7 @@ the logic behind a decision made in a phase.
-
First and foremost, you are expected to have a basic knowledge of how the Lua
programming language works. In most cases, we will try to be as pedagogical
@@ -70,7 +70,7 @@ and whys of various function calls.
As with simple and advanced rewriting, you can use mod_lua for dynamically
assigning a hostname to a specific document root, much like
@@ -335,7 +335,7 @@ end
With the authorization hooks, you can add custom auth phases to your request
processing, allowing you to either add new requirements that were not previously
@@ -449,7 +449,7 @@ end
If you require even more advanced control over your authorization phases,
you can add custom authz providers to help you manage your server. The
@@ -496,7 +496,7 @@ end
This is an example of how you can create a load balancing mechanism.
In this example, we will be setting/getting the number of requests served
@@ -547,7 +547,7 @@ end
This document will discuss how you can create modules for the Apache
HTTP Server 2.4, by exploring an example module called
@@ -61,7 +61,7 @@ writes out its own configuration to the client.
First and foremost, you are expected to have a basic knowledge of how the C
programming language works. In most cases, we will try to be as pedagogical
@@ -77,7 +77,7 @@ Apache if you do not have them already, as these are needed for compiling
new modules.
When handling requests in Apache HTTP Server 2.4, the first thing you will need to do is
create a hook into the request handling process. A hook is essentially a
@@ -182,7 +182,7 @@ check for this handler tag relayed by AddHandler and reply to
the server based on the value of this tag.
To begin with, we only want to create a simple handler that replies to the
client browser when a specific URL is requested, so we won't bother setting
@@ -231,7 +231,7 @@ The example_handler reference is the function that will handle
the request. We will discuss how to create a handler in the next chapter.
Hooking into the request handling phase is but one of many hooks that you
can create. Some other ways of hooking are:
@@ -249,7 +249,7 @@ can create. Some other ways of hooking are:
A handler is essentially a function that receives a callback when a request
to the server is made. It is passed a record of the current request (how it was
@@ -257,8 +257,8 @@ made, which headers and requests were passed along, who's giving the
request and so on), and is put in charge of either telling the server that it's
not interested in the request or handle the request with the tools provided.
The most essential part of any request is the request record
. In a call to a handler function, this is represented by the
request_rec* structure passed along with every call that is made.
@@ -363,7 +363,7 @@ Let's try out some of these variables in another example handler:
-
Apache relies on return values from handlers to signify whether a request
was handled or not, and if so, whether the request went well or not. If a
@@ -412,7 +412,7 @@ the next, without informing other handlers.
-
Managing your resources in Apache HTTP Server 2.4 is quite easy, thanks to the memory pool
system. In essence, each server, connection and request have their own
@@ -531,7 +531,7 @@ on a per-process based level.
In our example module, we would like to add a feature, that checks which
type of digest, MD5 or SHA1 the client would like to see. This could be
@@ -586,7 +586,7 @@ would have to resort to a few more lines, as outlined in thi
Now that we have learned how to parse form data and manage our resources,
we can move on to creating an advanced version of our module, that spits
@@ -714,7 +714,7 @@ This version in its entirety can be found here:
In this next segment of this document, we will turn our eyes away from the
digest module and create a new example module, whose only function is to
@@ -723,8 +723,8 @@ the server works with configuration, and what happens when you start writing
advanced configurations
for your modules.
If you are reading this, then you probably already know
what a configuration directive is. Simply put, a directive is a way of
@@ -740,7 +740,7 @@ Each of these configuration directives are handled by a separate function,
that parses the parameters given and sets up a configuration accordingly.
What if we want to change our configuration, not by hard-coding new values
into the module, but by using either the httpd.conf file or possibly a
@@ -884,7 +884,7 @@ omitted, as the function for verifying arguments might as well be used to
set them.)
Now that we have told the server to expect some directives for our module, it's
time to make a few functions for handling these. What the server reads in the
@@ -927,7 +927,7 @@ const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, cons
-
Now that we have our directives set up, and handlers configured for them,
we can assemble our module into one big file:
@@ -1069,8 +1069,8 @@ configuration file.
In Apache HTTP Server 2.4, different URLs, virtual hosts, directories etc can have very
different meanings to the user of the server, and thus different contexts
@@ -1118,7 +1118,7 @@ specific context.
In this chapter, we will be working with a slightly modified version of
our previous context structure. We will set a context
variable that we can use to track which context configuration is being
@@ -1154,7 +1154,7 @@ used by the server in various places:
-
Before we can start making our module context aware, we must first define,
which contexts we will accept. As we saw in the previous chapter, defining
@@ -1186,7 +1186,7 @@ restrictions together to form a specific rule:
-
A much smarter way to manage your configurations is by letting the server
help you create them. To do so, we must first start off by changing our
name tag to let the server know, that it should assist us in creating
@@ -1213,7 +1213,7 @@ per-directory creator and merger function reference in our tag:
Now that we have told the server to help us create and manage configurations,
our first step is to make a function for creating new, blank
@@ -1238,7 +1238,7 @@ our name tag as the Per-directory configuration handler:
Our next step in creating a context aware configuration is merging
configurations. This part of the process particularly applies to scenarios
@@ -1292,7 +1292,7 @@ two configurations and decide how they are to be merged:
Now, let's try putting it all together to create a new module that is
context aware. First off, we'll create a configuration that lets us test
@@ -1557,7 +1557,7 @@ void *merge_dir_conf(apr_pool_t *pool, void *BASE, void *ADD)
We have now looked at how to create simple modules for Apache HTTP Server 2.4 and
configuring them. What you do next is entirely up to you, but it is my
@@ -1568,9 +1568,9 @@ or check out the rest of our documentation for further tips.
These now need to be of type apr_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
@@ -47,7 +47,7 @@
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
@@ -61,7 +61,7 @@
-
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).
@@ -127,7 +127,7 @@
position HOOK_LAST.
In addition to the existing regexp wrapper, a new higher-level API
ap_rxplus is now provided. This provides the capability to
@@ -86,30 +86,30 @@
backreferences is also added.
The function signature for ap_parse_htaccess has been
changed. A apr_table_t of individual directives allowed
for override must now be passed (override remains).
Introduces a commit_entity() function to the cache provider
interface, allowing atomic writes to cache. Add a cache_status()
@@ -232,13 +232,13 @@
removed.
Changes the disk format of the disk cache to support atomic cache
updates without locking. The device/inode pair of the body file is
@@ -246,21 +246,21 @@
and body belong to one another.
ap_get_scoreboard_worker is made non-backwards-compatible
as an alternative version is introduced. Additional proxy_balancer
support. Child status stuff revamped.
In order to take advantage of per-module loglevel configuration, any
source file that calls the ap_log_* functions should declare
@@ -400,7 +400,7 @@
instructed to add it back if necessary for problem diagnosis.)
The r1833875 change is a good
example to show what buffering and keeping state means in the context of an
@@ -560,7 +560,7 @@ chunk_size = (speed / (1000 / RATE_INTERVAL_MS));
The complete request processing cycle involves the following hooks,
listed in execution order. Hooks marked with (request.c) are
implemented in server/request.c; others are declared
@@ -117,10 +117,10 @@
override apr_stat() calls.
The quick_handler hook runs before any other
request processing hooks — before location walks, directory walks,
access checking, and authentication. It provides a fast path for
@@ -177,7 +177,7 @@
Return DECLINED to fall through to normal processing.
Called when a new request_rec is created (for main
requests, subrequests, and internal redirects). Modules use this hook
to initialize per-request module state and set up private data
@@ -193,9 +193,9 @@
mod_firehose
Runs before URL decoding happens. Modules can manipulate the
raw URI before it is translated to a filesystem path. This is
useful for modules that need to operate on the URI before
@@ -212,7 +212,7 @@
Modules can determine the file name, or alter the given URI
in this step. For example, mod_vhost_alias will
translate the URI's path into the configured virtual host,
@@ -228,7 +228,7 @@
After the file or correct URI was determined, the
appropriate per-dir configurations are merged together. For
example, mod_proxy compares and merges the appropriate
@@ -250,7 +250,7 @@
to the translated URI.
This hook fires immediately after per-directory configuration has been
merged (after both map_to_storage and the second location
walk). Modules can use it to act on the fully-merged per-directory
@@ -264,14 +264,14 @@
error status code to abort.
The main request then parses the client's headers. This
prepares the remaining request processing steps to better serve
the client's request. This hook only runs for the initial
request (not subrequests).
The security phase in 2.4+ uses the "new" provider-based
authentication/authorization architecture managed by
mod_auth_basic, mod_authz_core,
@@ -281,7 +281,7 @@
Parses any tokens in the request (e.g. bearer tokens, API keys)
that contain metadata such as user identities or IP addresses
relevant to the request. Runs before the access checker.
Applies additional access control to the resource. This hook runs
before a user is authenticated, so it is for restrictions
independent of user identity (e.g. IP-based access, time-of-day
@@ -311,7 +311,7 @@
Return OK to allow, or an HTTP error status to deny.
Extended access control that runs after access_checker
but before user authentication. This hook can also bypass
authentication entirely by returning OK — used by
@@ -327,7 +327,7 @@
require authentication, or an HTTP error status to deny.
Allows a module to force authentication to be required even when
access_checker_ex has already granted access. This is
useful when a module needs the authenticated user identity for
@@ -340,7 +340,7 @@
DECLINED to let later modules decide.
Authenticates the user — analyzes the request headers, validates
credentials, and sets r->user and
r->ap_auth_type. This hook only runs when Apache
@@ -353,7 +353,7 @@
rather than hooking check_user_id directly.
Checks whether the authenticated user (r->user)
is authorized to access this resource. Runs after
check_user_id, and only when a Require directive is
@@ -367,8 +367,8 @@
The modules have an opportunity to test the URI or filename
against the target resource, and set mime information for the
request. Both mod_mime and
@@ -386,7 +386,7 @@
automatically.
Many modules are "trounced" by some phase above. The fixups
phase is used by modules to reassert their ownership or force
the request's fields to their appropriate values. It is the last
@@ -401,13 +401,13 @@
This phase is not part of the processing in
ap_process_request_internal(). After the core or a module
calls ap_process_request_internal(), it then calls
ap_invoke_handler() to generate the request.
Modules that transform the content in some way can insert
their values and override existing filters, such that if the
user configured a more advanced filter out-of-order, then the
@@ -423,7 +423,7 @@
themselves into the output filter chain.
The module finally has a chance to serve the request in its
handler hook. Note that not every prepared request is sent to
the handler hook. Many modules, such as mod_autoindex,
@@ -438,8 +438,8 @@
After the response has been sent to the client, modules can
perform logging activities. This hook is declared in
http_protocol.h and runs outside of
@@ -457,7 +457,7 @@
This hook is called during directory walks to allow modules to
handle or emulate the apr_stat() calls needed to
traverse the filesystem. This enables modules to serve content
@@ -473,7 +473,7 @@
apr_stat() call) decide.
This is a common global variable that holds the error number of the
last error that occurred. If one thread calls a low-level function that
sets errno and then another thread checks it, we are bleeding error
@@ -94,7 +94,7 @@
_SVID_SOURCE, and _BSD_SOURCE.
Not only do things have to be thread safe, but they also have to be
reentrant. strtok() is an obvious one. You call it the first
time with your delimiter which it then remembers and on each subsequent
@@ -113,7 +113,7 @@
The following is a list of common libraries that are used by 3rd party
Apache modules. You can check to see if your module is using a potentially
unsafe library by using tools such as ldd(1) and
@@ -147,7 +147,7 @@
to look for individual symbols in the module.
Interoperability problems have led to the introduction of
@@ -338,20 +338,20 @@
possible, they are invoked by defining environment variables,
typically with BrowserMatch, though SetEnv and PassEnv could also be used, for example.
If you have the DEFLATE filter activated, this
environment variable will ignore the accept-encoding setting of
your browser and will send compressed output unconditionally.
Starting with version 2.4, Apache is more strict about how HTTP
@@ -557,7 +557,7 @@ RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encodin
-
With the exception of some built-in comparison operators, binary
@@ -372,7 +372,7 @@ DIGIT ::= <any US-ASCII digit "0".."9">
minus and at least two characters. The name is not case sensitive.
Modules may register additional binary operators.
The strings $0 ... $9 allow to reference
the capture groups from a previously executed, successfully
@@ -647,14 +647,14 @@ DIGIT ::= <any US-ASCII digit "0".."9">
The ap_expr syntax is mostly a superset of the syntax of the
deprecated SSLRequire directive.
The differences are described in SSLRequire's documentation.
The following examples show how expressions might be used to
@@ -741,7 +741,7 @@ CustomLog logs/access-errors-specific.log common "expr=%{REQUEST_STATUS} -in {'4
fr
Filters can be used to process content originating from the client in
@@ -123,7 +123,7 @@ transformation filter might be turned into an image transformation service.
There are two ways to use filtering: Simple and Dynamic.
In general, you should use one or the other; mixing them can
@@ -160,7 +160,7 @@ but deprecated. Use dynamic configuration instead.
The Apache HTTP Server is configured via simple text files.
@@ -152,7 +152,7 @@ access to the main server configuration file(s). You can read more about
Web site content can take many different forms, but may be broadly
@@ -186,7 +186,7 @@ their documentation or other support forums to answer your questions
about them.
As an Apache HTTP Server administrator, your most valuable assets are
the log files, and, in particular, the error log. Troubleshooting any
@@ -205,7 +205,7 @@ caused the error condition.
The following directives will cause requests for files with
@@ -109,7 +109,7 @@ AddHandler add-footer .html
whatever modifications or additions are desired.
If you wish to restrict access to portions of your site based on the
host address of your visitors, this is most easily done using
@@ -126,7 +126,7 @@ Require not host gov
The [F]RewriteRule flag causes a 403 Forbidden
response to be sent. Using this, you can deny access to a resource based
@@ -185,7 +185,7 @@ RewriteRule "^/fridge" "-" [F]
The expression engine gives you a
great deal of power to do a variety of things based on arbitrary
@@ -213,7 +213,7 @@ RewriteRule "^/fridge" "-" [F]
fr
There are three types of modules involved in the authentication and
authorization process. You will usually need to choose at least one
@@ -113,7 +113,7 @@ module from each group.
If you have information on your web site that is sensitive
or intended for only a small group of people, the techniques in
this article will help you make sure that the people that see
@@ -128,7 +128,7 @@ module from each group.
The directives discussed in this article will need to go
either in your main server configuration file (typically in a
<Directory> section), or
@@ -165,7 +165,7 @@ module from each group.
and use of authentication and authorization in the web server.
The directives above only let one person (specifically
someone with a username of rbowen) into the
directory. In most cases, you'll want to let more than one
@@ -344,7 +344,7 @@ Require group GroupName
AuthUserFile directive.
Because of the way that Basic authentication is specified,
your username and password must be verified every time you
request a document from the server. This is even if you're
@@ -364,7 +364,7 @@ Require group GroupName
different authentication method at that time.
Because storing passwords in plain text files has the above
problems, you may wish to store your passwords somewhere else, such
@@ -390,7 +390,7 @@ Require group GroupName
mod_authn_dbm documentation for more details.
With the introduction of the new provider based authentication and
authorization architecture, you are no longer locked into a single
@@ -446,13 +446,13 @@ Require group GroupName
The way that authorization can be applied is now much more flexible
than just a single check against a single data store. Ordering, logic
and choosing how authorization will be done is now possible.
Controlling how and in what order authorization will be applied
has been a bit of a mystery in the past. In Apache 2.2 a provider-based
authentication mechanism was introduced to decouple the actual
@@ -493,7 +493,7 @@ Require group GroupName
-
Authentication by username and password is only part of the
story. Frequently you want to let people in based on something
other than who they are. Something such as where they are
@@ -564,7 +564,7 @@ Require group GroupName
-
One of the side effects of adopting a provider based mechanism for
authorization is that the previous access control directives
Order,
@@ -589,7 +589,7 @@ Require group GroupName
There may be times when authentication puts an unacceptable load
on a provider or on your network. This is most likely to affect users
of mod_authn_dbd (or third-party/custom providers).
@@ -599,7 +599,7 @@ Require group GroupName
This may offer a substantial performance boost to some users.
You should also read the documentation for
mod_auth_basic and mod_authz_host
which contain some more information about how this all works. The
@@ -623,7 +623,7 @@ Require group GroupName
tr
CGI programs are often restricted to ScriptAlias'ed directories for security reasons.
@@ -142,7 +142,7 @@
ExecCGI must be specified in the Options directive.
As you become more advanced in CGI programming, it will
@@ -442,7 +442,7 @@ print "Hello, World.";
well to write a program that prints "Hello, World.", it's not
particularly useful.
If you have access to the main server configuration file, you
should put all of your configuration there instead of in
@@ -201,7 +201,7 @@ AllowOverrideList Redirect RedirectMatch RewriteEngine RewriteRule RewriteCond
The configuration directives found in a .htaccess file
are applied to the directory in which the .htaccess file
@@ -238,8 +238,8 @@ AllowOverrideList Redirect RedirectMatch RewriteEngine RewriteRule RewriteCond
completely overrides any earlier setting that may have been in
place.
Merging of .htaccess with the main
+ configuration files
As discussed in the documentation on Configuration Sections,
.htaccess files can override the <Directory> sections for
@@ -264,7 +264,7 @@ AllowOverrideList Redirect RedirectMatch RewriteEngine RewriteRule RewriteCond
As with any .htaccess use, placing these directives in
a <Directory> block is
@@ -288,7 +288,7 @@ Require group admins
more complete discussion of authentication and authorization.
Another use of .htaccess files is to enable Server Side
Includes for a particular directory. This may be done with the following
@@ -308,7 +308,7 @@ AddHandler server-parsed shtml
complete discussion of server-side includes.
When using RewriteRule in
.htaccess files, be aware that the per-directory context
changes things a bit. In particular, rules are taken to be relative to
@@ -340,7 +340,7 @@ further details on using
CGI scripts are a legacy mechanism for dynamic content. For new
deployments, consider using mod_proxy_fcgi with a
@@ -373,7 +373,7 @@ SetHandler cgi-script
When you put configuration directives in a .htaccess
file, and you don't get the desired effect, there are a number of
@@ -427,7 +427,7 @@ SetHandler cgi-script
pt-br
HTTP/2 is the evolution of the world's most successful application layer protocol, HTTP.
It focuses on making more efficient use of network resources. It does not change the fundamentals
@@ -71,7 +71,7 @@
The HTTP/2 protocol is implemented by its own httpd module, aptly named
mod_http2. It implements the complete set
@@ -84,7 +84,7 @@
can make use of it.
mod_http2 uses the library of nghttp2
as its implementation base. In order to build mod_http2 you need at least version 1.2.1 of
@@ -103,7 +103,7 @@
at least version 1.0.2.
HTTP/2 is supported in all multi-processing modules that come with httpd. However, if
@@ -185,7 +185,7 @@
that possible. If it breaks, however, you own both parts.
Almost all modern browsers support HTTP/2, but only over SSL connections: Firefox (v43),
Chrome (v45), Safari (since v9), iOS Safari (v9), Opera (v35), Chrome for Android (v49)
@@ -198,7 +198,7 @@
most versatile being curl.
The HTTP/2 protocol allows the server to PUSH responses to a client it never
asked for. The tone of the conversation is: "here is a request that you
@@ -291,7 +291,7 @@
not expose cookie where they might ordinarily not be visible.
An alternative to PUSHing resources is to send Link headers to the
client before the response is even ready. This uses the HTTP feature called "Early Hints" and
@@ -321,7 +321,7 @@
fr
SSI (Server Side Includes) are directives that are placed in
HTML pages, and evaluated on the server while the pages are
@@ -89,7 +89,7 @@ existing HTML documents.
that it is served, you need to look for some other solution.
This is one of the more common uses of SSI - to output the
results of a CGI program, such as everybody's favorite, a ``hit
@@ -230,14 +230,14 @@ AddOutputFilter INCLUDES .shtml
Earlier, we mentioned that you could use SSI to inform the
user when the document was most recently modified. However, the
@@ -266,7 +266,7 @@ modified?
syntax is the same.
The next step is to configure the Apache source tree for your
particular platform and personal requirements. This is done using
@@ -334,7 +334,7 @@ $ cd httpd-NN
available on the configure manual page.
Now it's time to install the package under the configured
installation PREFIX (see --prefix option
@@ -363,7 +363,7 @@ $ cd httpd-NN
your configuration files or documents.
Next, you can customize your Apache HTTP server by editing
the configuration files under
@@ -376,7 +376,7 @@ $ cd httpd-NN
version of this manual and a complete reference of available configuration directives.
The first step in upgrading is to read the release announcement
and the file CHANGES in the source distribution to
@@ -448,7 +448,7 @@ $ PREFIX/bin/apachectl -k start
A large number of third parties provide their own packaged
distributions of the Apache HTTP Server for installation on
@@ -482,7 +482,7 @@ $ PREFIX/bin/apachectl -k start
tr
If Apache suffers a fatal problem during startup, it will
write a message describing the problem either to the console or
@@ -114,7 +114,7 @@
Apache FAQ.
If you want your server to continue running after a system
reboot, you should add a call to apachectl to your
@@ -132,7 +132,7 @@
sure to check the exact requirements of your system.
Additional information about the command-line options of httpd and apachectl as well as other support
programs included with the server is available on the
@@ -152,7 +152,7 @@
tr
@@ -239,7 +239,7 @@ limitations under the License.
Multiple access logs can be created simply by specifying
@@ -424,7 +424,7 @@ CustomLog "logs/agent_log" "%{User-agent}i"
the log format can be specified directly in the CustomLog directive.
In order to aid in debugging, the
@@ -682,7 +682,7 @@ CustomLog "logs/access_log" commonvhost
More information is available in the mod_cgi documentation.
Apache recognizes one format for
digest-authentication passwords - the MD5 hash of the string
user:realm:password as a 32-character string of hexadecimal
@@ -236,7 +236,7 @@
fr
The session will focus on easily accessible configuration and tuning
options for Apache httpd 2.2 and 2.4 as well as monitoring tools.
@@ -85,8 +85,8 @@
Monitoring and analyzing the log files httpd writes is one of
the most effective ways to keep track of your server health and
@@ -686,8 +686,8 @@ CustomLog "|/usr/local/apache2/bin/rotatelogs /var/log/access_log 86400" common
-
It is useful to generate a test load to monitor system
performance under realistic operating circumstances. Besides
@@ -732,13 +732,13 @@ CustomLog "|/usr/local/apache2/bin/rotatelogs /var/log/access_log 86400" common
The httpd 2.2 server is by default a pre-forking web server.
When the server starts, the parent process spawns a number of
@@ -991,8 +991,8 @@ CustomLog "|/usr/local/apache2/bin/rotatelogs /var/log/access_log 86400" common
-
People often look for the 'magic tune-up' that will
make their system perform four times as fast by tweaking just
@@ -1211,8 +1211,8 @@ CustomLog "|/usr/local/apache2/bin/rotatelogs /var/log/access_log 86400" common
Requests for dynamically generated content usually take
significantly more resources than requests for static content.
@@ -1231,8 +1231,8 @@ CustomLog "|/usr/local/apache2/bin/rotatelogs /var/log/access_log 86400" common
By pre-rendering the response pages for the most popular queries
in your application, you can gain a significant performance
@@ -1331,8 +1331,8 @@ CustomLog "|/usr/local/apache2/bin/rotatelogs /var/log/access_log 86400" common
-
The mod_cache module provides intelligent caching of HTTP
responses: it is aware of the expiration timing and content
@@ -1436,8 +1436,8 @@ CacheMaxExpire 21600
Armed with the knowledge of how to tune a system to deliver the
desired the performance, we will soon discover that one
@@ -1452,7 +1452,7 @@ CacheMaxExpire 21600
fr
This directive has no effect other than to emit warnings
if the value is not none. In prior versions, DefaultType
@@ -903,7 +903,7 @@ which no other media type configuration could be found.
Contains directives that apply only if a condition is satisfied
by a request at runtime while the condition of a previous
@@ -1281,7 +1281,7 @@ for a complete reference and more examples.
Determine if mod_status displays the first 63 characters
of a request or the last 63, assuming the request itself is greater than
@@ -4649,7 +4649,7 @@ of a request or the last 63, assuming the request itself is greater than