From 5f1108e4f87420e53b0bd9953a39c0a6fc9cb0f5 Mon Sep 17 00:00:00 2001
From: Henning Brauer cygwin1.dll
) will be
supplied at http://www.apache.org/httpd
+ href="http://httpd.apache.org/">http://httpd.apache.org/
for each released version.
What are the differences in the configuration
files?
While the Apache for Windows port uses Windows native path
- names to refer files and directorys, like
# httpd.conf (for Windows) DocumentRoot "c:/apache/htdocs" @@ -201,7 +201,7 @@Cygwin 1.x is required to compile and run this version. Cygwin 1.3.9 and 1.3.10 have been tested and approved on both - supported OSes. We suggest to use Cygwin 1.3.9-2 and higher.
+ supported OSes. We suggest using Cygwin 1.3.9-2 and higher.Note:If you want to compile shared DLL modules using
This will produce the required extra libraries or object - files which hold all static linked code. Then + files that hold all static linked code. Then
-dllwrap
anddlltool
will export all of those (including any additional module code) to the sharedcyghttpd.dll
and create the @@ -330,11 +330,11 @@ trying to link the shared DLL modulesmod_foo.dll
.Unfortunatly while Apache's build process the shared +
Unfortunately, during Apache's build process, the shared modules are linked before the shared core import library
@@ -350,8 +350,8 @@src/cyghttpd.dll
has been made. The shared modules depend on this import library, so - they can not link for the first time you run + they cannot link for the first time you runmake
.All shared modules are placed into
libexec
, including the shared core DLLcyghttpd.dll
. When Apache's -/bin/httpd
is started it has to dynamicly - linkcyghttpd.dll
while runtime. That is +/bin/httpd
is started, it has to dynamically + linkcyghttpd.dll
during runtime; that is why you have to place the shared core DLLcyghttpd.dll
to the same directory wherehttpd.exe
resides, i.e. @@ -421,7 +421,7 @@ -Using Win32 native socket +
Using Win32 native socket implementation instead
Apache for Cygwin supports an option to use the Win32 native diff --git a/usr.sbin/httpd/htdocs/manual/dns-caveats.html.en b/usr.sbin/httpd/htdocs/manual/dns-caveats.html.en index 3d472f49c75..515343fa1c9 100644 --- a/usr.sbin/httpd/htdocs/manual/dns-caveats.html.en +++ b/usr.sbin/httpd/htdocs/manual/dns-caveats.html.en @@ -196,7 +196,7 @@
A possible work around to the theft of service attack described above would be to perform a reverse DNS lookup on the - ip address returned by the forward lookup and compare the two + IP address returned by the forward lookup and compare the two names. In the event of a mismatch the virtualhost would be disabled. This would require reverse DNS to be configured properly (which is something that most admins are familiar with diff --git a/usr.sbin/httpd/htdocs/manual/dns-caveats.html.html b/usr.sbin/httpd/htdocs/manual/dns-caveats.html.html index bd3702e551f..0d47f605fe0 100644 --- a/usr.sbin/httpd/htdocs/manual/dns-caveats.html.html +++ b/usr.sbin/httpd/htdocs/manual/dns-caveats.html.html @@ -198,7 +198,7 @@
A possible work around to the theft of service attack described above would be to perform a reverse DNS lookup on the - ip address returned by the forward lookup and compare the two + IP address returned by the forward lookup and compare the two names. In the event of a mismatch the virtualhost would be disabled. This would require reverse DNS to be configured properly (which is something that most admins are familiar with diff --git a/usr.sbin/httpd/htdocs/manual/ebcdic.html b/usr.sbin/httpd/htdocs/manual/ebcdic.html index 1f7cf83b790..9424bf3a316 100644 --- a/usr.sbin/httpd/htdocs/manual/ebcdic.html +++ b/usr.sbin/httpd/htdocs/manual/ebcdic.html @@ -26,7 +26,7 @@ set as their native codeset.
diff --git a/usr.sbin/httpd/htdocs/manual/env.html.en b/usr.sbin/httpd/htdocs/manual/env.html.en index 88dad998deb..e43a1247e05 100644 --- a/usr.sbin/httpd/htdocs/manual/env.html.en +++ b/usr.sbin/httpd/htdocs/manual/env.html.en @@ -69,17 +69,17 @@
(Initially, that support covered only the Fujitsu-Siemens family of mainframes running the + href="http://www.fujitsu-siemens.com/rl/products/software/bs2000bc.html"> BS2000/OSD operating system, a mainframe OS which features a SVR4-derived POSIX subsystem. Later, the two IBM mainframe operating systems TPF and OS/390 were added).Related Directives diff --git a/usr.sbin/httpd/htdocs/manual/env.html.html b/usr.sbin/httpd/htdocs/manual/env.html.html index 3572a6f6079..1b79aa7c653 100644 --- a/usr.sbin/httpd/htdocs/manual/env.html.html +++ b/usr.sbin/httpd/htdocs/manual/env.html.html @@ -71,17 +71,17 @@
BrowserMatch
+ href="mod/mod_setenvif.html#browsermatch">BrowserMatch
BrowserMatchNoCase
+ href="mod/mod_setenvif.html#browsermatchnocase">BrowserMatchNoCase
PassEnv
RewriteRule
SetEnv
SetEnvIf
+ href="mod/mod_setenvif.html#setenvif">SetEnvIf
SetEnvIfNoCase
+ href="mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase
UnsetEnv
Related Directives diff --git a/usr.sbin/httpd/htdocs/manual/env.html.ja.jis b/usr.sbin/httpd/htdocs/manual/env.html.ja.jis index 961bbb0ae2c..13bc6eb1ffc 100644 --- a/usr.sbin/httpd/htdocs/manual/env.html.ja.jis +++ b/usr.sbin/httpd/htdocs/manual/env.html.ja.jis @@ -8,7 +8,7 @@
BrowserMatch
+ href="mod/mod_setenvif.html#browsermatch">BrowserMatch
BrowserMatchNoCase
+ href="mod/mod_setenvif.html#browsermatchnocase">BrowserMatchNoCase
PassEnv
RewriteRule
SetEnv
SetEnvIf
+ href="mod/mod_setenvif.html#setenvif">SetEnvIf
SetEnvIfNoCase
+ href="mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase
UnsetEnv
Apache の環境変数 - + @@ -66,17 +66,17 @@関連ディレクティブ @@ -261,6 +261,20 @@
BrowserMatch
+ href="mod/mod_setenvif.html#browsermatch">BrowserMatch
BrowserMatchNoCase
+ href="mod/mod_setenvif.html#browsermatchnocase">BrowserMatchNoCase
PassEnv
RewriteRule
SetEnv
SetEnvIf
+ href="mod/mod_setenvif.html#setenvif">SetEnvIf
SetEnvIfNoCase
+ href="mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase
UnsetEnv
これが設定されている場合は、KeepAlive を使用しないようにします。
+ +suppress-error-charset
+1.3.26 と 2.0.40 以降のバージョンで使用可能
+Apache がクライアントのリクエストに応じてリダイレクトを行なうとき、 + レスポンスにはクライアントが自動的にリダイレクトを追えない(追わない)ときの + ために表示されるテキストが含まれています。Apache は通常はこのテキストは + 使われている文字セットである ISO-8859-1 とします。
+しかし、リダイレクト先が別の文字セットを使っている場合、 + 標準に準拠していないブラウザでは、リダイレクト先の実際の文字セットの + 代わりに、リダイレクト元の文字セットを使ってしまうことがあります。 + これは、例えばギリシャ文字が文字化けしたりすることになります。
+この環境変数を設定すると、 Apache はリダイレクト元のテキストの文字セット + は省略するようになり、そのような標準に準拠していないブラウザでもリダイレクト + 先の文字セットを正しく使うことができるようになります。
例
diff --git a/usr.sbin/httpd/htdocs/manual/host.html b/usr.sbin/httpd/htdocs/manual/host.html new file mode 100644 index 00000000000..74639a5b5fb --- /dev/null +++ b/usr.sbin/httpd/htdocs/manual/host.html @@ -0,0 +1,185 @@ + + +Apache non-IP Virtual Hosts + + + + ++ ++ ++ Apache HTTP Server Version 1.2 +
+Apache non-IP Virtual Hosts
+ +See Also: +Virtual Host Support + +
+ +What is a Virtual Host
+ +The "Virtual Host" refers to the practice of maintaining more than +one server on one machine, as differentiated by their apparent +hostname. For example, it is often desirable for companies sharing a +web server to have their own domains, with web servers accessible as +
+ +www.company1.com
andwww.company2.com
, +without requiring the user to know any extra path information.Apache was one of the first servers to support virtual hosts right +out of the box, but since the base
HTTP
(HyperText +Transport Protocol) standard does not allow any method for the server +to determine the hostname it is being addressed as, Apache's virtual +host support has required a separate IP address for each +server. Documentation on using this approach (which still works very +well) is available. + +While the approach described above works, with the available IP +address space growing smaller, and the number of domains increasing, +it is not the most elegant solution, and is hard to implement on some +machines. The
+ +HTTP/1.1
protocol contains a method for the +server to identify what name it is being addressed as. Apache 1.1 and +later support this approach as well as the traditional +IP-address-per-hostname method.The benefits of using the new virtual host support is a practically +unlimited number of servers, ease of configuration and use, and +requires no additional hardware or software. The main disadvantage is +that the user's browser must support this part of the protocol. The +latest versions of many browsers (including Netscape Navigator 2.0 and +later) do, but many browsers, especially older ones, do not. This can +cause problems, although a possible solution is addressed below.
+ +Using non-IP Virtual Hosts
+ +Using the new virtual hosts is quite easy, and superficially looks +like the old method. You simply add to one of the Apache configuration +files (most likely
+httpd.conf
orsrm.conf
) +code similar to the following:+ <VirtualHost www.apache.org> + ServerName www.apache.org + DocumentRoot /usr/web/apache + </VirtualHost> ++ +Of course, any additional directives can (and should) be placed +into the
+ +<VirtualHost>
section. To make this work, +all that is needed is to make sure that thewww.apache.org
+DNS entry points to the same IP address as the main +server. Optionally, you could simply use that IP address in the +<VirtualHost> entry.Additionally, many servers may wish to be accessible by more than +one name. For example, the Apache server might want to be accessible +as
+ +apache.org
, orftp.apache.org
, assuming +the IP addresses pointed to the same server. In fact, one might want it +so that all addresses atapache.org
were picked up by the +server. This is possible with theServerAlias
+directive, placed inside the <VirtualHost> section. For +example:+ ServerAlias apache.org *.apache.org ++ +Note that you can use
+ +*
and?
as wild-card +characters.You also might need ServerAlias if you are serving local users who +do not always include the domain name. For example, if local users are +familiar with typing "www" or "www.physics" then you will need to add +
+ +ServerAlias www www.physics
. It isn't possible for the +server to know what domain the client uses for their name resolution +because the client doesn't provide that information in the request.Security Considerations
+ +Apache allows all virtual hosts to be made accessible via the +Host:
header through all IP interfaces, even those which +are configured to use different IP interfaces. For example, if the +configuration forwww.foo.com
contained a virtual host +section forwww.bar.com
, andwww.bar.com
was +a separate IP interface, such that +non-Host:
-header-supporting browsers can use it, as +before with Apache 1.0. If a request is made to +www.foo.com
and the request includes the header +Host: www.bar.com
, a page fromwww.bar.com
+will be sent. + ++ +This is a security concern if you are controlling access to a +particular server based on IP-layer controls, such as from within a +firewall or router. Let's say
www.bar.com
in the above +example was instead an intra-net server called +private.foo.com
, and the router used by foo.com only let +internal users accessprivate.foo.com
. Obviously, +Host:
header functionality now allows someone who has +access towww.foo.com
to get +private.foo.com
, if they send aHost: +private.foo.com
header. It is important to note that this +condition exists only if you only implement this policy at the IP +layer - all security controls used by Apache (i.e., allow, deny from, etc.) are consistently +respected. + +Compatibility with Older Browsers
+ +As mentioned earlier, a majority of browsers do not send the +required data for the new virtual hosts to work properly. These +browsers will always be sent to the main server's pages. There is a +workaround, albeit a slightly cumbersome one:
+ +To continue the
www.apache.org
example (Note: Apache's +web server does not actually function in this manner), we might use the +newServerPath
directive in thewww.apache.org
virtual host, +for example: + ++ ServerPath /apache ++What does this mean? It means that a request for any file beginning +with "
+ +/apache
" will be looked for in the Apache +docs. This means that the pages can be accessed as +http://www.apache.org/apache/
for all browsers, although +new browsers can also access it as +http://www.apache.org/
.In order to make this work, put a link on your main server's page +to
+ +http://www.apache.org/apache/
(Note: Do not use +http://www.apache.org/
- this would create an endless +loop). Then, in the virtual host's pages, be sure to use either purely +relative links (e.g. "file.html
" or +"../icons/image.gif
" or links containing the prefacing +/apache/
+(e.g. "http://www.apache.org/apache/file.html
" or +"/apache/docs/1.1/index.html
").This requires a bit of +discipline, but adherence to these guidelines will, for the most part, +ensure that your pages will work with all browsers, new and old. When +a new browser contacts
+ +http://www.apache.org/
, they will +be directly taken to the Apache pages. Older browsers will be able to +click on the link from the main server, go to +http://www.apache.org/apache/
, and then access the +pages.
++ Apache HTTP Server Version 1.2 +
+ + + + + + diff --git a/usr.sbin/httpd/htdocs/manual/howto/auth.html b/usr.sbin/httpd/htdocs/manual/howto/auth.html index 6966d536a24..940d5ff7600 100644 --- a/usr.sbin/httpd/htdocs/manual/howto/auth.html +++ b/usr.sbin/httpd/htdocs/manual/howto/auth.html @@ -19,12 +19,12 @@Authentication, Authorization, and Access Control
- +
Along with the 401 response, certain other information will be passed back to the client. In particular, it sends a name which is associated with the protected area of - the web site. This is called the realm, or just the authentication name. The client + the web site. This is called the realm, or just the + authentication name. The client browser caches the username and password that you supplied, and stores it along with the authentication realm, so that if other resources are requested from the same realm, the same username @@ -630,7 +630,7 @@ Require group authors Additional information and resources about MD5 can be found at http://userpages.umbc.edu/ mabzug1/cs/md5/md5.html
-The steps for configuring your server for digest @@ -724,7 +724,7 @@ htdigest -c /usr/local/apache/passwd/digest realm username -
These directives may be places in a .htaccess file +
These directives may be placed in a .htaccess file in the particular directory being protected, or may go in the main server configuration file, in a <Directory> section, or another scope container.
@@ -792,8 +792,9 @@ Require group admins not use it on a web site on which you cannot control the browsers that people will be using, such as on your intranet site. In particular, Opera 4.0 or later, Microsoft Internet - Explorer 5.0 or later, and Amaya support digest authentication, - while Netscape, Mozilla, and various other browsers do not. + Explorer 5.0 or later, Mozilla 1.0.1 and Netscape 7 or later + as well as Amaya support digest authentication, while various + other browsers do not.Next, with regard to security considerations, you should understand two things. Although your password is not passed in @@ -864,8 +865,7 @@ Require group admins pick whichever of the two modules makes the most sense on your particular platform of choice. If you do not have DB support on your platform, you may need to install it. You download an - implementation of DB at http://www.sleepycat.com/.
+ implementation of DB at http://www.sleepycat.com/.For the purposes of this tutorial, we'll talk about installing and configuring mod_auth_db. However, @@ -932,7 +931,7 @@ Require group admins
The user file for authentication is, this time, not a flat text file, but is a DB file21.2. Fortunately, once again, + href="#foot2">2. Fortunately, once again, Apache provides us with a simple utility for the purpose of managing this user file. This time, the utility is called dbmmanage, and will be located in the bin @@ -943,7 +942,7 @@ Require group admins simple. The syntax which you will usually be using is as follows:
-dbmmanage passwords.db adduser montressor +dbmmanage passwords.dat adduser montressor
As with htpasswd, you will at this point be @@ -975,7 +974,7 @@ tie %database, 'DB_File', "passwords.dat" $username = 'rbowen'; $password = 'mypassword'; @chars=(0..9,'a'..'z'); -$salt = '', map { $chars[int rand @chars] } (0..1); +$salt = $chars[int rand @chars] . $chars[int rand @chars]; $crypt = crypt($password, $salt); $database{$username} = $crypt; @@ -996,7 +995,7 @@ untie %database; when the data structure is changed, the file is automatically modified at the same time.
-Once you have created the password file, you need to tell @@ -1090,15 +1089,15 @@ allow from address
For example, if you have someone spamming your message board, and you want to keep them out, you could do the - following:
+ following:deny from 11.22.33.44
Visitors coming from that address will not be able to see the content behind this directive. If, instead, you have a - machine name, rather than an IP address, you can use that.
+ machine name, rather than an IP address, you can use that. +deny from hostname.example.com@@ -1152,6 +1151,7 @@ Allow from hostname.example.com AuthUserFile /www/passwd/users AuthGroupFile /www/passwd/groups Require group customers + Order allow,deny Allow from internal.com Satisfy any </Directory> @@ -1178,7 +1178,7 @@ Allow from hostname.example.com