Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 57115 invoked by uid 500); 11 Jul 2001 23:52:36 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 57024 invoked by uid 500); 11 Jul 2001 23:52:35 -0000 Delivered-To: apmail-apache-1.3-cvs@apache.org Delivered-To: apmail-httpd-docs-1.3-cvs@apache.org Date: 11 Jul 2001 23:52:35 -0000 Message-ID: <20010711235235.56990.qmail@apache.org> From: pepper@apache.org To: httpd-docs-1.3-cvs@apache.org Subject: cvs commit: httpd-docs-1.3/htdocs/manual cygwin.html pepper 01/07/11 16:52:35 Modified: htdocs/manual cygwin.html Log: S'more cygwin cleanup. Revision Changes Path 1.3 +58 -60 httpd-docs-1.3/htdocs/manual/cygwin.html Index: cygwin.html =================================================================== RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/cygwin.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cygwin.html 2001/07/11 21:50:32 1.2 +++ cygwin.html 2001/07/11 23:52:35 1.3 @@ -14,7 +14,7 @@ > -

Using Apache With Cygwin

+

Using Apache with Cygwin

This document explains how to install, configure and run Apache 1.3 under the Cygwin layer for Microsoft @@ -66,7 +66,7 @@

  • Differences from Apache for Windows (native)
  • Requirements
  • Downloading Apache for Cygwin -
  • Configuring and installing Apache for Cygwin +
  • Configuring and Installing Apache for Cygwin
  • Running Apache for Cygwin
  • Running Apache for Cygwin as a Service @@ -117,7 +117,7 @@ Apache for Cygwin can be built with most of the available Apache modules with no or minimal changes. Many popular modules have been compiled and tested with Apache for Cygwin, including mod_dav, - mod_ssl, mod_php, mod_perl, + mod_ssl, mod_php, mod_perl, mod_gzip, and mod_jserv.

    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 @@

    Downloading Apache for Cygwin

    -

    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.

    + Apache httpd web site at http://httpd.apache.org/. The + site lists the current release, any more recent development + versions, and information on any mirror sites.

    -

    Configuring and installing Apache for Cygwin

    +

    Configuring and Installing 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:

    • Static linked version

      To build a static linked version of httpd including - additional modules you will have to give the following statements to - the shell:

      + additional modules, use the following commands in 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.

      -
    • Shared core DLL linked version (one for all version) +
    • Shared core, DLL linked version ('one-for-all' version)

      To build a DLL version of httpd including additional - modules you have to give the following statements to the shell:

      + modules, use the following commands:

           $ 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 and dlltool 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 shared libhttpd.dll and create the libhttpd.a import library which is required for linking httpd.exe.

    • Shared DLL modules linked version

      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:

      + load DLL modules on the fly (at runtime), 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).

        -
      • Place an empty file to satisfy make and +
      • Create an empty file to satisfy 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.

        + described in the previous scenario.

        -
      • Now we have to link the shared module against that library: +
      • Now we have to link the shared module against that library:
             $ 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 - bindirectory where libhttpd.dll goes too.

        +

        The shared DLL module has to be placed in Apache's + bindirectory, where libhttpd.dll also goes.

      • Add configuration directives to 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.

    • Using apxs to create shared DLL modules -

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

    Running Apache for Cygwin

    +

    Running Apache for Cygwin

    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 @@

    • Starting Apache -

      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.

    • Stopping Apache

      To stop Apache send at least a SIGTERM signal to the @@ -324,9 +322,9 @@ $ kill -TERM `cat /usr/local/apache/logs/httpd.pid` -

    • Gracefully re-starting Apache -

      In order to update configuration directives and hence reload the given - httpd.conf configuration file you may send a SIGHUP +

    • Gracefully Restarting Apache +

      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:

      • Installing Apache as a new Service -

        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.

      • Starting Apache as a Service

        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.

        -
      • Stopping Apache Service +
      • Stopping an Apache Service

        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.

        -
      • Removing Apache Service -

        An installed Apache service may be removed from the internal service invocation - table of Windows NT or Windows 2000 using the following command:

        +
      • Removing an Apache Service +

        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.

      @@ -397,4 +396,3 @@ -