Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Application Server Enterprise Edition 8 2004Q4 Beta Administration Guide 

Appendix A   
Compiling and Configuring Apache Web Server

This appendix describes how to compile the Apache source code and configure an installation of Apache Web Server to use the Sun Java System Application Server load balancer plug-in.

Download the appropriate Apache source code. For information about the versions and platforms of Apache Web Server supported for Sun Java System Application Server, see the Sun Java System Application Server Release Notes.

This appendix contains the following topics:


Minimum Requirements

This section describes the minimum requirements to successfully compile Apache web server to run the load balancer plug-in. The Apache source must be compiled and built to run with SSL.

This section contains the following topics:

Minimum Requirements for Apache 1.3

For requirements on Microsoft Windows platforms, see:
http://httpd.apache.org/docs/windows.html#req
http://httpd.apache.org/docs/win_compiling.html

Requirements for other platforms:

In addition, before compiling Apache:

Minimum Requirements for Apache 2

For requirements on Microsoft Windows platforms, see http://httpd.apache.org/docs-2.0/platform/windows.html

Requirements for other platforms:

In addition, before compiling Apache:


Installing SSL-aware Apache

For instructions on compiling and installing Apache on Microsoft Windows platforms, see the following web sites:

Apache 1.3:

http://httpd.apache.org/docs/win_compiling.html

Apache 2:

http://httpd.apache.org/docs-2.0/platform/win_compiling.html

Follow these steps to compile, configure, and install SSL-aware Apache web server on other platforms. Although the examples show compiling and building Apache 1.3.29, the same procedures apply for Apache 2.

Compiling and Building Open SSL

Unpack the openssl-0.9.7c source and follow these steps.

  1. cd openssl-0.9.7c
  2. ./config
  3. make

Configuring Apache with mod SSL

Unpack the mod_ssl-2.8.14-1.3.29 source and follow these steps.

  1. cd mod_ssl-2.8.14-1.3.29
  2. run ./configure --with-apache=../apache_1.3.27--with-ssl=../openssl-0.9.7c --prefix=install path --enable-module=ssl --enable-shared=ssl --enable-rule=SHARED_CORE --enable-module=so

The directory specified in the above command is a variable. The prefix argument indicates where to install Apache. This command outputs several lines on the screen.

This command creates the make files for the build according to your system configuration. If there are errors in configure, some header files or utility programs may be missing. Install them before proceeding.

Compiling and Building Apache

This procedure installs Apache in the location provided in the --prefix attribute described in "Configuring Apache with mod SSL."

  1. Download the apache_1.3.29 source distribution.
  2. Unpack the source distribution. The source distribution comes as a compressed archive. For apache_1.3.29, the source distribution archive reads apache_1.3.29.tar.gz.

  3. Decompress and untar the archive using the following command:
  4. tar -zxvf apache_1.3.29.tar.gz

    This command creates a directory called apache_1.3.29 in your current working directory.

  5. For Apache 1.3 on Linux, include the following lines in src/MakeFile after End of automatically generated section:
  6. LIBS+= -licuuc -licui18n -lnspr4 -lpthread -lxerces-c -lsupport -lnsprwrap -lns-httpd40

    LDFLAGS+= -L/appserver_installdir/lib

  7. For Apache 2.0 on Linux, modify apache_src/build/config_vars.mk and add the following lines:
  8. EXTRA_LIBS += -licuuc -licui18n -lnspr4 -lpthread -lxerces-c -lsupport -lnsprwrap -lns-httpd40

    LDFLAGS+=-L<appserver install dir>/lib

  9. Compile Apache using the make command, as follows:
    1. cd apache_1.3.29
    2. make
    3. make certificate (Apache 1.3 only)
    4. make install

    5. Note

      On Apache 2, instead of running the command make certificate, copy and untar ssl.tar to apache_install_path/conf folder. Edit ssl.conf to point the SSLCertificateFile property to the location of ssl.crt/server.crt.


      The command make install outputs several lines on the screen indicating that the process is compiling Apache source code and linking Apache. This process normally concludes without errors. However, if any errors occur, check that all the library files and utility programs of Apache have been properly downloaded.


      Note

      The command make certificate asks for a secure password. Remember this password as it's required for starting secure Apache.


Configure this installation of Apache by entering the appropriate values for your environment in the apache_install_path/conf/httpd.conf file.

Starting and Stopping Apache

Apache comes bundled with a script titled apachectl that facilitates starting, stopping and restarting Apache.

After starting Apache, test the installation. Once Apache is running, type the following address in a web browser: http://localhost/. If the installation was successful and Apache is running, a test page is displayed.



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.