Index: os/win32/BaseAddr.ref =================================================================== --- os/win32/BaseAddr.ref (.../tags/2.2.0) (wersja 358411) +++ os/win32/BaseAddr.ref (.../branches/2.2.x) (wersja 358411) @@ -71,3 +71,5 @@ mod_bucketeer.so 0x6FA60000 0x00010000 mod_dumpio.so 0x6FA50000 0x00010000 mod_echo.so 0x6FA40000 0x00010000 +mod_authn_dbd.so 0x6FA30000 0x00010000 +mod_dbd.so 0x6FA20000 0x00010000 Index: InstallBin.dsp =================================================================== --- InstallBin.dsp (.../tags/2.2.0) (wersja 358411) +++ InstallBin.dsp (.../branches/2.2.x) (wersja 358411) @@ -33,15 +33,15 @@ # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f InstallBin.mak" # PROP BASE Rebuild_Opt "/a" -# PROP BASE Target_File "\Apache21\bin\httpd.exe" +# PROP BASE Target_File "\Apache2\bin\httpd.exe" # PROP BASE Bsc_Name "InstallBin.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" -# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache21" SHORT=R LONG=Release _install" +# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache2" SHORT=R LONG=Release _install" # PROP Rebuild_Opt "" -# PROP Target_File "\Apache21\bin\httpd.exe" +# PROP Target_File "\Apache2\bin\httpd.exe" # PROP Bsc_Name "Browse\httpd.bsc" # PROP Target_Dir "" @@ -52,15 +52,15 @@ # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f InstallBin.mak" # PROP BASE Rebuild_Opt "/a" -# PROP BASE Target_File "\Apache21\bin\httpd.exe" +# PROP BASE Target_File "\Apache2\bin\httpd.exe" # PROP BASE Bsc_Name "InstallBin.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" -# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache21" SHORT=D LONG=Debug _install" +# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache2" SHORT=D LONG=Debug _install" # PROP Rebuild_Opt "" -# PROP Target_File "\Apache21\bin\httpd.exe" +# PROP Target_File "\Apache2\bin\httpd.exe" # PROP Bsc_Name "" # PROP Target_Dir "" Index: docs/conf/httpd-win.conf =================================================================== --- docs/conf/httpd-win.conf (.../tags/2.2.0) (wersja 358411) +++ docs/conf/httpd-win.conf (.../branches/2.2.x) (wersja 358411) @@ -161,6 +161,7 @@ AllowOverride None Order deny,allow Deny from all + Satisfy all # @@ -391,12 +392,6 @@ # #AddHandler cgi-script .cgi - # For files that include their own HTTP headers: - #AddHandler send-as-is asis - - # For server-parsed imagemap files: - #AddHandler imap-file map - # For type maps (negotiated resources): #AddHandler type-map var Index: docs/conf/extra/httpd-mpm.conf.in =================================================================== --- docs/conf/extra/httpd-mpm.conf.in (.../tags/2.2.0) (wersja 358411) +++ docs/conf/extra/httpd-mpm.conf.in (.../branches/2.2.x) (wersja 358411) @@ -57,14 +57,6 @@ MaxRequestsPerChild 0 -# WinNT MPM -# ThreadsPerChild: constant number of worker threads in the server process -# MaxRequestsPerChild: maximum number of requests a server process serves - - ThreadsPerChild 250 - MaxRequestsPerChild 0 - - # BeOS MPM # StartThreads: how many threads do we initially spawn? # MaxClients: max number of threads we can have (1 thread == 1 client) Index: docs/conf/httpd.conf.in =================================================================== --- docs/conf/httpd.conf.in (.../tags/2.2.0) (wersja 358411) +++ docs/conf/httpd.conf.in (.../branches/2.2.x) (wersja 358411) @@ -53,7 +53,6 @@ # @@LoadModule@@ - # # If you wish httpd to run as a different user or group, you must run @@ -66,7 +65,6 @@ User daemon Group daemon - # 'Main' server configuration # @@ -173,6 +171,7 @@ Order allow,deny Deny from all + Satisfy All # @@ -316,12 +315,6 @@ # #AddHandler cgi-script .cgi - # For files that include their own HTTP headers: - #AddHandler send-as-is asis - - # For server-parsed imagemap files: - #AddHandler imap-file map - # For type maps (negotiated resources): #AddHandler type-map var Index: docs/docroot/apache_pb2_ani.gif =================================================================== Nie można wyświetlić: plik binarny. svn:mime-type = image/gif Index: docs/docroot/apache_pb2.png =================================================================== Nie można wyświetlić: plik binarny. svn:mime-type = image/png Index: docs/docroot/apache_pb2.gif =================================================================== Nie można wyświetlić: plik binarny. svn:mime-type = image/gif Index: docs/docroot/apache_pb22_ani.gif =================================================================== Nie można wyświetlić: plik binarny. svn:mime-type = image/gif Zmiany atrybutów dla: docs/docroot/apache_pb22_ani.gif ___________________________________________________________________ Nazwa: svn:mime-type + image/gif Index: docs/docroot/apache_pb22.png =================================================================== Nie można wyświetlić: plik binarny. svn:mime-type = image/png Zmiany atrybutów dla: docs/docroot/apache_pb22.png ___________________________________________________________________ Nazwa: svn:mime-type + image/png Index: docs/docroot/apache_pb22.gif =================================================================== Nie można wyświetlić: plik binarny. svn:mime-type = image/gif Zmiany atrybutów dla: docs/docroot/apache_pb22.gif ___________________________________________________________________ Nazwa: svn:mime-type + image/gif Index: docs/manual/stopping.html.ja.euc-jp =================================================================== --- docs/manual/stopping.html.ja.euc-jp (.../tags/2.2.0) (wersja 358411) +++ docs/manual/stopping.html.ja.euc-jp (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-
-Apache > HTTP > ɥơ > С 2.2

