httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Williams, Allen" <awill...@harris.com>
Subject [users@httpd] Connecting Apache and Tomcat
Date Fri, 05 Nov 2004 18:48:38 GMT
I am (have been for some time) having a very difficult time doing something that
should be easy and straightforward- connecting Apache to Tomcat and having
Apache serve static contact and Tomcat serve dynamic content.  My directory
structures are rather convoluted, but came mainly from the installation.  I'm
certainly willing to simplify them if it would help, but I can't figure out why
it doesn't work.  Every time I try http://localhost/examples/ I get the
directory listing (under Apache, not under Tomcat), but when clicking on the
entries, ultimately get a 404-File not Found error, when Apache should be (I
think) looking at the directory and passing it off to Tomcat.

-------------------------------------------------------------------
Webapps directory structure: /usr/share/tomcat4/server/webapps/...
	...examples
	...admin
	...manager
-------------------------------------------------------------------
Apache directory structure:
/var/www/...
	...examples
-------------------------------------------------------------------
workers2.properties snippet:

[uri:/admin/*]
info=Tomcat HTML based administration web application.
debug=5
context="admin"
worker=ajp13:localhost:8009

[uri:/manager/*]
info=A scriptable management web application for the Tomcat Web Server. debug=5
context="manager" worker=ajp13:localhost:8009

[uri:/examples/*]
info=tomcat Examples.
debug=5
context="examples"
worker=ajp13:localhost:8009
-------------------------------------------------------------------
server.xml snippet:

      <Host name="localhost" debug="5" appBase="webapps" 
            unpackWARs="true" autoDeploy="true">
-------------------------------------------------------------------
CATALINA_BASE directory structure:
/var/lib/tomcat4/...
	...webapps/...
		...admin.xml
		...manager.xml
		...examples.xml
-------------------------------------------------------------------
Contents of, for example, admin.xml:

<!--
    Context configuration file for the Tomcat Administration Web App
-->

<Context path="/admin" docBase="/usr/share/tomcat4/server/webapps/admin"
         debug="5" privileged="true" allowLinking="true">

  <!-- make symlinks work in Tomcat 4.1 -->
  <Resources className="org.apache.naming.resources.FileDirContext"
             allowLinking="true" />

  <!-- Uncomment this Valve to limit access to the Admin app to localhost
       for obvious security reasons. Allow may be a comma-separated list of
       hosts (or even regular expressions).
  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127.0.0.1"/>
  -->

  <Logger className="org.apache.catalina.logger.FileLogger"
          prefix="localhost_admin_" suffix=".log" timestamp="true"/>

</Context>
-------------------------------------------------------------------

If someone could *possibly* give me a hand here, I sure would appreciate it.

TIA,
anw

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message