|
- + Apache |
| Related Modules + + core+ mod_auth+ mod_cgi+ mod_includes mod_mine+ |
+
+ Related Directives + + AccessFileName+ AllowOverride+ Options+ AddHandler+ SetHandler+ AuthType+ AuthName+ AuthUserFile+ AuthGroupFile+ Require+ |
+
.htaccess files (or "distributed configuration files")
+ provide a way to make configuration changes on a per-directory basis. A
+ file, containing one or more configuration directives, is placed in a
+ particular document directory, and the directives apply to that
+ directory, and all subdirectories thereof.
Note: If you want to call your .htaccess file something
+ else, you can change the name of the file using the AccessFileName
+ directive. For example, if you would rather call the file
+ .config then you can put the following in your server
+ configuration file:
++ ++
++ ++ AccessFileName .config
What you can put in these files is determined by the AllowOverride
+ directive. This directive specifies, in categories, what directives
+ will be honored if they are found in a .htaccess file. If
+ a directive is permitted in a .htaccess file, the
+ documentation for that directive will contain an Override section,
+ specifying what value must be in AllowOverride in order
+ for that directive to be permitted.
For example, if you look at the documentation for the AddDefaultCharset
+ directive, you will find that it is permitted in .htaccess
+ files. (See the Context line in the directive summary.) The Override line reads
+ "FileInfo". Thus, you must have at least
+ "AllowOverride FileInfo" in order for this directive to be
+ honored in .htaccess files.
Example:
+ +++ ++
++ + +Context: + +server config, virtual host, directory, .htaccess ++ +Override: + +FileInfo +
If you are unsure whether a particular directive is permitted in a
+ .htaccess file, look at the documentation for that
+ directive, and check the Context line for ".htaccess."
In general, you should never use .htaccess files unless
+ you don't have access to the main server configuration file. There is,
+ for example, a prevailing misconception that user authentication should
+ always be done in .htaccess files. This is simply not the
+ case. You can put user authentication configurations in the main server
+ configuration, and this is, in fact, the preferred way to do
+ things.
.htaccess files should be used in a case where the
+ content providers need to make configuration changes to the server on a
+ per-directory basis, but do not have root access on the server system.
+ In the event that the server administrator is not willing to make
+ frequent configuration changes, it might be desirable to permit
+ individual users to make these changes in .htaccess files
+ for themselves. This is particularly true, for example, in cases where
+ ISPs are hosting multiple user sites on a single machine, and want
+ their users to be able to alter their configuration.
However, in general, use of .htaccess files should be
+ avoided when possible. Any configuration that you would consider
+ putting in a .htaccess file, can just as effectively be
+ made in a <Directory>
+ section in your main server configuration file.
There are two main reasons to avoid the use of
+ .htaccess files.
The first of these is performance. When AllowOverride
+ is set to allow the use of .htaccess files, Apache will
+ look in every directory for .htaccess files. Thus,
+ permitting .htaccess files causes a performance hit,
+ whether or not you actually even use them! Also, the
+ .htaccess file is loaded every time a document is
+ requested.
Further note that Apache must look for .htaccess files
+ in all higher-level directories, in order to have a full complement of
+ directives that it must apply. (See section on how
+ directives are applied.) Thus, if a file is requested out of a
+ directory /www/htdocs/example, Apache must look for the
+ following files:
++ ++
++ ++ /.htaccess
+ /www/.htaccess
+ /www/htdocs/.htaccess
+ /www/htdocs/example/.htaccess
And so, for each file access out of that directory, there are 4 + additional file-system accesses, even if none of those files are + present. (Note that this would only be the case if .htaccess files were + enabled for /, which is not usually the case.)
+ +The second consideration is one of security. You are permitting + users to modify server configuration, which may result in changes over + which you have no control. Carefully consider whether you want to give + your users this privilege.
+ +Note that it is completely equivalent to put a .htaccess file in a
+ directory /www/htdocs/example containing a directive, and
+ to put that same directive in a Directory section <Directory
+ /www/htdocs/example> in your main server configuration:
.htaccess file in /www/htdocs/example:
++ ++
++ ++ AddType text/example .exm+
httpd.conf
++ ++
++ ++ <Directory + /www/htdocs/example>
+ AddType text/example .exm
+ </Directory>
However, putting this configuration in your server configuration + file will result in less of a performance hit, as the configuration is + loaded once when Apache starts, rather than every time a file is + requested.
+ +The use of .htaccess files can be disabled completely
+ by setting the AllowOverride directive to "none"
++ ++
++ ++ AllowOverride None
The configuration directives found in a .htaccess file
+ are applied to the directory in which the .htaccess file
+ is found, and to all subdirectories thereof. However, it is important
+ to also remember that there may have been .htaccess files
+ in directories higher up. Directives are applied in the order that they
+ are found. Therefore, a .htaccess file in a particular
+ directory may override directives found in .htaccess files
+ found higher up in the directory tree. And those, in turn, may have
+ overridden directives found yet higher up, or in the main server
+ configuration file itself.
Example:
+ +In the directory /www/htdocs/example1 we have a
+ .htaccess file containing the following:
++ ++
++ ++ Options +ExecCGI
(Note: you must have "AllowOverride Options" in effect
+ to permit the use of the "Options" directive in
+ .htaccess files.)
In the directory /www/htdocs/example1/example2 we have
+ a .htaccess file containing:
++ ++
++ ++ Options Includes
Because of this second .htaccess file, in the directory
+ /www/htdocs/example1/example2, CGI execution is not
+ permitted, as only Options Includes is in effect, which
+ completely overrides any earlier setting that may have been in
+ place.
If you jumped directly to this part of the document to find out how
+ to do authentication, it is important to note one thing. There is a
+ common misconception that you are required to use
+ .htaccess files in order to implement password
+ authentication. This is not the case. Putting authentication directives
+ in a <Directory> section, in your main server
+ configuration file, is the preferred way to implement this, and
+ .htaccess files should be used only if you don't have
+ access to the main server configuration file. See above for a
+ discussion of when you should and should not use .htaccess
+ files.
Having said that, if you still think you need to use a
+ .htaccess file, you may find that a configuration such as
+ what follows may work for you.
You must have "AllowOverride AuthConfig" in effect for
+ these directives to be honored.
.htaccess file contents:
++ ++
++ ++ AuthType Basic
+ AuthName "Password Required"
+ AuthUserFile /www/passwords/password.file
+ AuthGroupFile /www/passwords/group.file
+ Require Group admins
Note that AllowOverride AuthConfig must be in effect
+ for these directives to have any effect.
Please see the authentication tutorial for a + more complete discussion of authentication and authorization.
+ +Another common use of .htaccess files is to enable
+ Server Side Includes for a particular directory. This may be done with
+ the following configuration directives, placed in a
+ .htaccess file in the desired directory:
++ ++
++ ++ Options +Includes
+ AddType text/html shtml
+ AddHandler server-parsed shtml
Note that AllowOverride Options and AllowOverride
+ FileInfo must both be in effect for these directives to have any
+ effect.
Please see the SSI tutorial for a more + complete discussion of server-side includes.
+ +Finally, you may wish to use a .htaccess file to permit
+ the execution of CGI programs in a particular directory. This may be
+ implemented with the following configuration:
++ ++
++ ++ Options +ExecCGI
+ AddHandler cgi-script cgi pl
Alternately, if you wish to have all files in the given directory be + considered to be CGI programs, this may be done with the following + configuration:
+ +++ ++
++ ++ Options +ExecCGI
+ SetHandler cgi-script
Note that AllowOverride Options must be in effect for
+ these directives to have any effect.
Please see the CGI tutorial for a more + complete discussion of CGI programming and configuration.
+ +When you put configuration directives in a .htaccess
+ file, and you don't get the desired effect, there are a number of
+ things that may be going wrong.
Most commonly, the problem is that AllowOverride is not
+ set such that your configuration directives are being honored. Make
+ sure that you don't have a AllowOverride None in effect
+ for the file scope in question. A good test for this is to put garbage
+ in your .htaccess file and reload. If a server error is
+ not generated, then you almost certainly have AllowOverride
+ None in effect.
If, on the other hand, you are getting server errors when trying to + access documents, check your Apache error log. It will likely tell you + that the directive used in your .htaccess file is not permitted. + Alternately, it may tell you that you had a syntax error, which you + will then need to fix.
+ + + diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/howto/ssi.html.ja.jis usr.sbin/httpd/htdocs/manual/howto/ssi.html.ja.jis --- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/howto/ssi.html.ja.jis Thu Feb 13 12:15:07 2003 +++ usr.sbin/httpd/htdocs/manual/howto/ssi.html.ja.jis Sun Feb 16 16:05:18 2003 @@ -7,7 +7,7 @@$B$3$N;XDj$O!"%U%!%$%k$r(B SSI $B%G%#%l%/%F%#%V$G2r@O$5$;$k$3$H$r5v2D$9$k(B - $B$H$$$&$3$H$r(B Apache $B$KEA$($^$9!#(B
+ $B$H$$$&$3$H$r(B Apache $B$KEA$($^$9!#(B + $B$[$H$s$I$N@_Dj$G$O$*8_$$$r>e=q$-$G$-$k!"J#?t$N(B + Options $B$,$"$k$3$H$K(B + $BCm0U$7$F$/$@$5$$!#$*$=$i$/!"@_Dj$,:G8e$KI>2A$5$l$k$3$H$r(B + $BJ]>Z$5$l$k$?$a$K!"(BSSI $B$r;HMQ$7$?$$%G%#%l%/%H%j$K(BOptions
+ $B%G%#%l%/%F%#%V$rE,MQ$9$kI,MW$,$"$k$G$7$g$&!#(B
$BA4$F$N%U%!%$%k$,(B SSI $B%G%#%l%/%F%#%V$G2r@O$5$l$k$H$$$&$o$1$G$O$"$j$^$;$s!#(B $B$I$N%U%!%$%k$,2r@O$5$l$k$+$r(B Apache $B$KEA$($kI,MW$,$"$j$^$9!#(B @@ -320,7 +325,7 @@
timefmt
$B=q<0$K$D$$$F$N$h$j>\:Y$K$D$$$F$O!"$*9%$_$N8!:w%5%$%H$K9T$-!"(B
- ctime $B$G8!:w$7$F$_$F$/$@$5$$!#J8K!$OF1$8$G$9!#(B
strftime $B$G8!:w$7$F$_$F$/$@$5$$!#J8K!$OF1$8$G$9!#(B
Problem: You are noticing restart messages in your error log, @@ -1909,7 +1918,26 @@
Check your cron jobs to see when/if your server logs are being rotated. Compare the time of rotation to the error menage time. If they are the same, you can somewhat safely assume that the - restart is due to your server logs being rotated.
+ restart is due to your server logs being rotated.Module Magic Number (MMN) is a constant defined in Apache + source that is associated with binary compatibility of + modules. It is changed when internal Apache structures, + function calls and other significant parts of API change in + such a way that binary compatiblity cannot be guaranteed any + more. On MMN change, all third party modules have to be at + least recompiled, sometimes even slightly changed in order + to work with the new version of Apache.
+ +If you're getting the above error messages, contact the + vendor of the module for the new binary, or compile it if + you have access to the source code.
To turn on automatic directory indexing, find the
Options directive that
applies to the directory and add the Indexes
- keyword. To turn off automatic directory indexing, remove
+ keyword. For example:
+ <Directory /path/to/directory>
+ Options +Indexes
+ </Directory>
+
+
+ To turn off automatic directory indexing, remove
the Indexes keyword from the appropriate
- Options line.
Options line. To turn off directory listing
+ for a particular subdirectory, you can use
+ Options -Indexes. For example:
+
+
+ <Directory /path/to/directory>
+ Options -Indexes
+ </Directory>
+
<Directory> section.
When a client connects to Apache, part of the information returned in + the headers is the name "Apache" Additional information that can be sent + is the version number, such as "1.3.26", the operating system, and a + list of non-standard modules you have installed.
+ +For example:
+ +
+Server: Apache/1.3.26 (Unix) mod_perl/1.26
+
+
+ Frequently, people want to remove this information, under the mistaken + understanding that this will make the system more secure. This is + probably not the case, as the same exploits will likely be attempted + regardless of the header information you provide.
+ +There are, however, two answers to this question: the correct answer, + and the answer that you are probably looking for.
+ +The correct answer to this question is that you should use the
+ ServerTokens directive to alter the quantity of information which is
+ passed in the headers. Setting this directive to Prod will
+ pass the least possible amount of information:
+Server: Apache
+
+
+ The answer you are probably looking for is how to make Apache lie + about what what it is, ie send something like:
+ +
+Server: Bob's Happy HTTPd Server
+
+
+ In order to do this, you will need to modify the Apache source code and + rebuild Apache. This is not advised, as it is almost certain not to + provide you with the added security you think that you are gaining. The + exact method of doing this is left as an exercise for the reader, as we + are not keen on helping you do something that is intrinsically a bad + idea.
+ +A an access_log entry showing this situation could look + like this:
+ + 63.251.56.142 - -
+ [25/Jul/2002:12:48:04 -0700] "GET http://www.yahoo.com/
+ HTTP/1.0" 200 1456
+
+ The question is: why did a request for
+ www.yahoo.com come to your server instead of
+ Yahoo's server? And why does the response have a status
+ code of 200 (success)?
This is usually the result of malicious clients trying to
+ exploit open proxy servers to access a website without
+ revealing their true location. If you find entries like this
+ in your log, the first thing to do is to make sure you have
+ properly configured your server not to proxy for unknown
+ clients. If you don't need to provide a proxy server at all,
+ you should simply assure that the ProxyRequests
+ directive is not set on.
+ If you do need to run a proxy server, then you must ensure
+ that you secure your
+ server properly so that only authorized clients can use
+ it.
If your server is configured properly, then the attempt to
+ proxy through your server will fail. If you see a status
+ code of 404 (file not found) in the log, then
+ you know that the request failed. If you see a status code
+ of 200 (success), that does not necessarily mean
+ that the attempt to proxy succeeded. RFC2616 section 5.1.2
+ mandates that Apache must accept requests with absolute URLs
+ in the request-URI, even for non-proxy requests. Since
+ Apache has no way to know all the different names that your
+ server may be known under, it cannot simply reject hostnames
+ it does not recognize. Instead, it will serve requests for
+ unknown sites locally by stripping off the hostname and using
+ the default server or virtual host. Therefore you can
+ compare the size of the file (1456 in the above example) to
+ the size of the corresponding file in your default server.
+ If they are the same, then the proxy attempt failed, since a
+ document from your server was delivered, not a document from
+ www.yahoo.com.
If you wish to prevent this type of request entirely, then + you need to let Apache know what hostnames to accept and what + hostnames to reject. You do this by configuring name-virtual + hosts, where the first listed host is the default host that + will catch and reject unknown hostnames. For example:
+ ++++NameVirtualHost * + +<VirtualHost *> + ServerName default.only + <Location /> + Order allow,deny + Deny from all + </Location> +</VirtualHost> + +<VirtualHost *> + ServerName realhost1.example.com + ServerAlias alias1.example.com alias2.example.com + DocumentRoot /path/to/site1 +</VirtualHost> + +... ++
lingering_close()Below is a message from Roy Fielding, one of the authors of HTTP/1.1.
diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/misc/perf.html usr.sbin/httpd/htdocs/manual/misc/perf.html --- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/misc/perf.html Thu Feb 13 12:15:04 2003 +++ usr.sbin/httpd/htdocs/manual/misc/perf.html Sun Feb 16 16:05:18 2003 @@ -37,6 +37,8 @@An SGI document covering tuning of IRIX 6.2 through 6.5 is + available from Stanford.
+ +foo.html into a dynamic variant
- foo.cgi in a seemless way, i.e. without notice
+ foo.cgi in a seamless way, i.e. without notice
by the browser/user./usr/local/apache then it is suggested that you
@@ -91,11 +91,11 @@
either executes or writes on then you open your system to root
compromises. For example, someone could replace the httpd
binary so that the next time you start it, it will execute some
- arbitrary code. If the logs directory is writeable (by a
+ arbitrary code. If the logs directory is writable (by a
non-root user), someone could replace a log file with a symlink
to some other system file, and then root might overwrite that
file with arbitrary data. If the log files themselves are
- writeable (by a non-root user), then someone may be able to
+ writable (by a non-root user), then someone may be able to
overwrite the log itself with bogus data.
If you have a pointer to an accurate and well-written diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/core.html.en usr.sbin/httpd/htdocs/manual/mod/core.html.en --- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/core.html.en Thu Feb 13 12:15:06 2003 +++ usr.sbin/httpd/htdocs/manual/mod/core.html.en Sun Feb 16 16:05:19 2003 @@ -140,6 +140,8 @@
AccessConfig
conf/access.confIf AccessConfig points to a directory, rather than a
file, Apache will read all files in that directory, and any
- subdirectory, and parse those as configuration files. Note that
-
Alternatively you can use a wildcard to limit the scope; i.e + to only *.conf files. +
+Note that by default
+
+ So make sure that you don't have stray files in this directory by mistake, such as temporary files created by your editor, for example. @@ -390,6 +401,13 @@AddDefaultCharset utf-8
+ Note: This will not have any effect on the + Content-Type and character set for default Apache-generated + status pages (such as '404 Not Found' or '301 Moved Permanently') + because those have an actual character set (that in which the + hard-coded page content is written) and don't need to have a default + applied.
+AuthName "Top Secret"
- The string provided for the AuthRealm is what will
+
The string provided for the AuthName is what will
appear in the password dialog provided by most browsers.
This directive enables RFC1413-compliant logging of the
remote user name for each connection, where the client machine
runs identd or something similar. This information is logged in
- the access log. Boolean is either on or
- off.
The information should not be trusted in any way except for rudimentary usage tracking.
@@ -1710,7 +1727,7 @@By using a wildcard this can be further limited to, say, + just the '*.conf' files. +
Examples:
-
Include /usr/local/apache/conf/ssl.conf
Include /usr/local/apache/conf/vhosts/
@@ -2158,7 +2176,7 @@
See Also: Setting
which addresses and ports Apache uses
See Also: Known
+ href="http://httpd.apache.org/info/known_bugs.html#listenbug">Known
Bugs
@@ -2906,6 +2924,34 @@
major security attack.
+ ProtocolReqCheck
+ directive
+
+ Syntax: ProtocolReqCheck
+ on|off
+ Default: ProtocolReqCheck
+ on
+ Context: server config
+
+ Status: core
+ Compatibility:
+ ProtocolReqCheck is only available in Apache 1.3.27 and later.
+
+ This directive enables strict checking of the Protocol field
+ in the Request line. Versions of Apache prior to 1.3.26 would
+ silently accept bogus Protocols (such as HTTP-1.1)
+ and assume HTTP/1.0. Instead, now the Protocol field
+ must be valid. If the pre-1.3.26 behavior is desired or required,
+ it can be enabled via setting ProtocolReqCheck off.
+
+
+
+
Require directive
Syntax: ResourceConfig
- file-path|directory-path
+ file-path|directory-path|wildcard-path
Default: ResourceConfig
conf/srm.conf
@@ -3013,11 +3059,19 @@
If ResourceConfig points to a directory, rather than
a file, Apache will read all files in that directory, and any
- subdirectory, and parse those as configuration files. Note that
- any file in the specified directory will be loaded as a
- configuration file, so make sure that you don't have any stray files
- in this directory by mistake, such as temporary files created by
- your editor, for example.
+ subdirectory, and parse those as configuration files.
+
+ Alternatively you can use a wildcard to limit the scope; i.e
+ to only *.conf files.
+
+ Note that by default any file in the specified
+ directory will be loaded as a configuration file.
+
+
+ So make sure that you don't have stray files in
+ this directory by mistake, such as temporary files created by your
+ editor, for example.
+
See also AccessConfig.
@@ -3546,6 +3600,39 @@
only option.
+ ShmemUIDisUser
+ directive
+
+ Syntax: ShmemUIDisUser
+ on|off
+ Default: ShmemUIDisUser
+ off
+ Context: server config
+ Status: core
+ Compatibility:
+ ShmemUIDisUser directive is only available in Apache 1.3.27 and later.
+
+ The ShmemUIDisUser directive controls whether Apache will change
+ the uid and gid ownership of System V shared memory
+ based scoreboards to the server settings of User and
+ Group. Releases of Apache up to 1.3.26 would do
+ this by default. Since the child processes are already attached to the
+ shared memory segment, this is not required for normal usage of Apache and
+ so to prevent possible abuse, Apache will no longer do that. The old
+ behavior may be required for special cases, however, which can be implemented
+ by setting this directive to on.
+
+ This directive has no effect on non-System V based scoreboards, such as
+ mmap.
+
+
+
+
StartServers
directive
@@ -3682,20 +3769,27 @@
to the same server. With UseCanonicalName on (and
in all versions prior to 1.3) Apache will use the ServerName and Port
- directives to construct a canonical name for the server. This
+ directives to construct the canonical name for the server. This
name is used in all self-referential URLs, and for the values
of SERVER_NAME and SERVER_PORT in
CGIs.
+ For example, if ServerName is set to
+ www.example.com and Port is set to
+ 9090, then the canonical name of the server is
+ www.example.com:9090. In the event that
+ Port has its default value of 80, the
+ :80 is ommitted from the canonical name.
+
With UseCanonicalName off Apache will form
self-referential URLs using the hostname and port supplied by
the client if any are supplied (otherwise it will use the
- canonical name). These values are the same that are used to
- implement name based
- virtual hosts, and are available with the same clients. The
- CGI variables SERVER_NAME and
- SERVER_PORT will be constructed from the client
- supplied values as well.
+ canonical name, as defined above). These values are the same
+ that are used to implement name based virtual hosts,
+ and are available with the same clients. The CGI variables
+ SERVER_NAME and SERVER_PORT will be
+ constructed from the client supplied values as well.
An example where this may be useful is on an intranet server
where you have users connecting to the machine using short
@@ -3705,10 +3799,12 @@
slash then Apache will redirect them to
http://www.domain.com/splat/. If you have
authentication enabled, this will cause the user to have to
- reauthenticate twice (once for www and once again
- for www.domain.com). But if
- UseCanonicalName is set off, then Apache will
- redirect to http://www/splat/.
+ authenticate twice (once for www and once again
+ for www.domain.com -- see the FAQ on this subject for
+ more information). But if UseCanonicalName
+ is set off, then Apache will redirect to
+ http://www/splat/.
There is a third option, UseCanonicalName DNS,
which is intended for use with mass IP-based virtual hosting to
diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/core.html.fr usr.sbin/httpd/htdocs/manual/mod/core.html.fr
--- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/core.html.fr Thu Feb 13 12:15:06 2003
+++ usr.sbin/httpd/htdocs/manual/mod/core.html.fr Sun Feb 16 16:05:19 2003
@@ -2114,7 +2114,7 @@
Voir aussi: Configurer
les ports et adresses utilisée par Apache
Voir aussi : Bogues
+ href="http://httpd.apache.org/info/known_bugs.html#listenbug">Bogues
connus
diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/core.html.html usr.sbin/httpd/htdocs/manual/mod/core.html.html
--- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/core.html.html Thu Feb 13 12:15:06 2003
+++ usr.sbin/httpd/htdocs/manual/mod/core.html.html Sun Feb 16 16:05:18 2003
@@ -142,6 +142,8 @@
Port
+ ProtocolReqCheck
+
Require
ResourceConfig
@@ -177,6 +179,8 @@
ServerType
+ ShmemUIDisUser
+
StartServers
ThreadsPerChild
@@ -269,7 +273,7 @@
Syntax: AccessConfig
- file-path|directory-path
+ file-path|directory-path|wildcard-path
Default: AccessConfig
conf/access.conf
@@ -308,9 +312,16 @@
If AccessConfig points to a directory, rather than a
file, Apache will read all files in that directory, and any
- subdirectory, and parse those as configuration files. Note that
- any file in the specified directory will be loaded as a
- configuration file, so make sure that you don't have stray files in
+ subdirectory, and parse those as configuration files.
+
+ Alternatively you can use a wildcard to limit the scope; i.e
+ to only *.conf files.
+
+ Note that by default any file in the specified
+ directory will be loaded as a configuration file.
+
+
+ So make sure that you don't have stray files in
this directory by mistake, such as temporary files created by your
editor, for example.
@@ -392,6 +403,13 @@
AddDefaultCharset utf-8
+ Note: This will not have any effect on the + Content-Type and character set for default Apache-generated + status pages (such as '404 Not Found' or '301 Moved Permanently') + because those have an actual character set (that in which the + hard-coded page content is written) and don't need to have a default + applied.
+AuthName "Top Secret"
- The string provided for the AuthRealm is what will
+
The string provided for the AuthName is what will
appear in the password dialog provided by most browsers.
This directive enables RFC1413-compliant logging of the
remote user name for each connection, where the client machine
runs identd or something similar. This information is logged in
- the access log. Boolean is either on or
- off.
The information should not be trusted in any way except for rudimentary usage tracking.
@@ -1712,7 +1729,7 @@By using a wildcard this can be further limited to, say, + just the '*.conf' files. +
Examples:
-
Include /usr/local/apache/conf/ssl.conf
Include /usr/local/apache/conf/vhosts/
@@ -2160,7 +2178,7 @@
See Also: Setting
which addresses and ports Apache uses
See Also: Known
+ href="http://httpd.apache.org/info/known_bugs.html#listenbug">Known
Bugs
@@ -2908,6 +2926,34 @@
major security attack.
+ ProtocolReqCheck
+ directive
+
+ Syntax: ProtocolReqCheck
+ on|off
+ Default: ProtocolReqCheck
+ on
+ Context: server config
+
+ Status: core
+ Compatibility:
+ ProtocolReqCheck is only available in Apache 1.3.27 and later.
+
+ This directive enables strict checking of the Protocol field
+ in the Request line. Versions of Apache prior to 1.3.26 would
+ silently accept bogus Protocols (such as HTTP-1.1)
+ and assume HTTP/1.0. Instead, now the Protocol field
+ must be valid. If the pre-1.3.26 behavior is desired or required,
+ it can be enabled via setting ProtocolReqCheck off.
+
+
+
+
Require directive
Syntax: ResourceConfig
- file-path|directory-path
+ file-path|directory-path|wildcard-path
Default: ResourceConfig
conf/srm.conf
@@ -3015,11 +3061,19 @@
If ResourceConfig points to a directory, rather than
a file, Apache will read all files in that directory, and any
- subdirectory, and parse those as configuration files. Note that
- any file in the specified directory will be loaded as a
- configuration file, so make sure that you don't have any stray files
- in this directory by mistake, such as temporary files created by
- your editor, for example.
+ subdirectory, and parse those as configuration files.
+
+ Alternatively you can use a wildcard to limit the scope; i.e
+ to only *.conf files.
+
+ Note that by default any file in the specified
+ directory will be loaded as a configuration file.
+
+
+ So make sure that you don't have stray files in
+ this directory by mistake, such as temporary files created by your
+ editor, for example.
+
See also AccessConfig.
@@ -3548,6 +3602,39 @@
only option.
+ ShmemUIDisUser
+ directive
+
+ Syntax: ShmemUIDisUser
+ on|off
+ Default: ShmemUIDisUser
+ off
+ Context: server config
+ Status: core
+ Compatibility:
+ ShmemUIDisUser directive is only available in Apache 1.3.27 and later.
+
+ The ShmemUIDisUser directive controls whether Apache will change
+ the uid and gid ownership of System V shared memory
+ based scoreboards to the server settings of User and
+ Group. Releases of Apache up to 1.3.26 would do
+ this by default. Since the child processes are already attached to the
+ shared memory segment, this is not required for normal usage of Apache and
+ so to prevent possible abuse, Apache will no longer do that. The old
+ behavior may be required for special cases, however, which can be implemented
+ by setting this directive to on.
+
+ This directive has no effect on non-System V based scoreboards, such as
+ mmap.
+
+
+
+
StartServers
directive
@@ -3684,20 +3771,27 @@
to the same server. With UseCanonicalName on (and
in all versions prior to 1.3) Apache will use the ServerName and Port
- directives to construct a canonical name for the server. This
+ directives to construct the canonical name for the server. This
name is used in all self-referential URLs, and for the values
of SERVER_NAME and SERVER_PORT in
CGIs.
+ For example, if ServerName is set to
+ www.example.com and Port is set to
+ 9090, then the canonical name of the server is
+ www.example.com:9090. In the event that
+ Port has its default value of 80, the
+ :80 is ommitted from the canonical name.
+
With UseCanonicalName off Apache will form
self-referential URLs using the hostname and port supplied by
the client if any are supplied (otherwise it will use the
- canonical name). These values are the same that are used to
- implement name based
- virtual hosts, and are available with the same clients. The
- CGI variables SERVER_NAME and
- SERVER_PORT will be constructed from the client
- supplied values as well.
+ canonical name, as defined above). These values are the same
+ that are used to implement name based virtual hosts,
+ and are available with the same clients. The CGI variables
+ SERVER_NAME and SERVER_PORT will be
+ constructed from the client supplied values as well.
An example where this may be useful is on an intranet server
where you have users connecting to the machine using short
@@ -3707,10 +3801,12 @@
slash then Apache will redirect them to
http://www.domain.com/splat/. If you have
authentication enabled, this will cause the user to have to
- reauthenticate twice (once for www and once again
- for www.domain.com). But if
- UseCanonicalName is set off, then Apache will
- redirect to http://www/splat/.
+ authenticate twice (once for www and once again
+ for www.domain.com -- see the FAQ on this subject for
+ more information). But if UseCanonicalName
+ is set off, then Apache will redirect to
+ http://www/splat/.
There is a third option, UseCanonicalName DNS,
which is intended for use with mass IP-based virtual hosting to
diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/directives.html.en usr.sbin/httpd/htdocs/manual/mod/directives.html.en
--- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/directives.html.en Thu Feb 13 12:15:06 2003
+++ usr.sbin/httpd/htdocs/manual/mod/directives.html.en Sun Feb 16 16:05:19 2003
@@ -220,6 +220,8 @@
DefaultType
+ Define
+
Deny
<Directory>
@@ -400,6 +402,8 @@
Port
+ ProtocolReqCheck
+
ProxyBlock
ProxyDomain
@@ -534,6 +538,30 @@
href="mod_setenvif.html#SetEnvIfNoCase">SetEnvIfNoCase
Both host-based access restrictions and password-based authentication may be implemented simultaneously. In that case, - the Satisfy directive is used + the Satisfy directive is used to determine how the two sets of restrictions interact.
In general, access restriction directives apply to all diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_access.html.html usr.sbin/httpd/htdocs/manual/mod/mod_access.html.html --- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_access.html.html Thu Feb 13 12:15:06 2003 +++ usr.sbin/httpd/htdocs/manual/mod/mod_access.html.html Sun Feb 16 16:05:19 2003 @@ -54,7 +54,7 @@
Both host-based access restrictions and password-based authentication may be implemented simultaneously. In that case, - the Satisfy directive is used + the Satisfy directive is used to determine how the two sets of restrictions interact.
In general, access restriction directives apply to all diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_access.html.ja.jis usr.sbin/httpd/htdocs/manual/mod/mod_access.html.ja.jis --- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_access.html.ja.jis Thu Feb 13 12:15:06 2003 +++ usr.sbin/httpd/htdocs/manual/mod/mod_access.html.ja.jis Sun Feb 16 16:05:19 2003 @@ -7,7 +7,7 @@
-
- This module provides for mapping different parts of the host - filesystem in the document tree, and for URL redirection.
- -Status: Base
- Source File: mod_alias.c
- Module Identifier:
- alias_module
The directives contained in this module allow for
- manipulation and control of URLs as requests arrive at the
- server. The Alias and ScriptAlias
- directives are used to map between URLs and filesystem paths.
- This allows for content which is not directly under the DocumentRoot to
- be served as part of the web document tree. The
- ScriptAlias directive has the additional effect of
- marking the target directory as containing only CGI
- scripts.
The Redirect directives are used to instruct
- clients to make a new request with a different URL. They are
- often used when a resource has moved to a new location.
A more powerful and flexible set of directives for
- manipulating URLs is contained in the mod_rewrite
- module.
- Syntax: Alias URL-path
- file-path|directory-path
- Context: server config, virtual
- host
- Status: Base
- Module: mod_alias
The Alias directive allows documents to be stored in the - local filesystem other than under the DocumentRoot. URLs with a - (%-decoded) path beginning with url-path will be - mapped to local files beginning with - directory-filename.
- -Example:
- -
- Alias /image /ftp/pub/image
-
-
- A request for http://myserver/image/foo.gif would cause the - server to return the file /ftp/pub/image/foo.gif.
- -Note that if you include a trailing / on the
- url-path then the server will require a trailing / in
- order to expand the alias. That is, if you use Alias
- /icons/ /usr/local/apache/icons/ then the url
- /icons will not be aliased.
Note that you may need to specify additional <Directory>
- sections which cover the destination of aliases.
- Aliasing occurs before <Directory> sections
- are checked, so only the destination of aliases are affected.
- (Note however <Location>
- sections are run through once before aliases are performed, so
- they will apply.)
See also ScriptAlias.
-Syntax: AliasMatch regex
- file-path|directory-path
- Context: server config, virtual
- host
- Status: Base
- Module: mod_alias
- Compatibility: Available in
- Apache 1.3 and later
This directive is equivalent to Alias,
- but makes use of standard regular expressions, instead of
- simple prefix matching. The supplied regular expression is
- matched against the URL-path, and if it matches, the server
- will substitute any parenthesized matches into the given string
- and use it as a filename. For example, to activate the
- /icons directory, one might use:
- AliasMatch ^/icons(.*) /usr/local/apache/icons$1 --
- Syntax: Redirect
- [status] URL-path URL
- Context: server config, virtual
- host, directory, .htaccess
- Override: FileInfo
- Status: Base
- Module: mod_alias
- Compatibility: The directory
- and .htaccess context's are only available in versions 1.1 and
- later. The status argument is only available in Apache
- 1.2 or later.
The Redirect directive maps an old URL into a new one. The - new URL is returned to the client which attempts to fetch it - again with the new address. URL-path a (%-decoded) - path; any requests for documents beginning with this path will - be returned a redirect error to a new (%-encoded) URL beginning - with URL.
- -Example:
- -
- Redirect /service http://foo2.bar.com/service
-
-
- If the client requests http://myserver/service/foo.txt, it - will be told to access http://foo2.bar.com/service/foo.txt - instead.
- -Note: Redirect directives take precedence - over Alias and ScriptAlias directives, irrespective of their - ordering in the configuration file. Also, URL-path - must be an absolute path, not a relative path, even when used - with .htaccess files or inside of <Directory> - sections.
- -If no status argument is given, the redirect will - be "temporary" (HTTP status 302). This indicates to the client - that the resource has moved temporarily. The status - argument can be used to return other HTTP status codes:
- -Other status codes can be returned by giving the numeric
- status code as the value of status. If the status is
- between 300 and 399, the url argument must be present,
- otherwise it must be omitted. Note that the status must be
- known to the Apache code (see the function
- send_error_response in http_protocol.c).
Example:
- -- Redirect permanent /one http://example.com/two-
- Redirect 303 /two http://example.com/other -
Syntax: RedirectMatch
- [status] regex URL
- Context: server config, virtual
- host, directory, .htaccess
- Override: FileInfo
- Status: Base
- Module: mod_alias
- Compatibility: Available in
- Apache 1.3 and later
This directive is equivalent to Redirect, but makes use of standard - regular expressions, instead of simple prefix matching. The - supplied regular expression is matched against the URL-path, - and if it matches, the server will substitute any parenthesized - matches into the given string and use it as a filename. For - example, to redirect all GIF files to like-named JPEG files on - another server, one might use:
-- RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg --
- Syntax: RedirectTemp
- URL-path URL
- Context: server config, virtual
- host, directory, .htaccess
- Override: FileInfo
- Status: Base
- Module: mod_alias
- Compatibility: This directive
- is only available in Apache 1.2 and later
This directive makes the client know that the Redirect is
- only temporary (status 302). Exactly equivalent to
- Redirect temp.
- Syntax: RedirectPermanent
- URL-path URL
- Context: server config, virtual
- host, directory, .htaccess
- Override: FileInfo
- Status: Base
- Module: mod_alias
- Compatibility: This directive
- is only available in Apache 1.2 and later
This directive makes the client know that the Redirect is
- permanent (status 301). Exactly equivalent to Redirect
- permanent.
- Syntax: ScriptAlias
- URL-path file-path|directory-path
- Context: server config, virtual
- host
- Status: Base
- Module: mod_alias
The ScriptAlias directive has the same behavior as the Alias directive, except that in addition it - marks the target directory as containing CGI scripts that will be - processed by mod_cgi's cgi-script - handler. URLs with a (%-decoded) path beginning with - URL-path will be mapped to scripts beginning with the - second argument which is a full pathname in the local - filesystem.
- -Example:
- -
- ScriptAlias /cgi-bin/ /web/cgi-bin/
-
-
- A request for http://myserver/cgi-bin/foo would cause the - server to run the script /web/cgi-bin/foo.
-Syntax: ScriptAliasMatch
- regex file-path|directory-path
- Context: server config, virtual
- host
- Status: Base
- Module: mod_alias
- Compatibility: Available in
- Apache 1.3 and later
This directive is equivalent to ScriptAlias, but makes use of standard
- regular expressions, instead of simple prefix matching. The
- supplied regular expression is matched against the URL-path,
- and if it matches, the server will substitute any parenthesized
- matches into the given string and use it as a filename. For
- example, to activate the standard /cgi-bin, one
- might use:
- ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 --
-
-
-
-
-
diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_alias.html.en usr.sbin/httpd/htdocs/manual/mod/mod_alias.html.en
--- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_alias.html.en Wed Dec 31 19:00:00 1969
+++ usr.sbin/httpd/htdocs/manual/mod/mod_alias.html.en Sun Feb 16 16:05:19 2003
@@ -0,0 +1,395 @@
+
+
+
+
+
+
+
+
+ This module provides for mapping different parts of the host + filesystem in the document tree, and for URL redirection.
+ +Status: Base
+ Source File: mod_alias.c
+ Module Identifier:
+ alias_module
The directives contained in this module allow for
+ manipulation and control of URLs as requests arrive at the
+ server. The Alias and ScriptAlias
+ directives are used to map between URLs and filesystem paths.
+ This allows for content which is not directly under the DocumentRoot to
+ be served as part of the web document tree. The
+ ScriptAlias directive has the additional effect of
+ marking the target directory as containing only CGI
+ scripts.
The Redirect directives are used to instruct
+ clients to make a new request with a different URL. They are
+ often used when a resource has moved to a new location.
A more powerful and flexible set of directives for
+ manipulating URLs is contained in the mod_rewrite
+ module.
+ Syntax: Alias URL-path
+ file-path|directory-path
+ Context: server config, virtual
+ host
+ Status: Base
+ Module: mod_alias
The Alias directive allows documents to be stored in the + local filesystem other than under the DocumentRoot. URLs with a + (%-decoded) path beginning with url-path will be + mapped to local files beginning with + directory-filename.
+ +Example:
+ +
+ Alias /image /ftp/pub/image
+
+
+ A request for http://myserver/image/foo.gif would cause the + server to return the file /ftp/pub/image/foo.gif.
+ +Note that if you include a trailing / on the
+ url-path then the server will require a trailing / in
+ order to expand the alias. That is, if you use Alias
+ /icons/ /usr/local/apache/icons/ then the url
+ /icons will not be aliased.
Note that you may need to specify additional <Directory>
+ sections which cover the destination of aliases.
+ Aliasing occurs before <Directory> sections
+ are checked, so only the destination of aliases are affected.
+ (Note however <Location>
+ sections are run through once before aliases are performed, so
+ they will apply.)
See also ScriptAlias.
+Syntax: AliasMatch regex
+ file-path|directory-path
+ Context: server config, virtual
+ host
+ Status: Base
+ Module: mod_alias
+ Compatibility: Available in
+ Apache 1.3 and later
This directive is equivalent to Alias,
+ but makes use of standard regular expressions, instead of
+ simple prefix matching. The supplied regular expression is
+ matched against the URL-path, and if it matches, the server
+ will substitute any parenthesized matches into the given string
+ and use it as a filename. For example, to activate the
+ /icons directory, one might use:
+ AliasMatch ^/icons(.*) /usr/local/apache/icons$1 ++
+ Syntax: Redirect
+ [status] URL-path URL
+ Context: server config, virtual
+ host, directory, .htaccess
+ Override: FileInfo
+ Status: Base
+ Module: mod_alias
+ Compatibility: The directory
+ and .htaccess context's are only available in versions 1.1 and
+ later. The status argument is only available in Apache
+ 1.2 or later.
The Redirect directive maps an old URL into a new one. The + new URL is returned to the client which attempts to fetch it + again with the new address. URL-path a (%-decoded) + path; any requests for documents beginning with this path will + be returned a redirect error to a new (%-encoded) URL beginning + with URL.
+ +Example:
+ +
+ Redirect /service http://foo2.bar.com/service
+
+
+ If the client requests http://myserver/service/foo.txt, it + will be told to access http://foo2.bar.com/service/foo.txt + instead.
+ +Note: Redirect directives take precedence + over Alias and ScriptAlias directives, irrespective of their + ordering in the configuration file. Also, URL-path + must be an absolute path, not a relative path, even when used + with .htaccess files or inside of <Directory> + sections.
+ +If no status argument is given, the redirect will + be "temporary" (HTTP status 302). This indicates to the client + that the resource has moved temporarily. The status + argument can be used to return other HTTP status codes:
+ +Other status codes can be returned by giving the numeric
+ status code as the value of status. If the status is
+ between 300 and 399, the url argument must be present,
+ otherwise it must be omitted. Note that the status must be
+ known to the Apache code (see the function
+ send_error_response in http_protocol.c).
Example:
+ ++ Redirect permanent /one http://example.com/two+
+ Redirect 303 /two http://example.com/other +
Syntax: RedirectMatch
+ [status] regex URL
+ Context: server config, virtual
+ host, directory, .htaccess
+ Override: FileInfo
+ Status: Base
+ Module: mod_alias
+ Compatibility: Available in
+ Apache 1.3 and later
This directive is equivalent to Redirect, but makes use of standard + regular expressions, instead of simple prefix matching. The + supplied regular expression is matched against the URL-path, + and if it matches, the server will substitute any parenthesized + matches into the given string and use it as a filename. For + example, to redirect all GIF files to like-named JPEG files on + another server, one might use:
++ RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg ++
+ Syntax: RedirectTemp
+ URL-path URL
+ Context: server config, virtual
+ host, directory, .htaccess
+ Override: FileInfo
+ Status: Base
+ Module: mod_alias
+ Compatibility: This directive
+ is only available in Apache 1.2 and later
This directive makes the client know that the Redirect is
+ only temporary (status 302). Exactly equivalent to
+ Redirect temp.
+ Syntax: RedirectPermanent
+ URL-path URL
+ Context: server config, virtual
+ host, directory, .htaccess
+ Override: FileInfo
+ Status: Base
+ Module: mod_alias
+ Compatibility: This directive
+ is only available in Apache 1.2 and later
This directive makes the client know that the Redirect is
+ permanent (status 301). Exactly equivalent to Redirect
+ permanent.
+ Syntax: ScriptAlias
+ URL-path file-path|directory-path
+ Context: server config, virtual
+ host
+ Status: Base
+ Module: mod_alias
The ScriptAlias directive has the same behavior as the Alias directive, except that in addition it + marks the target directory as containing CGI scripts that will be + processed by mod_cgi's cgi-script + handler. URLs with a (%-decoded) path beginning with + URL-path will be mapped to scripts beginning with the + second argument which is a full pathname in the local + filesystem.
+ +Example:
+ +
+ ScriptAlias /cgi-bin/ /web/cgi-bin/
+
+
+ A request for http://myserver/cgi-bin/foo would cause the + server to run the script /web/cgi-bin/foo.
+Syntax: ScriptAliasMatch
+ regex file-path|directory-path
+ Context: server config, virtual
+ host
+ Status: Base
+ Module: mod_alias
+ Compatibility: Available in
+ Apache 1.3 and later
This directive is equivalent to ScriptAlias, but makes use of standard
+ regular expressions, instead of simple prefix matching. The
+ supplied regular expression is matched against the URL-path,
+ and if it matches, the server will substitute any parenthesized
+ matches into the given string and use it as a filename. For
+ example, to activate the standard /cgi-bin, one
+ might use:
+ ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 ++
+
+
+
+
+
diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_alias.html.ja.jis usr.sbin/httpd/htdocs/manual/mod/mod_alias.html.ja.jis
--- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_alias.html.ja.jis Wed Dec 31 19:00:00 1969
+++ usr.sbin/httpd/htdocs/manual/mod/mod_alias.html.ja.jis Sun Feb 16 16:05:19 2003
@@ -0,0 +1,397 @@
+
+
+
+
+
+
+
+ $B$3$N%b%8%e!<%k$O!"%[%9%H%U%!%$%k%7%9%F%`>e$N$$$m$$$m$J0c$&>l=j$r(B + $B%I%-%e%a%s%H%D%j!<$K%^%C%W$9$k5!G=$H!"(B + URL $B$N%j%@%$%l%/%H$r9T$J$&5!G=$rDs6!$7$^$9!#(B
+ +$B%9%F!<%?%9(B: Base
+ $B%=!<%9%U%!%$%k(B: mod_alias.c
+ $B%b%8%e!<%k<1JL;R(B:
+ alias_module
$B$3$N%b%8%e!<%k$N%G%#%l%/%F%#%V$O%5!<%P$K%j%/%(%9%H$,E~Ce$7$?$H$-$K(B
+ URL $B$NA`:n$d@)8f$r$9$k$3$H$r2DG=$K$7$^$9!#(BAlias
+ $B%G%#%l%/%F%#%V$H(B ScriptAlias $B%G%#%l%/%F%#%V$O(B
+ URL $B$H%U%!%$%k%7%9%F%`$N%Q%9$r%^%C%W$9$k$?$a$K;HMQ$5$l$^$9!#$3$l$O(B
+ DocumentRoot
+ $B$N2<$K$J$$%I%-%e%a%s%H$r%&%'%V$N%I%-%e%a%s%H%D%j!<$N0lIt$H$7$F(B
+ $BAw$i$l$k$h$&$K$7$^$9!#(BScriptAlias
+ $B%G%#%l%/%F%#%V$K$O%^%C%W@h$N%G%#%l%/%H%j$,(B CGI
+ $B%9%/%j%W%H$N$_$G$"$k$3$H$r<($9$H$$$&DI2C$N8z2L$,$"$j$^$9!#(B
+
Redirect $B%G%#%l%/%F%#%V$O%/%i%$%"%s%H$K0c$C$?(B
+ URL $B$K?7$7$$%j%/%(%9%H$rAw$k$h$&$K;X<($7$^$9!#$3$l$O!"(B
+ $B%j%=!<%9$,?7$7$$>l=j$K0\F0$7$?$H$-$K$h$/;HMQ$5$l$^$9!#(B
URL $B$rA`:n$9$k$?$a$N$h$j6/NO$G=@Fp$J%G%#%l%/%F%#%V72$O(B mod_rewrite
+ $B%b%8%e!<%k$K$"$j$^$9!#(B
+
+ $B9=J8(B: Alias URL-path
+ file-path|directory-path
+ $B%3%s%F%-%9%H(B:
+ $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
+ $B%9%F!<%?%9(B: Base
+ $B%b%8%e!<%k(B: mod_alias
Alias $B%G%#%l%/%F%#%V$O%I%-%e%a%s%H$r%m!<%+%k%U%!%$%k%7%9%F%`$N(B + DocumentRoot + $B0J30$N>l=j$KJ]4I$9$k$3$H$r2DG=$K$7$^$9!#(BUrl-path + (% $B$,I|9f$5$l$?(B) $B$G;O$^$k%Q%9$N(B URL $B$O(B + directory-filename + $B$G;O$^$k%m!<%+%k%U%!%$%k$K%^%C%W$5$l$^$9!#(B
+ +$BNc(B:
+ +
+ Alias /image /ftp/pub/image
+
+
+ http://myserver/image/foo.gif $B$X$N%j%/%(%9%H$KBP$7$F!"%5!<%P$O(B + $B%U%!%$%k(B /ftp/pub/image/foo.gif $B$rJV$7$^$9!#(B
+ +$B$b$7(B url-path $B$N:G8e$K(B /
+ $B$r=q$$$?$J$i!"%5!<%P$O%(%$%j%"%9$rE83+$9$k$?$a$K:G8e$N(B /
+ $B$rMW5a$9$k$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#$9$J$o$A!"(BAlias /icons/
+ /usr/local/apache/icons/ $B$H$$$&$b$N$r;HMQ$7$F$$$k$H!"(B
+ /icons $B$H$$$&(B url $B$O%(%$%j%"%9$5$l$^$;$s!#(B
$B%(%$%j%"%9$N(B$B9T$-@h(B$B$r4^$s$G$$$k(B ScriptAlias
+ $B$b;2>H$7$F$/$@$5$$!#(B $B9=J8(B: AliasMatch regex
+ file-path|directory-path $B$3$N%G%#%l%/%F%#%V$O(B Alias
+ $B$H$[$H$s$IF1$8$G$9$,!"4JC1$J@hF,$+$i$N%^%C%A$r9T$J$&$N$G$O$J$/!"(B
+ $BI8=`@55,I=8=$rMxMQ$7$^$9!#$3$3$G;XDj$5$l$?@55,I=8=$H(B URL-path
+ $B$,9g$&$+$I$&$+$rD4$Y!"9g$&>l9g$O3g8L$G3g$i$l$?%^%C%A$r(B
+ $BM?$($i$l$?J8;zNs$GCV$-49$(!"$=$l$r%U%!%$%kL>$H$7$F;HMQ$7$^$9!#$?$H$($P!"(B
+
+ $B9=J8(B: Redirect [status]
+ URL-path URL Redirect $B%G%#%l%/%F%#%V$O8E$$(B URL $B$r?7$7$$$b$N$X%^%C%W$7$^$9!#(B
+ $B?7$7$$(B URL $B$,%/%i%$%"%s%H$KJV$5$l$^$9!#$=$7$F!"(B
+ $B%/%i%$%"%s%H$O?7$7$$%"%I%l%9$r$b$&0l2s $BNc(B: $B%/%i%$%"%s%H$O(B http://myserver/service/foo.txt
+ $B$X$N%j%/%(%9%H$r9T$J$&$H!"Be$o$j$K(B http://foo2.bar.com/service/foo.txt
+ $B$r%"%/%;%9$9$k$h$&$K9p$2$i$l$^$9!#(B $BCm0U(B:
+ $B@_Dj%U%!%$%kCf$N=gHV$K4X$o$i$:!"(BRedirect $B%G%#%l%/%F%#%V$O(B Alias
+ $B%G%#%l%/%F%#%V$H(B ScriptAlias $B%G%#%l%/%F%#%V$h$j$bM%@h$5$l$^$9!#(B
+ $B$^$?!"(B.htaccess $B%U%!%$%k$d(B <Directory>
+ $B%;%/%7%g%s$NCf$G;H$o$l$F$$$?$H$7$F$b!"(BURL-path
+ $B$OAjBP%Q%9$G$O$J$/!"@dBP%Q%9$G$J$1$l$P$J$j$^$;$s!#(B $B$b$7(B status $B0z?t$,M?$($i$l$F$$$J$1$l$P!"%j%@%$%l%/%H$O(B
+ "temporary" (HTTP $B%9%F!<%?%9(B 302) $B$K$J$j$^$9!#$3$l$O%/%i%$%"%s%H$K(B
+ $B%j%=!<%9$,0l;~E*$K0\F0$7$?$H$$$&$3$H$r<($7$^$9!#(BStatus
+ $B0z?t$O(B $BB>$N(B HTTP $B$N%9%F!<%?%9%3!<%I$rJV$9$?$a$K;HMQ$9$k$3$H$,$G$-$^$9(B: Status $B$NCM$K%9%F!<%?%9%3!<%I$r?tCM$GM?$($k$3$H$G(B
+ $BB>$N%9%F!<%?%9%3!<%I$bJV$9$3$H$,$G$-$^$9!#%9%F!<%?%9$,(B 300 $B$H(B 399
+ $B$N4V$K$"$k>l9g!"(Burl $B0z?t$OB8:_$7$F$$$J$1$l$P$$$1$^$;$s!#(B
+ $B$=$NB>$N>l9g$O>JN,$5$l$F$$$J$1$l$P$J$j$^$;$s!#$?$@$7!"(B
+ $B%9%F!<%?%9$O(B Apache $B$N%3!<%I$,CN$C$F$$$k$b$N$G$"$kI,MW$,$"$j$^$9(B
+ (http_protocol.c $B$N4X?t(B $BNc(B: $B9=J8(B: RedirectMatch
+ [status] regex URL $B$3$N%G%#%l%/%F%#%V$O(B Redirect
+ $B$H$[$H$s$IF1$8$G$9$,!"4JC1$J@hF,$+$i$N%^%C%A$r9T$J$&$N$G$O$J$/!"(B
+ $BI8=`@55,I=8=$rMxMQ$7$^$9!#$3$3$G;XDj$5$l$?@55,I=8=$H(B URL-path
+ $B$,9g$&$+$I$&$+$rD4$Y!"9g$&>l9g$O3g8L$G3g$i$l$?%^%C%A$r(B
+ $BM?$($i$l$?J8;zNs$GCV$-49$(!"$=$l$r%U%!%$%kL>$H$7$F;HMQ$7$^$9!#(B
+ $B$?$H$($P!"$9$Y$F$N(B GIF $B%U%!%$%k$rJL%5!<%P$NF1MM$JL>A0$N(B JPEG
+ $B%U%!%$%k$K%j%@%$%l%/%H$9$k$K$O!"0J2<$N$h$&$J$b$N$r;H$$$^$9(B:
+
+ $B9=J8(B: RedirectTemp URL-path
+ URL $B$3$N%G%#%l%/%F%#%V$O%/%i%$%"%s%H$K(B Redirect
+ $B$,0l;~E*$J$b$N$G$"$k(B ($B%9%F!<%?%9(B 302) $B$3$H$rCN$i$;$^$9!#(B
+
+ $B9=J8(B: RedirectPermanent
+ URL-path URL $B$3$N%G%#%l%/%F%#%V$O%/%i%$%"%s%H$K(B Redirect $B$,1J5WE*$J$b$N(B
+ ($B%9%F!<%?%9(B 301) $B$G$"$k$3$H$rCN$i$;$^$9!#(B
+
+ $B9=J8(B: ScriptAlias URL-path
+ file-path|directory-path ScriptAlias $B%G%#%l%/%F%#%V$O!"BP>]%G%#%l%/%H%j$K(B
+ mod_cgi $B$N(B cgi-script
+ $B%O%s%I%i$G=hM}$5$l$k(B CGI
+ $B%9%/%j%W%H$,$"$k$3$H$r<($90J30$O(B
+ Alias
+ $B%G%#%l%/%F%#%V$HF1$8?6$kIq$$$r$7$^$9!#(BURL-path
+ (% $B$,I|9f$5$l$?(B) $B%Q%9$G(B $B;O$^$k(B URL $B$O%m!<%+%k$N%U%!%$%k%7%9%F%`$N(B
+ $B%U%k%Q%9$G$"$kFsHVL\$N0z?t$K%^%C%W$5$l$^$9!#(B $BNc(B: http://myserver/cgi-bin/foo $B$X$N%j%/%(%9%H$KBP$7$F%5!<%P$O%9%/%j%W%H(B
+ /web/cgi-bin/foo $B$r $B9=J8(B: ScriptAliasMatch regex
+ file-path|directory-path $B$3$N%G%#%l%/%F%#%V$O(B ScriptAlias
+ $B$H$[$H$s$IF1$8$G$9$,!"4JC1$J@hF,$+$i$N%^%C%A$r9T$J$&$N$G$O$J$/!"(B
+ $BI8=`@55,I=8=$rMxMQ$7$^$9!#$3$3$G;XDj$5$l$?@55,I=8=$H(B URL-path
+ $B$,9g$&$+$I$&$+$rD4$Y!"9g$&>l9g$O3g8L$G3g$i$l$?%^%C%A$r(B
+ $BM?$($i$l$?J8;zNs$GCV$-49$(!"$=$l$r%U%!%$%kL>$H$7$F;HMQ$7$^$9!#(B
+ $B$?$H$($P!"I8=`$N(B This module provides for user authentication using text
- files. Status: Base This module allows the use of HTTP Basic Authentication to
- restrict access by looking up users in plain text password and
- group files. Similar functionality and greater scalability is
- provided by mod_auth_dbm and mod_auth_db. HTTP Digest
- Authentication is provided by mod_auth_digest. Note that these credential-based security mechanisms are
- only as strong as your Web server's security. As a rule, they
- are not as strong as the operating system's own security
- system. See also: require, satisfy, and mod_auth require keywords. The Consider a multi-user system running the Apache Web server,
- with each user having his or her own files in
- The AuthGroupFile directive sets the name of a textual file
- containing the list of user groups for user authentication.
- File-path is the path to the group file. If it is not
- absolute (i.e., if it doesn't begin with a slash), it
- is treated as relative to the ServerRoot. Each line of the group file contains a groupname followed by
- a colon, followed by the member usernames separated by spaces.
- Example: Security: make sure that the AuthGroupFile is stored outside
- the document tree of the web-server; do not put it in
- the directory that it protects. Otherwise, clients will be able
- to download the AuthGroupFile. See also AuthName, AuthType and AuthUserFile. The AuthUserFile directive sets the name of a textual file
- containing the list of users and passwords for user
- authentication. File-path is the path to the user
- file. If it is not absolute (i.e., if it doesn't begin
- with a slash), it is treated as relative to the ServerRoot. Each line of the user file contains a username followed by a
- colon, followed by the The utility htpasswd
- which is installed as part of the binary distribution, or which
- can be found in Note that searching large text files is very
- inefficient; AuthDBMUserFile
- should be used instead. Setting the AuthAuthoritative directive explicitly to
- 'off' allows for both authentication and
- authorization to be passed on to lower level modules (as
- defined in the So if a userID appears in the database of more than one
- module; or if a valid A common use for this is in conjunction with one of the
- database modules; such as Default: By default; control is
- not passed on; and an unknown userID or rule will result in an
- Authorization Required reply. Not setting it thus keeps the
- system secure; and forces an NCSA compliant behavior. Security: Do consider the implications of allowing a user to
- allow fall-through in his .htaccess file; and verify that this
- is really what you want; Generally it is easier to just secure
- a single .htpasswd file, than it is to secure a database such
- as mSQL. Make sure that the AuthUserFile is stored outside the
- document tree of the web-server; do not put it in the
- directory that it protects. Otherwise, clients will be able to
- download the AuthUserFile. See also AuthName, AuthType and AuthGroupFile. This module provides for user authentication using text
+ files. Status: Base This module allows the use of HTTP Basic Authentication to
+ restrict access by looking up users in plain text password and
+ group files. Similar functionality and greater scalability is
+ provided by mod_auth_dbm and mod_auth_db. HTTP Digest
+ Authentication is provided by mod_auth_digest. Note that these credential-based security mechanisms are
+ only as strong as your Web server's security. As a rule, they
+ are not as strong as the operating system's own security
+ system. See also: require, satisfy, and mod_auth require keywords. The Consider a multi-user system running the Apache Web server,
+ with each user having his or her own files in
+ The AuthGroupFile directive sets the name of a textual file
+ containing the list of user groups for user authentication.
+ File-path is the path to the group file. If it is not
+ absolute (i.e., if it doesn't begin with a slash), it
+ is treated as relative to the ServerRoot. Each line of the group file contains a groupname followed by
+ a colon, followed by the member usernames separated by spaces.
+ Example: Security: make sure that the AuthGroupFile is stored outside
+ the document tree of the web-server; do not put it in
+ the directory that it protects. Otherwise, clients will be able
+ to download the AuthGroupFile. See also AuthName, AuthType and AuthUserFile. The AuthUserFile directive sets the name of a textual file
+ containing the list of users and passwords for user
+ authentication. File-path is the path to the user
+ file. If it is not absolute (i.e., if it doesn't begin
+ with a slash), it is treated as relative to the ServerRoot. Each line of the user file contains a username followed by a
+ colon, followed by the The utility htpasswd
+ which is installed as part of the binary distribution, or which
+ can be found in Note that searching large text files is very
+ inefficient; AuthDBMUserFile
+ should be used instead. Setting the AuthAuthoritative directive explicitly to
+ 'off' allows for both authentication and
+ authorization to be passed on to lower level modules (as
+ defined in the So if a userID appears in the database of more than one
+ module; or if a valid A common use for this is in conjunction with one of the
+ database modules; such as Default: By default; control is
+ not passed on; and an unknown userID or rule will result in an
+ Authorization Required reply. Not setting it thus keeps the
+ system secure; and forces an NCSA compliant behavior. Security: Do consider the implications of allowing a user to
+ allow fall-through in his .htaccess file; and verify that this
+ is really what you want; Generally it is easier to just secure
+ a single .htpasswd file, than it is to secure a database such
+ as mSQL. Make sure that the AuthUserFile is stored outside the
+ document tree of the web-server; do not put it in the
+ directory that it protects. Otherwise, clients will be able to
+ download the AuthUserFile. See also AuthName, AuthType and AuthGroupFile. <Directory>
+ $B%;%/%7%g%s$rDI2C$9$kI,MW$,$"$k$+$b$7$l$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B
+ $B%(%$%j%"%9$NE83+$O(B <Directory>
+ $B%;%/%7%g%s$rD4$Y$kA0$K9T$J$o$l$^$9$N$G!"(B
+ $B%(%$%j%"%9$N9T$-@h$N(B <Directory> $B%;%/%7%g%s$N$_(B
+ $B8z2L$,$"$j$^$9!#(B
+ ($B$7$+$7!"(B<Location>
+ $B%;%/%7%g%s$O%(%$%j%"%9$,=hM}$5$l$kA0$K
+
+ AliasMatch
+
+
+ $B%3%s%F%-%9%H(B:
+ $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
+ $B%9%F!<%?%9(B: Base
+ $B%b%8%e!<%k(B: mod_alias
+ $B8_49@-(B: Apache 1.3
+ $B0J9_$G;HMQ2DG=(B/icons $B%G%#%l%/%H%j$r;HMQ$9$k$h$&$K$9$k(B
+ $B$?$a$K$O0J2<$N$h$&$J$b$N$,;HMQ$G$-$^$9(B:
+ AliasMatch ^/icons(.*) /usr/local/apache/icons$1
+
+
+
+ Redirect
+ $B%G%#%l%/%F%#%V(B
+
+
+ $B%3%s%F%-%9%H(B:
+ $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"(B
+ $B%G%#%l%/%H%j!"(B.htaccess
+ $B>e=q$-(B: FileInfo
+ $B%9%F!<%?%9(B: Base
+ $B%b%8%e!<%k(B: mod_alias
+ $B8_49@-(B: $B%G%#%l%/%H%j$H(B
+ .htaccess $B$N%3%s%F%-%9%H$O(B 1.1 $B0J9_$N$_!#(BStatus
+ $B0z?t$O(B Apache 1.2 $B0J9_!#(B
+
+
+ Redirect /service http://foo2.bar.com/service
+
+
+
+ send_error_response
+ $B$r8+$F$/$@$5$$(B)$B!#(B
+ Redirect permanent /one http://example.com/two
+
+ Redirect 303 /two http://example.com/other
+
+
+ RedirectMatch
+
+
+ $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B
+ $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
+ $B>e=q$-(B: FileInfo
+ $B%9%F!<%?%9(B: Base
+ $B%b%8%e!<%k(B: mod_alias
+ $B8_49@-(B: Apache 1.3
+ $B0J9_$G;HMQ2DG=!#(B
+ RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
+
+
+
+ RedirectTemp
+ $B%G%#%l%/%F%#%V(B
+
+
+ $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B
+ $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
+ $B>e=q$-(B: FileInfo
+ $B%9%F!<%?%9(B: Base
+ $B%b%8%e!<%k(B: mod_alias
+ $B8_49@-(B:
+ $B$3$N%G%#%l%/%F%#%V$O(B Apache 1.2 $B0J9_$G$N$_;HMQ2DG=(BRedirect temp $B$H$^$C$?$/F1$8$G$9!#(B
+
+ RedirectPermanent
+ $B%G%#%l%/%F%#%V(B
+
+
+ $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B
+ $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
+ $B>e=q$-(B: FileInfo
+ $B%9%F!<%?%9(B: Base
+ $B%b%8%e!<%k(B: mod_alias
+ $B8_49@-(B:
+ $B$3$N%G%#%l%/%F%#%V$O(B Apache 1.2 $B0J9_$G$N$_;HMQ2DG=!#(BRedirect premanent $B$H$^$C$?$/F1$8$G$9!#(B
+
+ ScriptAlias
+ $B%G%#%l%/%F%#%V(B
+
+
+ $B%3%s%F%-%9%H(B:
+ $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
+ $B%9%F!<%?%9(B: Base
+ $B%b%8%e!<%k(B: mod_alias
+
+
+ ScriptAlias /cgi-bin/ /web/cgi-bin/
+
+
+ ScriptAliasMatch
+
+
+ $B%3%s%F%-%9%H(B:
+ $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
+ $B%9%F!<%?%9(B: Base
+ $B%b%8%e!<%k(B: mod_alias
+ $B8_49@-(B: Apache 1.3
+ $B0J9_$G;HMQ2DG=(B/cgi-bin
+ $B$r;HMQ$9$k$h$&$K$9$k$?$a$K$O!"0J2<$N$h$&$J$b$N$r;H$$$^$9(B:
+
+ ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
+
+
+
+ Apache HTTP Server Version 1.3
+
+
+
+
+
diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_auth.html usr.sbin/httpd/htdocs/manual/mod/mod_auth.html
--- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_auth.html Thu Feb 13 12:15:06 2003
+++ usr.sbin/httpd/htdocs/manual/mod/mod_auth.html Sun Feb 16 16:05:19 2003
@@ -1,322 +0,0 @@
-
-
-
-
-
-
-
-
- Apache HTTP Server Version 1.3
- Module mod_auth
-
-
- Source File: mod_auth.c
- Module Identifier:
- auth_moduleSummary
-
- Directives
-
-
-
-
-
-
-
-
- mod_auth
- Require Keywordsmod_auth module supports the following
- keywords that can be given to the Require directive:
-
- user username [...]group groupname [...]valid-userfile-ownerjones, then
- the username used to access it through the Web must be
- jones as well.file-groupaccounts, the group accounts must
- be in the AuthGroupFile database and the username used in the
- request must be a member of that group.
-
- Example of
-
- Require
- file-owner~/public_html/private. Assuming that there is a
- single AuthUserFile database that lists all of their usernames,
- and that their Web usernames match the ones that actually own
- the files on the server, then the following stanza would allow
- only the user himself access to his own files. User
- jones would not be allowed to access files in
- /home/smith/public_html/private unless they were
- owned by jones instead of smith.
- <Directory /home/*/public_html/private>
- AuthType Basic
- AuthName MyPrivateFile
- AuthUserFile /usr/local/apache/etc/.htpasswd-allusers
- Satisfy All
- Require file-owner
- </Directory>
-
-
-
- AuthGroupFile directive
- Syntax: AuthGroupFile
- file-path
- Context: directory,
- .htaccess
- Override: AuthConfig
- Status: Base
- Module: mod_auth
-
-
-
- Note that searching large text files is very
- inefficient; AuthDBMGroupFile
- should be used instead.
-
- mygroup: bob joe anne
-
-
- AuthUserFile
- directive
- Syntax: AuthUserFile
- file-path
- Context: directory,
- .htaccess
- Override: AuthConfig
- Status: Base
- Module: mod_auth
-
- crypt() encrypted password.
- The behavior of multiple occurrences of the same user is
- undefined.src/support, is used to maintain
- this password file. See the man page for more
- details. In short
-
-
- htpasswd -c Filename username
- Create a password file 'Filename' with 'username' as the
- initial ID. It will prompt for the password. htpasswd
- Filename username2
- Adds or modifies in password file 'Filename' the 'username'.
-
-
- See also AuthName, AuthType and AuthGroupFile.
- Require valid-user' will allow access if both
- the username and password in the credentials are
- omitted.
-
- AuthAuthoritative directive
- Syntax: AuthAuthoritative
- on|off
- Default:
- AuthAuthoritative on
- Context: directory,
- .htaccess
- Override: AuthConfig
- Status: Base
- Module: mod_auth
-
- Configuration and
- modules.c files) if there is no
- userID or rule matching the supplied
- userID. If there is a userID and/or rule specified; the usual
- password and access checks will be applied and a failure will
- give an Authorization Required reply.Require directive applies to
- more than one module; then the first module will verify the
- credentials; and no access is passed on; regardless of the
- AuthAuthoritative setting.mod_auth_db.c, mod_auth_dbm.c,
- mod_auth_msql.c, and mod_auth_anon.c.
- These modules supply the bulk of the user credential checking;
- but a few (administrator) related accesses fall through to a
- lower level with a well protected AuthUserFile.
-
- Apache HTTP Server Version 1.3
-
-
-
-
+
+ Apache HTTP Server Version 1.3
+ Module mod_auth
+
+
+ Source File: mod_auth.c
+ Module Identifier:
+ auth_moduleSummary
+
+ Directives
+
+
+
+
+
+
+
+
+ mod_auth
+ Require Keywordsmod_auth module supports the following
+ keywords that can be given to the Require directive:
+
+ user username [...]group groupname [...]valid-userfile-ownerjones, then
+ the username used to access it through the Web must be
+ jones as well.file-groupaccounts, the group accounts must
+ be in the AuthGroupFile database and the username used in the
+ request must be a member of that group.
+
+ Example of
+
+ Require
+ file-owner~/public_html/private. Assuming that there is a
+ single AuthUserFile database that lists all of their usernames,
+ and that their Web usernames match the ones that actually own
+ the files on the server, then the following stanza would allow
+ only the user himself access to his own files. User
+ jones would not be allowed to access files in
+ /home/smith/public_html/private unless they were
+ owned by jones instead of smith.
+ <Directory /home/*/public_html/private>
+ AuthType Basic
+ AuthName MyPrivateFile
+ AuthUserFile /usr/local/apache/etc/.htpasswd-allusers
+ Satisfy All
+ Require file-owner
+ </Directory>
+
+
+
+ AuthGroupFile directive
+ Syntax: AuthGroupFile
+ file-path
+ Context: directory,
+ .htaccess
+ Override: AuthConfig
+ Status: Base
+ Module: mod_auth
+
+
+
+ Note that searching large text files is very
+ inefficient; AuthDBMGroupFile
+ should be used instead.
+
+ mygroup: bob joe anne
+
+
+ AuthUserFile
+ directive
+ Syntax: AuthUserFile
+ file-path
+ Context: directory,
+ .htaccess
+ Override: AuthConfig
+ Status: Base
+ Module: mod_auth
+
+ crypt() encrypted password.
+ The behavior of multiple occurrences of the same user is
+ undefined.src/support, is used to maintain
+ this password file. See the man page for more
+ details. In short
+
+
+ htpasswd -c Filename username
+ Create a password file 'Filename' with 'username' as the
+ initial ID. It will prompt for the password. htpasswd
+ Filename username2
+ Adds or modifies in password file 'Filename' the 'username'.
+
+
+ See also AuthName, AuthType and AuthGroupFile.
+ Require valid-user' will allow access if both
+ the username and password in the credentials are
+ omitted.
+
+ AuthAuthoritative directive
+ Syntax: AuthAuthoritative
+ on|off
+ Default:
+ AuthAuthoritative on
+ Context: directory,
+ .htaccess
+ Override: AuthConfig
+ Status: Base
+ Module: mod_auth
+
+ Configuration and
+ modules.c files) if there is no
+ userID or rule matching the supplied
+ userID. If there is a userID and/or rule specified; the usual
+ password and access checks will be applied and a failure will
+ give an Authorization Required reply.Require directive applies to
+ more than one module; then the first module will verify the
+ credentials; and no access is passed on; regardless of the
+ AuthAuthoritative setting.mod_auth_db.c, mod_auth_dbm.c,
+ mod_auth_msql.c, and mod_auth_anon.c.
+ These modules supply the bulk of the user credential checking;
+ but a few (administrator) related accesses fall through to a
+ lower level with a well protected AuthUserFile.
+
+ Apache HTTP Server Version 1.3
+
+
+
+
+
+ + $B$3$N%b%8%e!<%k$O%F%-%9%H%U%!%$%k$r;H$C$F%f!<%6$NG'>Z$r9T$J$&5!G=$r(B + $BDs6!$7$^$9!#(B
+ +$B%9%F!<%?%9(B: Base
+ $B%=!<%9%U%!%$%k(B:
+ mod_auth.c
+ $B%b%8%e!<%k<1JL;R(B:
+ auth_module
+ $B$3$N%b%8%e!<%k$O%f!<%6$r%W%l!<%s%F%-%9%H$N%Q%9%o!<%I$H%0%k!<%W(B + $B%U%!%$%k$GD4$Y$k$3$H$K$h$j!"(BHTTP + $B4pK\G'>Z$G%"%/%;%9$r@)8B$9$k$3$H$r(B + $B2DG=$K$7$^$9!#F1MM$N5!G=$G%9%1!<%i%S%j%F%#$N$"$k$b$N$O(B mod_auth_dbm $B$H(B mod_auth_db $B$K$h$jDs6!$5$l$^$9!#(B + HTTP $B%@%$%8%'%9%HG'>Z$O(B mod_auth_digest + $B$K$h$jDs6!$5$l$F$$$^$9!#(B
+ ++ $B$3$l$i$NG'>Z$K4p$E$$$?%;%-%e%j%F%#$N5!9=$O$;$$$<$$%&%'%V%5!<%P$N(B + $B%;%-%e%j%F%#$HF1DxEY$N6/EY$G$"$k$3$H$KCm0U$7$F$/$@$5$$!#(B + $B0lHL$K!"%*%Z%l!<%F%#%s%0%7%9%F%`$N%;%-%e%j%F%#%7%9%F%`$[$I$O(B + $B6/$/(B$B$"$j$^$;$s(B$B!#(B
+ +$B;2>H(B: require, satisfy, mod_auth + require $B%-!<%o!<%I(B$B!#(B
+mod_auth Require
+ $B%-!<%o!<%I(Bmod_auth $B%b%8%e!<%k$O(B Require $B%G%#%l%/%F%#%V$KBP$9$k(B
+ $B0J2<$N%-!<%o!<%I$r%5%]!<%H$7$^$9(B:
user username [...]group groupname [...]valid-userfile-ownerjones $B$G$"$k!"$H8@$C$?>l9g$O!"(BWeb
+ $B$rDL$7$F(B $B%"%/%;%9$9$k%f!<%6L>$b(B jones
+ $B$G$"$kI,MW$G$"$k!"(B $B$H$$$&$3$H$G$9!#(Bfile-groupaccounts
+ $B$K$h$j=jM-$5$l$F$$$k$H8@$C$?(B $B>l9g!"%0%k!<%W(B
+ accounts $B$,(B AuthGroupFile $B%G!<%?%Y!<%9$K(B
+ $BB0$7$F$$$kI,MW$,$"$j!"%j%/%(%9%H$K;HMQ$5$l$?%f!<%6L>$b(B
+ $B$=$N%0%k!<%W$N%a%s%P$G$"$kI,MW$,$"$j$^$9!#(BAuthGroupFile $B%G%#%l%/%F%#%V$O%f!<%6G'>Z$N$?$a$N(B + $B%f!<%6%0%k!<%W$N%j%9%H$,=q$+$l$?%F%-%9%H%U%!%$%k$NL>A0$r@_Dj$7$^$9!#(B + Filename + $B$O%0%k!<%W%U%!%$%k$N%Q%9$G$9!#@dBP%Q%9$G$J$$$H$-$O(B + ($B$9$J$o$A(B$B!"%9%i%C%7%e$G;O$^$i$J$$$H$-$O(B)$B!"(BServerRoot + $B$+$i$NAjBP%Q%9$H$7$F07$o$l$^$9!#(B
+ ++ $B%0%k!<%W%U%!%$%k$N$=$l$>$l$N9T$O!"%0%k!<%WL>!"%3%m%s!"6uGr$G(B + $B6h@Z$i$l$?%0%k!<%W$KB0$9$k%f!<%6L>!"$+$i$J$j$^$9!#Nc(B:
+ +
+ mygroup: bob joe anne
+
+
+ + $BBg$-$J%F%-%9%H%U%!%$%k$rC5$9$N$O(B$BHs>o(B$B$K8zN($,0-$$$H$$$&$3$H$K(B + $BCm0U$7$F$/$@$5$$!#$=$N$h$&$J>l9g$O!"Be$o$j$K(B AuthDBMGroupFile + $B$r(B $B;H$C$F$/$@$5$$!#(B
+ +$B%;%-%e%j%F%#(B: AuthGroupFile + $B$OI,$:%&%'%V%5!<%P$N%I%-%e%a%s%H%D%j!<$N30$K(B + $BJ]4I$7$F$/$@$5$$!#$=$l$,J]8n$7$F$$$k%G%#%l%/%H%j$K$OCV$+(B$B$J$$(B$B$G(B + $B$/$@$5$$!#$=$&$G$J$$$H!"%/%i%$%"%s%H$,(B AuthGroupFile + $B$r%@%&%s%m!<%I(B $B$G$-$F$7$^$$$^$9!#(B
+ +AuthName, AuthType, AuthUserFile + $B$b;2>H$7$F$/$@$5$$!#(B
+AuthUserFile + $B%G%#%l%/%F%#%V$O%f!<%6G'>Z$N$?$a$N%f!<%6$H%Q%9%o!<%I$N(B + $B%j%9%H$,=q$+$l$?%F%-%9%H%U%!%$%k$rL>A0$r@_Dj$7$^$9!#(BFile-path + $B$O(B $B%f!<%6%U%!%$%k$X$N%Q%9$G$9!#@dBP%Q%9$G$J$$$H$-$O(B + ($B$9$J$o$A(B$B!"(B + $B%9%i%C%7%e$G;O$^$i$J$$$H$-$O(B)$B!"(BServerRoot + $B$+$i$NAjBP%Q%9$H$7$F07$o$l$^$9!#(B
+ +
+ $B%f!<%6%U%!%$%k$N$=$l$>$l$N9T$O!"%f!<%6L>!"%3%m%s!"(Bcrypt()
+ $B$K$h$j0E9f2=$5$l$?(B
+ $B%Q%9%o!<%I!"$+$i$J$j$^$9!#F1$8%f!<%6$,J#?t2s8=$l$?$H$-$NF0:n$O(B
+ $BITDj$G$9!#(B
+ $B%P%$%J%jG[I[$N0lIt$H$7$F%$%s%9%H!<%k$5$l$F$$$k$+!"(B
+ $BBg$-$J%F%-%9%H%U%!%$%k$rC5$9$N$O(B$BHs>o(B$B$K8zN($,0-$$$H$$$&$3$H$K(B
+ $BCm0U$7$F$/$@$5$$!#$=$N$h$&$J>l9g$O!"Be$o$j$K(B AuthDBMUserFile
+ $B$r(B $B;H$C$F$/$@$5$$!#(B $B%;%-%e%j%F%#(B: AuthUserFile
+ $B$OI,$:%&%'%V%5!<%P$N%I%-%e%a%s%H%D%j!<$N30$K(B
+ $BJ]4I$7$F$/$@$5$$!#$=$l$,J]8n$7$F$$$k(B
+ $B%G%#%l%/%H%j$K$OCV$+$J$$$G$/$@$5$$!#(B
+ $B$=$&$G$J$$$H!"%/%i%$%"%s%H$,(B AuthUserFile
+ $B$r%@%&%s%m!<%I$G$-$F$7$^$$$^$9!#(B AuthName, AuthType, AuthGroupFile
+ $B$b;2>H$7$F$/$@$5$$!#(B AuthAuthoritative $B%G%#%l%/%F%#%V$rL@<(E*$K(B
+ 'off' $B$K(B $B@_Dj$9$k$H!"(BuserID
+ $B$K9g$&(B userID $B$,L5$$(B $B$H$-$H!"(B
+ $B$=$l$K9g$&(B$B%k!<%k(B$B$,L5$$$H$-$K!"G'>Z$H8"8B$NIUM?$NN>J}$r(B
+ ( $B$G$9$+$i!"(BuserID
+ $B$,J#?t$N%b%8%e!<%k$N%G!<%?%Y!<%9$K8=$l$?$j!"(B $B@5$7$$(B
+ $B$3$N%G%#%l%/%F%#%V$NIaDL$NMxMQJ}K!$O!"(B $B%G%U%)%k%H(B:
+ $B%G%U%)%k%H$G$O@)8f$OEO$5$l$^$;$s!#(B $BCN$i$J$$(B userID
+ $B$d%k!<%k$N7k2L$O(B Authorization Require $B1~Ez$K$J$j$^$9!#(B
+ $B$G$9$+$i!"$3$N%G%#%l%/%F%#%V$r@_Dj$7$J$$$H%7%9%F%`$r0BA4$KJ]$D$3$H$,$G$-!"(B
+ NCSA $B$HF1$8F0:n$r$9$k$h$&$K$G$-$^$9!#(B AuthName, AuthType, AuthGroupFile
+ $B$b;2>H$7$F$/$@$5$$!#(B This directive can replace, merge or remove HTTP response
- headers. The action it performs is determined by the first
+ headers during 1xx and 2xx series replies. For 3xx, 4xx and 5xx
+ use the ErrorHeader directive.
+
+ The action it performs is determined by the first
argument. This can be one of the following values: This directive can replace, merge or remove HTTP response
+ headers during 3xx, 4xx and 5xx replies. For normal replies
+ use the Header directive.
+ This directive is identical to the Header
+ directive in all other respects. Consult this directive for
+ more information on the syntax.
+ src/support
+ $B$K$"$k(B htpasswd
+ $B%f!<%F%#%j%F%#$O!"(B
+ $B$3$N%Q%9%o!<%I%U%!%$%k$r0];}$9$k$?$a$K;HMQ$5$l$^$9!#>\:Y$O(B
+ man
+ $B%Z!<%8$r;2>H$7$F$/$@$5$$!#
+
+
+ htpasswd -c Filename username
+ $B$O(B 'username' $B$r=i4|(B ID $B$H$7$F%Q%9%o!<%I%U%!%$%k(B
+ 'Filename' $B$r(B
+ $B:n@.$7$^$9!#$3$l$O%Q%9%o!<%I$NF~NO$rB%$7$^$9!#(B htpasswd
+ Filename username2
+ $B$O%Q%9%o!<%I%U%!%$%k(B 'Filename' $B$K(B 'username' $B$r(B
+ $BDI2C$9$k$+!"4{$K$"$k(B 'username' $B$r=$@5$7$^$9!#(B
+
+
+ AuthAuthoritative
+ $B%G%#%l%/%F%#%V(B
+ $B9=J8(B: AuthAuthoritative
+ on|off
+ $B%G%U%)%k%H(B:
+ AuthAuthoritative on
+ $B%3%s%F%-%9%H(B:
+ $B%G%#%l%/%H%j!"(B.htaccess
+ $B>e=q$-(B: AuthConfig
+ $B%9%F!<%?%9(B: Base
+ $B%b%8%e!<%k(B: mod_auth
+
+ $B@_Dj(B $B$d(B modules.c
+ $B$GDj5A$5$l$F$$$k(B $BJ}K!$G(B)
+ $B2<0L$N%b%8%e!<%k$KEO$9$3$H$r2DG=$K$7$^$9!#(B userID
+ $B$+%k!<%k$,;XDj$5$l$F$$$k$H$-$K$O!"DL>o$HF1$8%Q%9%o!<%I$H(B
+ $B%"%/%;%9$N%A%'%C%/$,9T$J$o$l!"@.8y$7$J$+$C$?>l9g$O(B
+ Authorization Required $B1~Ez$,JV$5$l$^$9!#(BRequire
+ $B%G%#%l%/%F%#%V$,J#?t$N%b%8%e!<%k$KE,MQ$5$l$?$j(B
+ $B$9$k$H$-$O!":G=i$N%b%8%e!<%k$,;q3J$rD4::$7$^$9!#(BAuthAuthoritative
+ $B$N(B
+ $B@_Dj$K4X$o$i$:!"%"%/%;%9$ND4::$OJL$N%b%8%e!<%k$K$OEO$5$l$^$;$s!#(Bmod_auth_db.c, mod_auth_dbm.c,
+ mod_auth_msql.c, mod_auth_anon.c
+ $B$N$h$&$J%G!<%?%Y!<%9%b%8%e!<%k$H0l=o$K;H$&$b$N$G$9!#(B
+ $B$3$l$i$N%b%8%e!<%k$OBgItJ,$N%f!<%6$N;q3JD4::$r9T$J$&5!G=$rDs6!$7$^$9!#(B
+ $B$7$+$7!">.?t$N(B ($B4IM}
+
+
+ Require valid-user'
+ $B$O%"%/%;%9$r5v2D$7$^$9!#(B
+
+ Apache HTTP Server Version 1.3
+
+
+
+
+
+
diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_headers.html usr.sbin/httpd/htdocs/manual/mod/mod_headers.html
--- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_headers.html Thu Feb 13 12:15:06 2003
+++ usr.sbin/httpd/htdocs/manual/mod/mod_headers.html Sun Feb 16 16:05:19 2003
@@ -43,6 +43,7 @@
@@ -61,10 +62,14 @@
Status: Extension
Module: mod_header
+ rel="Help">Module: mod_headers
@@ -132,6 +137,32 @@
added just before the response is sent cannot be unset or
overridden. This includes headers such as "Date" and
"Server".
ErrorHeader directive
+ Syntax: ErrorHeader set|append|add
+ header value
+ Syntax: ErrorHeader unset
+ header
+ Context: server config, virtual
+ host, access.conf, .htaccess
+ Override: FileInfo
+ Status: Extension
+ Module: mod_headers
+
+
diff -ruN --exclude=CVS -I \$Id: -I \$OpenBSD: /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_info.html.en usr.sbin/httpd/htdocs/manual/mod/mod_info.html.en
--- /backup/work/stable/src-OPENBSD_3_2/usr.sbin/httpd/htdocs/manual/mod/mod_info.html.en Thu Feb 13 12:15:06 2003
+++ usr.sbin/httpd/htdocs/manual/mod/mod_info.html.en Sun Feb 16 16:05:19 2003
@@ -74,6 +74,14 @@
files, including per-directory files (e.g.,
.htaccess). This may have security-related
ramifications for your site.
In particular, this module can leak sensitive information + from the configuration directives of other Apache modules such as + system paths, usernames/passwords, database names, etc. Due to + the way this module works there is no way to block information + from it. Therefore, this module should ONLY be used in a controlled + environment and always with caution.
+In particular, this module can leak sensitive information + from the configuration directives of other Apache modules such as + system paths, usernames/passwords, database names, etc. Due to + the way this module works there is no way to block information + from it. Therefore, this module should ONLY be used in a controlled + environment and always with caution.
+You cannot run Apache from the command line on TPF. However - you can use those Apache command line options which don't - actually start the server. This requires PJ27277 which shipped - on PUT13.
+Apache can be invoked with various options, such as "-f". + Some of these options display information about the server or perform syntax checks + but they don't actually start the server. + These "information only" options are useful with TPF's ZFILE command line feature: + -h, -l, -L, -S, -t, -T, -v, and -V. +
+ +Another option, -X, is used when actually running the server. + It is passed to Apache through the ZINET XPARM field since ZINET is the only way to start the server on TPF.
+ +A third group of options apply to both the informational displays (ZFILE) and + running the server (ZINET XPARM): -d, -D and -f.
+ +The rest of Apache's options are either not applicable or are not supported on TPF.
-Using dash options requires PJ27277 which shipped on PUT13.
+ +-d directory
- Specify an alternate initial ServerRoot directory.
- Default is /usr/local/apache.
-f file
- Specify an alternate server configuration file.
- Default is conf/httpd.conf.
-h
- List a short summary of available command line options.
- (Note that this outputs all options, not just those supported
- on TPF.)
-l
- List modules compiled into the server.
-L
- List available configuration directives. (Note that this
- outputs all configuration directives, not just those
- supported on TPF.)
-S
- Show the settings as parsed from the configuration file.
- Currently only shows the virtualhost settings.
-t
- Run syntax tests for configuration files (with document root
- checks)
-T
- Run syntax tests for configuration files (without document
- root checks)
-v
- Show the version number.
-V
- Show the version number and various compile settings.
See http://httpd.apache.org/docs/programs/httpd.html - for more information about these command line options.
+| Option + | ZFILE | +ZINET + | Description |
| -d path | +ZFILE | +ZINET | +Set the initial value for the ServerRoot directive. |
| -D define | +ZFILE | +ZINET | +Set a configuration parameter which can be used with <IfDefine>...</IfDefine> sections in the configuration file to conditionally skip or process commands. |
| -f filename | +ZFILE | +ZINET | +Use an alternate configuration file instead of the default conf/httpd.conf file. |
| -h | +ZFILE | ++ | List a short summary of available command line options then exit. + Note that this outputs all options, not just those supported on TPF. |
| -l | +ZFILE | ++ | List modules compiled into the server then exit. |
| -L | +ZFILE | ++ | List available configuration directives then exit. Note that this outputs all configuration directives, not just those supported on TPF. |
| -S | +ZFILE | ++ | Show the settings as parsed from the configuration file then exit. Currently Apache only shows the virtual host settings. |
| -t | +ZFILE | ++ | Run syntax tests for configuration files with document root checks then exit. |
| -T | +ZFILE | ++ | Run syntax tests for configuration files without document root checks then exit. |
| -v | +ZFILE | ++ | Show the version number then exit. |
| -V | +ZFILE | ++ | Show the version number and various compile settings then exit. |
| -X | ++ | ZINET | +Run in single-process mode for internal debugging purposes only. + The parent process does not fork any children. |
Note: On TPF Apache arguments are supported only on the - command line, not through the ZINET XPARM field.
+See http://httpd.apache.org/docs/programs/httpd.html + for more information about these command line options.
Ensure Apache (CHTA) is loaded
@@ -431,7 +478,6 @@ zfile chmod 755 /bin/httpd(See "ZFILE-Activate a TPF Segment or Script" in @@ -439,7 +485,7 @@ href="http://www.ibm.com/tpf/pubs/tpfpubs.htm">http://www.ibm.com/tpf/pubs/tpfpubs.htm.)
zfile httpd -v
@@ -451,17 +497,75 @@ END OF DISPLAYzfile httpd -t -f - /usr/local/apache/conf/httpd.conf.new
+ /usr/local/apache/conf/alt.confFILE0002I 11.47.26 START OF ERROR DISPLAY FROM httpd
-t ...
Syntax OK
END OF DISPLAY
(See "ZINET ADD-Add an Internet Server Application Entry" and + "ZINET ALTER-Change an Internet Server Application Entry" in + the Operations guide for more information about using the XPARM field: + http://www.ibm.com/tpf/pubs/tpfpubs.htm.)
+The syslog daemon is a server process that provides a message logging facility for application and system processes. + It can be used to write messages to log files or to tapes. + See TPF Transmission Control Protocol/Internet Protocol for detailed information about using the syslog daemon on TPF: + http://www.ibm.com/tpf/pubs/tpfpubs.htm. + And see the Apache ErrorLog directive documentation + for details on how to use syslog with Apache.
+ +Syslog capabilities were added with PJ27214 which shipped with PUT13. + You must follow the syslog specific installation instructions + in order to have the option of using syslog with Apache.
+ + +This section provides some tips on using syslog with Apache. + It is not meant to replace the syslog documentation in the TPF TCP/IP publication.
+ +