Docstoc

Apache + Tomcat

Document Sample
Apache + Tomcat Powered By Docstoc
					Apache + Tomcat




 www.torontocollege.com
      Apache + Tomcat4.0
   1. Download mod_webapp.so:
      http://jakarta.apache.org/builds/jakarta-tomcat-

        4.0/release/v4.0.1/bin/win32/
   2 . Copy the mod_webapp.so file into your Apache
    1.3 "libexec" directory

   3. Copy the libapr.dll file into your Apache 1.3
    "libexec" directory



                    www.torontocollege.com
        Apache + Tomcat4.0
   4. Edit your "httpd.conf" configuration file
       Add a few lines to load that module at startup (Windows
        users, read above, you have to "replace" libexec with
        "modules"
       LoadModule webapp_module libexec/mod_webapp.so
       NOTE: It was reported that sometimes Apache under
        windows doesn't like the
       AddModule line in the configuration file. Please, if you can't
        start your
       Apache service, try commenting out that line in your
        httpd.conf file.

                        www.torontocollege.com
       Apache + Tomcat4.0

5. you can start adding your
      web application connections and context into the Apache
       configurations.Back to the "httpd.conf" file, you need to add
       something like:
        WebAppConnection conn         warp localhost:8008
        WebAppDeploy        examples conn /examples




                      www.torontocollege.com
          Apache + Tomcat4.0
   In this example, I'm instructing the WebApp connector to connect
    to the servlet container waiting for requests on the current
    "localhost" host and bound to port 8008
   A brief detailed description of the above-mentioned directives is:
    WebAppConnection [connection name] [provider] [host:port]
    [connection name]




                          www.torontocollege.com
       Apache + Tomcat4.0
   A unique name for the connection to be created between
    Apache and Tomcat.
   [provider]
     The name of the provider used to connect to the servlet
    container. Currently only the "warp" provider is available.
    [host:port]
    The host name and port number to which the WARP connection
    must attempt to connect. The port is the one you specified in
    your server.xml" file for the "...WarpConnector" connector, not
    your HTTP one. WebAppDeploy [application name] [connection
    name] [url path]


                      www.torontocollege.com
       Apache + Tomcat4.0
   [application name]
    The application name as present in your "webapps" directory in
    Tomcat. For example, if you want to deploy a WAR-based web
    application, your application name will look something like
    "myApplication.war".

    [connection name]
    The name of a previously declared WebAppConnection
    directive.

    [url path]
    The URL path where this application will be deployed.


                      www.torontocollege.com
       Apache + Tomcat3.2
   Site: http://www.apache.org
    Click: Apache Server, then download
   Go to binaries directory, Then win32 directory
   Download apache 1_3_12_win.exe




                    www.torontocollege.com
      Apache + Tomcat3.2
   Installation: Click apache1_3_12_win32.exe
   Configure Apache web server
    1. Get your computer’s IP address, For example:
    192.168.0.68
    2. Open httpd.conf file
       Set ServerName your computer IP Address
       ServerAdmin your Email address




                    www.torontocollege.com
      Apache + Tomcat3.2

   Configure the directory which you want to access
    from browser.
      For example:
          alias /mydoc/ d:/apache_web_doc
   Save the configure file




                    www.torontocollege.com
       Apache + Tomcat3.2

    Copy any *.html file to the directory which allow
     browser to make request

    Present the *.html
    For example: http://localhost/mydoc/*.html




                     www.torontocollege.com
      Apache + Tomcat3.2

   Web Site:http://www.apache.org
   Click Jakarta , then Click Tomcat3.1.1
   Install: Unzip the Jakarta-Tomcat file
   Test Tomcat: http://your_computer_IP:8080




                  www.torontocollege.com
      Apache + Tomcat3.2

   http://www.apache.org
   Click Java-Apache
   Download JServ1.1
   Install JServ1.1




                  www.torontocollege.com
       Apache + Tomcat3.2

   Copy ApacheModleJServ.dll into the Apache modules directory
   Find your httpd.conf and add the following line to the end
    include “c:\jakarta-tomcat\conf\tomcat-apache.conf”




                      www.torontocollege.com
       Apache + Tomcat3.2
   In order to set up a new web application, for
    example,in our case, project, you need to add a new
    Context tag in server.xml
    Our case:
      <Context
    path=“/project”,docBase=“webapps/project”
    Debug=“0” reloadable=“true”>
      <Context>



                   www.torontocollege.com

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:3
posted:12/5/2011
language:English
pages:15