Return-Path:
This document explains how to install, configure and run Apache 1.3 under
the Cygwin layer for Microsoft
@@ -66,7 +66,7 @@
While there are developers who directly support the Windows native port of
Apache, very few module developers do. That is why it is can be
@@ -168,30 +168,29 @@
The Cygwin platform is supported out-of-the-box for Apache 1.3.20 and
- on. This means there is no extra download required for the Cygwin
+ The Cygwin platform is supported out of the box by Apache 1.3.20 and
+ later. This means there is no extra download required for the Cygwin
platform. The latest version of Apache can be found on the
- Apache web server at
- http://www.apache.org/httpd.This will list the current release,
- any more recent alpha or beta-test releases, together with details
- of mirror web and anonymous FTP sites.Using Apache With Cygwin
+Using Apache with Cygwin
mod_dav
,
- mod_ssl
, mod_php
, mod_perl,
+ mod_ssl
, mod_php
, mod_perl
,
mod_gzip
, and mod_jserv
.
Downloading Apache for Cygwin
-
Apache on Cygwin is configured and compiled the same way as on Unix systems. Refer to the general configuration and installation documents for details. -
There are three ways in configuring and building Apache for Cygwin, +
There are three ways to configure and build Apache for Cygwin, depending on how additional Apache modules should be used:
To build a static linked version of httpd
including
- additional modules you will have to give the following statements to
- the shell:
$ cd apache_1.3.x $ ./configure [--enable-module=module|--add-module=/path/to/module] @@ -200,9 +199,9 @@This will produce the required extra libraries or object files for module and link everything to
-src/httpd.exe
.
To build a DLL version of httpd
including additional
- modules you have to give the following statements to the shell:
$ cd apache_1.3.x $ ./configure --enable-rule=SHARED_CORE \ @@ -213,22 +212,21 @@This will produce the required extra libraries or object files which hold all static linked code. Then
dllwrap
anddlltool
will - export all of those (including any added extra module code) to the shared + export all of those (including any additional module code) to the sharedlibhttpd.dll
and create thelibhttpd.a
import library which is required for linkinghttpd.exe
.
This method is currently ONLY supported using
a patched version of ld.exe
. Please see the
- requirements section on where to get that version.
+ requirements section for where to get that version.
To build a dynamic loadable DLL version of httpd
which can
- load DLL modules on the fly while runtime you have to proceed as follows:
First build Apache's shared core giving the following statements - to the shell:
+First build Apache's shared core as follows:
$ cd apache_1.3.x $ ./configure --enable-rule=SHARED_CORE --enable-module=so \ @@ -240,10 +238,10 @@Now the
+make
process will break when trying to compile the shared module defined using--enable-shared
. You will have to use a work-around, due to the fact that currently there is no -src/libhttpd.dll
build that is required to link against the - shared module.src/libhttpd.dll
(required to link against by the + shared module build process). -
make
and
+make
and
restart the make
process again:
$ touch /path/to/module.so @@ -251,18 +249,18 @@ $ make install
This will build the core dynamic library libhttpd.dll
as
- described in the previous build alternative.
$ cd /path/to/module $ gcc --shared -o module.dll module.lo /path/to/libhttpd.dll-
The build shared DLL module has to be placed to Apache's installation
- bin
directory where libhttpd.dll
goes too.
The shared DLL module has to be placed in Apache's
+ bin
directory, where libhttpd.dll
also goes.
conf/httpd.conf
to load
-and activate shared DLL modules while runtime:
+and activate shared DLL modules at runtime:
# httpd.conf [...] @@ -274,30 +272,30 @@
The above steps have to be repeated for each shared DLL module you want - to create.
+ to build.To make the extension process of your httpd
using
- shared DLL modules easier you may use the
- apxs
tool.
+
To make the extendinghttpd
with shared DLL modules
+ easier, you can use apxs
.
Make sure you have configured $CFG_LDFLAGS_SHLIB
within
apxs
to include the --shared
directive and
the path to the shared code DLL libhttpd.dll
.
Now you should be able to create a shared DLL module from a mod_foo.c
- source code file with:
+ source file with:
$ apxs -c mod_foo.c -o mod_foo.dll- Place the created DLL file to Apache's
bin
directory, so
+ Place the resulting DLL in Apache's bin
directory, so
the dlopen()
function within the compiled in mod_so.c
- module can find and load it while runtime.
+ module can find and load it at runtime.
Apache on Cygwin can be started and stopped in the same manner as on Unix systems. You may also use the @@ -307,15 +305,15 @@
If installed to the default Apache layout directory you can start +
If installed with the default Apache directory layout, you can start
httpd
as follows:
$ /usr/local/apache/bin/httpd-
An explicit background &
indicator is not required. The
- resulting parent process is detached from the current terminal.
- Check the global error_log
to see if Apache has started
- cleanly without any major problems.
An explicit background indicator (&
) is not
+ required. The parent process is automatically detached from the
+ current terminal. Check the global error_log
to see if
+ Apache started cleanly without any major problems.
To stop Apache send at least a SIGTERM
signal to the
@@ -324,9 +322,9 @@
$ kill -TERM `cat /usr/local/apache/logs/httpd.pid`
-
In order to update configuration directives and hence reload the given
- httpd.conf
configuration file you may send a SIGHUP
+
In order to update configuration directives and reload the
+ httpd.conf
configuration file, send a SIGHUP
to the parent httpd
process:
$ kill -HUP `cat /usr/local/apache/logs/httpd.pid` @@ -338,24 +336,25 @@Running Apache for Cygwin as a Service
-Apache on Cygwin can be invoked as Windows NT or Windows 2000 service. +
Apache on Cygwin can be invoked as a Windows NT or Windows 2000 service. Cygwin has its own
cygrunsrv.exe
facility to define, remove, - start and stop services as follows: + start, and stop services as follows:
Use the following statement to install the httpd.exe
as a new
+
Use the following statement to install httpd.exe
as a new
service:
$ cygrunsrv -I service_name-p /usr/local/apache/bin/httpd.exe [-a arguments] \ [-e VAR=VALUE] [-t auto|manual] [-u user] [-w passwd]-
Where -a
is used to pass command line arguments to
- httpd.exe
, like -DFOO
defines and -e
- is used to pass environment variables to the starting environment. If necessary
- you may use the -t
options to set the starting type of the service.
- If you want the new service to run under a different user you will have to supply
- necessary arguments for the -u
and -w
options.
Where -a
is used to pass command line arguments (such
+ as -DFOO
defines) to httpd.exe
, and
+ -e
is used to pass environment variables. If necessary
+ you may use the -t
options to set the autostart
+ configuration for the service. If you want the new service to run
+ under a different userid, you will have to supply the -u
+ and -w
options.
After the new service is installed it can be started using the following @@ -366,7 +365,7 @@
Check your process table and global error_log
file to ensure Apache
has started without any major problems.
A running Apache service may be stopped using the following command:
$ cygrunsrv -E service_name @@ -374,9 +373,8 @@This will stop all running
-httpd.exe
processes and shutdown the HTTP service for the machine.
An installed Apache service may be removed from the internal service invocation - table of Windows NT or Windows 2000 using the following command:
+An installed Apache service may be removed from Windows NT or Windows 2000 using the following command:
$ cygrunsrv -R service_name@@ -384,8 +382,9 @@
Please refer to the corresponding man
page of cygrunsrv
and
- the Cygwin mailing list for further details of how services are invoked.
Please refer to the man
page for cygrunsrv
+ and the Cygwin mailing list for further details of how services are
+ invoked.