ߤȺƵư

+Apache > HTTP > ɥơ > С 2.2

ߤȺƵư

Available Languages:  de  |  en  | Index: docs/manual/invoking.html.ko.euc-kr =================================================================== --- docs/manual/invoking.html.ko.euc-kr (.../tags/2.2.0) (wersja 358411) +++ docs/manual/invoking.html.ko.euc-kr (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@

<-

ġ

:  de  |  en  | Index: docs/manual/developer/documenting.html.en =================================================================== --- docs/manual/developer/documenting.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/developer/documenting.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@

<-

Documenting Apache 2.0

Available Languages:  en 

Index: docs/manual/developer/modules.html.ja.euc-jp =================================================================== --- docs/manual/developer/modules.html.ja.euc-jp (.../tags/2.2.0) (wersja 358411) +++ docs/manual/developer/modules.html.ja.euc-jp (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

⥸塼 Apache 1.3 Apache 2.0 ؤΰܿ

+Apache > HTTP > ɥơ > С 2.2 > Developer Documentation

⥸塼 Apache 1.3 Apache 2.0 ؤΰܿ

Available Languages:  en  |  ja 

Index: docs/manual/developer/debugging.html.en =================================================================== --- docs/manual/developer/debugging.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/developer/debugging.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

Debugging Memory Allocation in APR

+Apache > HTTP Server > Documentation > Version 2.2 > Developer Documentation

Debugging Memory Allocation in APR

Available Languages:  en 

Index: docs/manual/developer/modules.html.en =================================================================== --- docs/manual/developer/modules.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/developer/modules.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

Converting Modules from Apache 1.3 to Apache 2.0

+Apache > HTTP Server > Documentation > Version 2.2 > Developer Documentation

Converting Modules from Apache 1.3 to Apache 2.0

Available Languages:  en  |  ja 

Index: docs/manual/developer/filters.html.en =================================================================== --- docs/manual/developer/filters.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/developer/filters.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

How filters work in Apache 2.0

+Apache > HTTP Server > Documentation > Version 2.2 > Developer Documentation

How filters work in Apache 2.0

Available Languages:  en 

Index: docs/manual/developer/API.html.en =================================================================== --- docs/manual/developer/API.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/developer/API.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

Apache 1.3 API notes

Available Languages:  en 

Index: docs/manual/developer/thread_safety.html.en =================================================================== --- docs/manual/developer/thread_safety.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/developer/thread_safety.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

Apache 2.0 Thread Safety Issues

+Apache > HTTP Server > Documentation > Version 2.2 > Developer Documentation

Apache 2.0 Thread Safety Issues

Available Languages:  en 

Index: docs/manual/developer/hooks.html.en =================================================================== --- docs/manual/developer/hooks.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/developer/hooks.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

Apache 2.0 Hook Functions

Available Languages:  en 

Index: docs/manual/developer/request.html.en =================================================================== --- docs/manual/developer/request.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/developer/request.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

Request Processing in Apache 2.0

+Apache > HTTP Server > Documentation > Version 2.2 > Developer Documentation

Request Processing in Apache 2.0

Available Languages:  en 

Index: docs/manual/developer/index.html.en =================================================================== --- docs/manual/developer/index.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/developer/index.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

Developer Documentation for Apache 2.0

+Apache > HTTP Server > Documentation > Version 2.2

Developer Documentation for Apache 2.0

Available Languages:  en 

Index: docs/manual/upgrading.xml.ko =================================================================== --- docs/manual/upgrading.xml.ko (.../tags/2.2.0) (wersja 358411) +++ docs/manual/upgrading.xml.ko (.../branches/2.2.x) (wersja 358411) @@ -1,7 +1,7 @@ - + + +Access Control - Apache HTTP Server + + + + + +
<-
+

Access Control

+
+

Available Languages:  en 

+
+ +

Access control refers to any means of controlling access to any + resource. This is separate from authentication and authorization.

+
+ +
top
+
+

Related Modules and Directives

+ +

Access control can be done by several different modules. The most +important of these is mod_authz_host. Other modules +discussed in this document include mod_setenvif and +mod_rewrite.

+ +
top
+
+

Access control by host

+

+ 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 + mod_authz_host. +

+ +

The Allow and + Deny directives let + you allow and deny access based on the host name, or host + address, of the machine requesting a document. The + Order directive goes + hand-in-hand with these two, and tells Apache in which order to + apply the filters.

+ +

The usage of these directives is:

+ +

+ Allow from address +

+ +

where address is an IP address (or a partial IP + address) or a fully qualified domain name (or a partial domain + name); you may provide multiple addresses or domain names, if + desired.

+ +

For example, if you have someone spamming your message + board, and you want to keep them out, you could do the + following:

+ +

+ Deny from 205.252.46.165 +

+ +

Visitors coming from that address will not be able to see + the content covered by this directive. If, instead, you have a + machine name, rather than an IP address, you can use that.

+ +

+ Deny from host.example.com +

+ +

And, if you'd like to block access from an entire domain, + you can specify just part of an address or domain name:

+ +

+ Deny from 192.101.205
+ Deny from cyberthugs.com moreidiots.com
+ Deny from ke +

+ +

Using Order will let you + be sure that you are actually restricting things to the group that you want + to let in, by combining a Deny and an Allow directive:

+ +

+ Order deny,allow
+ Deny from all
+ Allow from dev.example.com +

+ +

Listing just the Allow + directive would not do what you want, because it will let folks from that + host in, in addition to letting everyone in. What you want is to let + only those folks in.

+
top
+
+

Access control by environment variable

+ +

+ mod_authz_host, in conjunction with + mod_setenvif, can be used to restrict access to + your website based on the value of arbitrary environment variables. + This is done with the Allow from env= and Deny + from env= syntax. +

+ +

+ SetEnvIf User-Agent BadBot GoAway=1
+ Order allow,deny
+ Allow from all
+ Deny from env=GoAway +

+ +

Warning:

+

Access control by User-Agent is an unreliable technique, + since the User-Agent header can be set to anything at all, + at the whim of the end user.

+
+ +

+ In the above example, the environment variable GoAway + is set to 1 if the User-Agent matches the + string BadBot. Then we deny access for any request when + this variable is set. This blocks that particular user agent from + the site. +

+ +

An environment variable test can be negated using the =! + syntax:

+ +

+ Allow from env=!GoAway +

+ +
top
+
+

Access control with mod_rewrite

+ +

The [F] RewriteRule flag causes a 403 Forbidden +response to be sent. Using this, you can deny access to a resource based +on arbitrary criteria.

+ +

For example, if you wish to block access to a resource between 8pm +and 6am, you can do this using mod_rewrite.

+ +

+RewriteEngine On
+RewriteCond %{TIME_HOUR} > 20 [OR]
+RewriteCond %{TIME_HOUR} < 07
+RewriteRule ^/fridge - [F] +

+ +

This will return a 403 Forbidden response for any request after 8pm +or before 7am. This technique can be used for any criteria that you wish +to check. You can also redirect, or otherwise rewrite these requests, if +that approach is preferred.

+ +
top
+
+

More information

+

You should also read the documentation for + mod_auth_basic and mod_authz_host which + contain some more information about how this all works. + mod_authn_alias can also help in simplifying certain + authentication configurations.

+ +

See the Authentication and Authorization + howto.

+
+
+

Available Languages:  en 

+
+ \ No newline at end of file Zmiany atrybutów dla: docs/manual/howto/access.html.en ___________________________________________________________________ Nazwa: svn:eol-style + native Index: docs/manual/howto/auth.html.en =================================================================== --- docs/manual/howto/auth.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/auth.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

Authentication, Authorization and Access Control

+Apache > HTTP Server > Documentation > Version 2.2 > How-To / Tutorials

Authentication, Authorization and Access Control

top
@@ -90,6 +89,9 @@ of the request, but is not part of the authentication provider system.

+

You probably also want to take a look at the Access Control howto, which discusses the + various ways to control access to your server.

+
top

Introduction

@@ -100,6 +102,11 @@

This article covers the "standard" way of protecting parts of your web site that most of you are going to use.

+ +

Note:

+

If your data really needs to be secure, consider using + mod_ssl in addition to any authentication.

+
top

The Prerequisites

@@ -137,7 +144,12 @@

Here's the basics of password protecting a directory on your server.

-

You'll need to create a password file. This file should be +

First, you need to create a password file. Exactly how you do + this will vary depending on what authentication provider you have + chosen. More on that later. To start with, we'll use a text password + file.

+ +

This file should be placed somewhere not accessible from the web. This is so that folks cannot download the password file. For example, if your documents are served out of /usr/local/apache/htdocs you @@ -146,7 +158,10 @@

To create the file, use the htpasswd utility that came with Apache. This will be located in the bin directory - of wherever you installed Apache. To create the file, type:

+ of wherever you installed Apache. If you have installed Apache from + a third-party package, it may be in your execution path.

+ +

To create the file, type:

htpasswd -c /usr/local/apache/passwd/passwords rbowen @@ -164,8 +179,8 @@

If htpasswd is not in your path, of course you'll have to type the full path to the file to get it to run. - On my server, it's located at - /usr/local/apache/bin/htpasswd

+ With a default installation, it's located at + /usr/local/apache2/bin/htpasswd

Next, you'll need to configure the server to request a password and tell the server which users are allowed access. @@ -181,6 +196,8 @@

AuthType Basic
AuthName "Restricted Files"
+ # (Following line optional)
+ AuthBasicProvider file
AuthUserFile /usr/local/apache/passwd/passwords
Require user rbowen

@@ -191,9 +208,10 @@ implemented by mod_auth_basic. It is important to be aware, however, that Basic authentication sends the password from the client to the server unencrypted. This method should therefore not be used for - highly sensitive data. Apache supports one other authentication method: - AuthType Digest. This method is implemented by mod_auth_digest and is much more secure. Only the most recent - versions of clients are known to support Digest authentication.

+ highly sensitive data, unless accompanied by mod_ssl. + Apache supports one other authentication method: + AuthType Digest. This method is implemented by mod_auth_digest and is much more secure. Most recent + browsers support Digest authentication.

The AuthName directive sets the Realm to be used in the authentication. The realm serves @@ -212,6 +230,12 @@ will always need to ask again for the password whenever the hostname of the server changes.

+

The AuthBasicProvider is, + in this case, optional, since file is the default value + for this directive. You'll need to use this directive if you are + choosing a different source for authentication, such as + mod_authn_dbm or mod_authn_dbd.

+

The AuthUserFile directive sets the path to the password file that we just created with htpasswd. If you have a large number @@ -269,6 +293,8 @@

AuthType Basic
AuthName "By Invitation Only"
+ # Optional line: + AuthBasicProvider file AuthUserFile /usr/local/apache/passwd/passwords
AuthGroupFile /usr/local/apache/passwd/groups
Require group GroupName @@ -317,71 +343,31 @@ different authentication method at that time.

top
-

What other neat stuff can I -do?

-

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 - coming from.

+

Alternate password storage

-

The Allow and - Deny directives let - you allow and deny access based on the host name, or host - address, of the machine requesting a document. The - Order directive goes - hand-in-hand with these two, and tells Apache in which order to - apply the filters.

+

Because storing passwords in plain text files has the above + problems, you may wish to store your passwords somewhere else, such + as in a database.

-

The usage of these directives is:

+

mod_authn_dbm and mod_authn_dbd + are two modules which make this possible. Rather than selecting + AuthBasicSource file, + instead you can choose dbm or dbd as your + storage format.

-

- Allow from address -

+

To select a dbd file rather than a text file, for example:

-

where address is an IP address (or a partial IP - address) or a fully qualified domain name (or a partial domain - name); you may provide multiple addresses or domain names, if - desired.

- -

For example, if you have someone spamming your message - board, and you want to keep them out, you could do the - following:

-

- Deny from 205.252.46.165 + <Directory /www/docs/private>
+ AuthName "Private"
+ AuthType Basic
+ AuthBasicProvider dbm
+ AuthDBMUserFile /www/passwords/passwd.dbm
+ Require valid-user

-

Visitors coming from that address will not be able to see - the content covered by this directive. If, instead, you have a - machine name, rather than an IP address, you can use that.

- -

- Deny from host.example.com -

- -

And, if you'd like to block access from an entire domain, - you can specify just part of an address or domain name:

- -

- Deny from 192.101.205
- Deny from cyberthugs.com moreidiots.com
- Deny from ke -

- -

Using Order will let you - be sure that you are actually restricting things to the group that you want - to let in, by combining a Deny and an Allow directive:

- -

- Order deny,allow
- Deny from all
- Allow from dev.example.com -

- -

Listing just the Allow - directive would not do what you want, because it will let folks from that - host in, in addition to letting everyone in. What you want is to let - only those folks in.

+

Other options are available. Consult the + mod_authn_dbm documentation for more details.

top

More information

@@ -390,6 +376,10 @@ contain some more information about how this all works. mod_authn_alias can also help in simplifying certain authentication configurations.

+ +

And you may want to look at the Access + Control howto, which discusses a number of related topics.

+

Available Languages:  en  | Index: docs/manual/howto/cgi.html.en =================================================================== --- docs/manual/howto/cgi.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/cgi.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@

<-

Apache Tutorial: Dynamic Content with CGI

+Apache > HTTP Server > Documentation > Version 2.2 > How-To / Tutorials

Apache Tutorial: Dynamic Content with CGI

Available Languages:  en  |  ja  | Index: docs/manual/howto/index.xml =================================================================== --- docs/manual/howto/index.xml (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/index.xml (.../branches/2.2.x) (wersja 358411) @@ -30,18 +30,30 @@ How-To / Tutorials

-
Authentication
+
Authentication and Authorization

Authentication is any process by which you verify that someone is who they claim they are. Authorization is any process by which someone is allowed to be where they want to go, or to have information that they want to have.

-

See: Authentication, Authorization, and Access Control

+

See: Authentication, Authorization

+
Access Control
+
+

Access control refers to the process of restricting, or + granting access to a resource based on arbitrary criteria. There + are a variety of different ways that this can be + accomplished.

+ +

See: Access Control

+
+
+ +
Dynamic Content with CGI

The CGI (Common Gateway Interface) defines a way for a web Index: docs/manual/howto/ssi.html.ja.euc-jp =================================================================== --- docs/manual/howto/ssi.html.ja.euc-jp (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/ssi.html.ja.euc-jp (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@

<-

Apache 塼ȥꥢ: Server Side Includes

+Apache > HTTP > ɥơ > С 2.2 > How-To / 塼ȥꥢ

Apache 塼ȥꥢ: Server Side Includes

Available Languages:  en  |  ja  | Index: docs/manual/howto/index.xml.ko =================================================================== --- docs/manual/howto/index.xml.ko (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/index.xml.ko (.../branches/2.2.x) (wersja 358411) @@ -1,7 +1,7 @@ - + + + + + + +How-To / Tutorials + +Access Control + +

+

Access control refers to any means of controlling access to any + resource. This is separate from authentication and authorization.

+
+ + + +
Access control by host +

+ 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 + mod_authz_host. +

+ +

The Allow and + Deny directives let + you allow and deny access based on the host name, or host + address, of the machine requesting a document. The + Order directive goes + hand-in-hand with these two, and tells Apache in which order to + apply the filters.

+ +

The usage of these directives is:

+ + + Allow from address + + +

where address is an IP address (or a partial IP + address) or a fully qualified domain name (or a partial domain + name); you may provide multiple addresses or domain names, if + desired.

+ +

For example, if you have someone spamming your message + board, and you want to keep them out, you could do the + following:

+ + + Deny from 205.252.46.165 + + +

Visitors coming from that address will not be able to see + the content covered by this directive. If, instead, you have a + machine name, rather than an IP address, you can use that.

+ + + Deny from host.example.com + + +

And, if you'd like to block access from an entire domain, + you can specify just part of an address or domain name:

+ + + Deny from 192.101.205
+ Deny from cyberthugs.com moreidiots.com
+ Deny from ke +
+ +

Using Order will let you + be sure that you are actually restricting things to the group that you want + to let in, by combining a Deny and an Allow directive:

+ + + Order deny,allow
+ Deny from all
+ Allow from dev.example.com +
+ +

Listing just the Allow + directive would not do what you want, because it will let folks from that + host in, in addition to letting everyone in. What you want is to let + only those folks in.

+
+ +
Access control by environment variable + +

+ mod_authz_host, in conjunction with + mod_setenvif, can be used to restrict access to + your website based on the value of arbitrary environment variables. + This is done with the Allow from env= and Deny + from env= syntax. +

+ + + SetEnvIf User-Agent BadBot GoAway=1
+ Order allow,deny
+ Allow from all
+ Deny from env=GoAway +
+ + Warning: +

Access control by User-Agent is an unreliable technique, + since the User-Agent header can be set to anything at all, + at the whim of the end user.

+
+ +

+ In the above example, the environment variable GoAway + is set to 1 if the User-Agent matches the + string BadBot. Then we deny access for any request when + this variable is set. This blocks that particular user agent from + the site. +

+ +

An environment variable test can be negated using the =! + syntax:

+ +

+ Allow from env=!GoAway +

+ +
+ +
Access control with mod_rewrite + +

The [F] RewriteRule flag causes a 403 Forbidden +response to be sent. Using this, you can deny access to a resource based +on arbitrary criteria.

+ +

For example, if you wish to block access to a resource between 8pm +and 6am, you can do this using mod_rewrite.

+ + +RewriteEngine On
+RewriteCond %{TIME_HOUR} > 20 [OR]
+RewriteCond %{TIME_HOUR} < 07
+RewriteRule ^/fridge - [F] +
+ +

This will return a 403 Forbidden response for any request after 8pm +or before 7am. This technique can be used for any criteria that you wish +to check. You can also redirect, or otherwise rewrite these requests, if +that approach is preferred.

+ +
+ +
More information +

You should also read the documentation for + mod_auth_basic and mod_authz_host which + contain some more information about how this all works. + mod_authn_alias can also help in simplifying certain + authentication configurations.

+ +

See the Authentication and Authorization + howto.

+
+ + + Zmiany atrybutów dla: docs/manual/howto/access.xml ___________________________________________________________________ Nazwa: svn:eol-style + native Nazwa: svn:keywords + LastChangedRevision Index: docs/manual/howto/auth.xml =================================================================== --- docs/manual/howto/auth.xml (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/auth.xml (.../branches/2.2.x) (wersja 358411) @@ -81,6 +81,10 @@ of the request, but is not part of the authentication provider system.

+

You probably also want to take a look at the Access Control howto, which discusses the + various ways to control access to your server.

+
Introduction @@ -91,6 +95,11 @@

This article covers the "standard" way of protecting parts of your web site that most of you are going to use.

+ + Note: +

If your data really needs to be secure, consider using + mod_ssl in addition to any authentication.

+
The Prerequisites @@ -128,7 +137,12 @@

Here's the basics of password protecting a directory on your server.

-

You'll need to create a password file. This file should be +

First, you need to create a password file. Exactly how you do + this will vary depending on what authentication provider you have + chosen. More on that later. To start with, we'll use a text password + file.

+ +

This file should be placed somewhere not accessible from the web. This is so that folks cannot download the password file. For example, if your documents are served out of /usr/local/apache/htdocs you @@ -137,7 +151,10 @@

To create the file, use the htpasswd utility that came with Apache. This will be located in the bin directory - of wherever you installed Apache. To create the file, type:

+ of wherever you installed Apache. If you have installed Apache from + a third-party package, it may be in your execution path.

+ +

To create the file, type:

htpasswd -c /usr/local/apache/passwd/passwords rbowen @@ -155,8 +172,8 @@

If htpasswd is not in your path, of course you'll have to type the full path to the file to get it to run. - On my server, it's located at - /usr/local/apache/bin/htpasswd

+ With a default installation, it's located at + /usr/local/apache2/bin/htpasswd

Next, you'll need to configure the server to request a password and tell the server which users are allowed access. @@ -172,6 +189,8 @@ AuthType Basic
AuthName "Restricted Files"
+ # (Following line optional)
+ AuthBasicProvider file
AuthUserFile /usr/local/apache/passwd/passwords
Require user rbowen
@@ -183,10 +202,11 @@ implemented by mod_auth_basic. It is important to be aware, however, that Basic authentication sends the password from the client to the server unencrypted. This method should therefore not be used for - highly sensitive data. Apache supports one other authentication method: + highly sensitive data, unless accompanied by mod_ssl. + Apache supports one other authentication method: AuthType Digest. This method is implemented by mod_auth_digest and is much more secure. Only the most recent - versions of clients are known to support Digest authentication.

+ >mod_auth_digest and is much more secure. Most recent + browsers support Digest authentication.

The AuthName directive sets the Realm to be used in the authentication. The realm serves @@ -205,6 +225,13 @@ will always need to ask again for the password whenever the hostname of the server changes.

+

The AuthBasicProvider is, + in this case, optional, since file is the default value + for this directive. You'll need to use this directive if you are + choosing a different source for authentication, such as + mod_authn_dbm or mod_authn_dbd.

+

The AuthUserFile directive sets the path to the password file that we just created with htpasswd. If you have a large number @@ -266,6 +293,8 @@ AuthType Basic
AuthName "By Invitation Only"
+ # Optional line: + AuthBasicProvider file AuthUserFile /usr/local/apache/passwd/passwords
AuthGroupFile /usr/local/apache/passwd/groups
Require group GroupName @@ -314,73 +343,31 @@ different authentication method at that time.

-
What other neat stuff can I -do? -

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 - coming from.

+
Alternate password storage -

The Allow and - Deny directives let - you allow and deny access based on the host name, or host - address, of the machine requesting a document. The - Order directive goes - hand-in-hand with these two, and tells Apache in which order to - apply the filters.

+

Because storing passwords in plain text files has the above + problems, you may wish to store your passwords somewhere else, such + as in a database.

-

The usage of these directives is:

+

mod_authn_dbm and mod_authn_dbd + are two modules which make this possible. Rather than selecting + AuthBasicSource file, + instead you can choose dbm or dbd as your + storage format.

- - Allow from address - +

To select a dbd file rather than a text file, for example:

-

where address is an IP address (or a partial IP - address) or a fully qualified domain name (or a partial domain - name); you may provide multiple addresses or domain names, if - desired.

- -

For example, if you have someone spamming your message - board, and you want to keep them out, you could do the - following:

- - Deny from 205.252.46.165 + <Directory /www/docs/private>
+ AuthName "Private"
+ AuthType Basic
+ AuthBasicProvider dbm
+ AuthDBMUserFile /www/passwords/passwd.dbm
+ Require valid-user
-

Visitors coming from that address will not be able to see - the content covered by this directive. If, instead, you have a - machine name, rather than an IP address, you can use that.

- - - Deny from host.example.com - - -

And, if you'd like to block access from an entire domain, - you can specify just part of an address or domain name:

- - - Deny from 192.101.205
- Deny from cyberthugs.com moreidiots.com
- Deny from ke -
- -

Using Order will let you - be sure that you are actually restricting things to the group that you want - to let in, by combining a Deny and an Allow directive:

- - - Order deny,allow
- Deny from all
- Allow from dev.example.com -
- -

Listing just the Allow - directive would not do what you want, because it will let folks from that - host in, in addition to letting everyone in. What you want is to let - only those folks in.

+

Other options are available. Consult the + mod_authn_dbm documentation for more details.

More information @@ -389,6 +376,10 @@ contain some more information about how this all works. mod_authn_alias can also help in simplifying certain authentication configurations.

+ +

And you may want to look at the Access + Control howto, which discusses a number of related topics.

+
Index: docs/manual/howto/htaccess.html.en =================================================================== --- docs/manual/howto/htaccess.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/htaccess.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

Apache Tutorial: .htaccess files

+Apache > HTTP Server > Documentation > Version 2.2 > How-To / Tutorials

Apache Tutorial: .htaccess files

Available Languages:  en  |  ja  | Index: docs/manual/howto/cgi.html.ko.euc-kr =================================================================== --- docs/manual/howto/cgi.html.ko.euc-kr (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/cgi.html.ko.euc-kr (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@

<-

ġ 丮: CGI

:  en  |  ja  | Index: docs/manual/howto/ssi.html.en =================================================================== --- docs/manual/howto/ssi.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/ssi.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@

<-

Apache Tutorial: Introduction to Server Side Includes

+Apache > HTTP Server > Documentation > Version 2.2 > How-To / Tutorials

Apache Tutorial: Introduction to Server Side Includes

Available Languages:  en  |  ja  | Index: docs/manual/howto/public_html.html.en =================================================================== --- docs/manual/howto/public_html.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/public_html.html.en (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@

<-

Per-user web directories

Available Languages:  en  |  ja  | Index: docs/manual/howto/index.html.ko.euc-kr =================================================================== --- docs/manual/howto/index.html.ko.euc-kr (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/index.html.ko.euc-kr (.../branches/2.2.x) (wersja 358411) @@ -16,12 +16,14 @@

<-

How-To / 丮

+
ֽ ƴմϴ. + ֱٿ ϼ.
top
Index: docs/manual/howto/auth.xml.ko =================================================================== --- docs/manual/howto/auth.xml.ko (.../tags/2.2.0) (wersja 358411) +++ docs/manual/howto/auth.xml.ko (.../branches/2.2.x) (wersja 358411) @@ -1,7 +1,7 @@ - + + + + + + + + -mod_imap - Apache HTTP Server +mod_imagemap - Apache HTTP Server @@ -17,9 +17,9 @@
<-
+Apache > HTTP Server > Documentation > Version 2.2 >
-

ġ mod_imap

+

ġ mod_imagemap

:  en  |  ko 

@@ -28,8 +28,8 @@ ֱٿ ϼ.
- -
: ̹(imagemap) ó
:Base
:imap_module
ҽ:mod_imap.c
+:imagemap_module +ҽ:mod_imagemap.c

imagemap CGI α׷ Ͽ @@ -280,7 +280,7 @@ :ּ, ȣƮ, directory, .htaccess Override ɼ:Indexes :Base -:mod_imap +:mod_imagemap

ImapBase þ ̹ Ͽ base ⺻ Ѵ. ̹ @@ -303,7 +303,7 @@ :ּ, ȣƮ, directory, .htaccess Override ɼ:Indexes :Base -:mod_imap +:mod_imagemap

ImapDefault þ ̹ Ͽ default ⺻ Ѵ. @@ -322,7 +322,7 @@ :ּ, ȣƮ, directory, .htaccess Override ɼ:Indexes :Base -:mod_imap +:mod_imagemap

ImapMenu þ ̹ Ͽ ȿ ǥ ൿ Ѵ.

Index: docs/manual/mod/mod_so.html.en =================================================================== --- docs/manual/mod/mod_so.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/mod/mod_so.html.en (.../branches/2.2.x) (wersja 358411) @@ -17,7 +17,7 @@
<-
+Apache > HTTP Server > Documentation > Version 2.2 > Modules

Apache Module mod_so

Index: docs/manual/mod/mod_dav.html.ja.euc-jp =================================================================== --- docs/manual/mod/mod_dav.html.ja.euc-jp (.../tags/2.2.0) (wersja 358411) +++ docs/manual/mod/mod_dav.html.ja.euc-jp (.../branches/2.2.x) (wersja 358411) @@ -17,7 +17,7 @@
<-
+Apache > HTTP > ɥơ > С 2.2 > ⥸塼

Apache ⥸塼 mod_dav

Index: docs/manual/mod/mod_authn_anon.html.ko.euc-kr =================================================================== --- docs/manual/mod/mod_authn_anon.html.ko.euc-kr (.../tags/2.2.0) (wersja 358411) +++ docs/manual/mod/mod_authn_anon.html.ko.euc-kr (.../branches/2.2.x) (wersja 358411) @@ -17,7 +17,7 @@
<-
+Apache > HTTP Server > Documentation > Version 2.2 >

ġ mod_authn_anon

Index: docs/manual/mod/directive-dict.html.ko.euc-kr =================================================================== --- docs/manual/mod/directive-dict.html.ko.euc-kr (.../tags/2.2.0) (wersja 358411) +++ docs/manual/mod/directive-dict.html.ko.euc-kr (.../branches/2.2.x) (wersja 358411) @@ -16,7 +16,7 @@
<-

þ ϴµ

:  en  |  ja  | Index: docs/manual/mod/mpm_common.html.en =================================================================== --- docs/manual/mod/mpm_common.html.en (.../tags/2.2.0) (wersja 358411) +++ docs/manual/mod/mpm_common.html.en (.../branches/2.2.x) (wersja 358411) @@ -17,7 +17,7 @@

<-
+Apache > HTTP Server > Documentation > Version 2.2 > Modules

Apache MPM Common Directives

Index: docs/manual/mod/core.xml.de =================================================================== --- docs/manual/mod/core.xml.de (.../tags/2.2.0) (wersja 358411) +++ docs/manual/mod/core.xml.de (.../branches/2.2.x) (wersja 358411) @@ -1,7 +1,7 @@ - + + + + + + + + + + + +