DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36883>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36883

           Summary: mod_proxy_ajp and tomcat issues
           Product: Tomcat 5
           Version: 5.0.28
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Connector:AJP
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


I don't know whether this is on the mod_proxy_ajp side or the tomcat side, 
so ...

host:   linux (CentOS, aka RHEL, 4 with all current updates)
browser:        firefox 1.0.7
httpd:  2.1.7, built from source
tomcat: 5.0.28, binary distribution

append to /etc/hosts:
        127.0.0.1       localhost tomcat

append to httpd.conf:

 <VirtualHost *>
 ServerName tomcat
 #ProxyPass        / ajp://localhost:8009/
 ProxyPass        / http://localhost:8080/
 #ProxyPassReverse / ajp://localhost:8009/
 ProxyPassReverse / http://localhost:8080/
 </VirtualHost>

No other changes from a default installation of the two servers.

The first problem is that if you simply browse to http://tomcat and click on 
admin, it works with HTTP, but not with AJP.  To illustrate, let's compare the 
differences with wget:

AJP:
 $ wget http://tomcat/admin
 --01:06:56--  http://tomcat/admin
            => `admin'
 Resolving tomcat... 127.0.0.1
 Connecting to tomcat|127.0.0.1|:80... connected.
 HTTP request sent, awaiting response... 302 Moved Temporarily
 Location: https://tomcat/admin/ [following]
 --01:06:56--  https://tomcat/admin/
            => `index.html'
 Connecting to tomcat|127.0.0.1|:443... failed: Connection refused.
 Resolving tomcat... 127.0.0.1
 Connecting to tomcat|127.0.0.1|:443... failed: Connection refused.

HTTP:
 $ wget http://tomcat/admin
 --01:09:20--  http://tomcat/admin
            => `admin'
 Resolving tomcat... 127.0.0.1
 Connecting to tomcat|127.0.0.1|:80... connected.
 HTTP request sent, awaiting response... 302 Moved Temporarily
 Location: http://tomcat/admin/ [following]
 --01:09:20--  http://tomcat/admin/
            => `index.html'
 Connecting to tomcat|127.0.0.1|:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 2,622 (2.6K) [text/html]
 
 100%[====================================>] 2,622         --.--K/s
 
 01:09:20 (53.20 MB/s) - `index.html' saved [2622/2622]

Note that the 302 redirects from HTTP to HTTPS in the AJP case, but not in the 
HTTP case.

OK, so let's bypass the 302 and go directly to http://tomcat/admin/.  The 
initial GET works with either protocol, e.g., with AJP:

 # wget http://tomcat/admin/
 --01:10:06--  http://tomcat/admin/
            => `index.html.1'
 Resolving tomcat... 127.0.0.1
 Connecting to tomcat|127.0.0.1|:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 2,615 (2.6K) [text/html
 
 100%[====================================>] 2,615         --.--K/s
 
 01:10:06 (95.92 MB/s) - `index.html.1' saved [2615/2615]

However, the resources referenced on the page are only fetched when using 
HTTP, not AJP.  The difference is readily apparent.  The images, stylesheets, 
etc., are served up with HTTP, but not with AJP.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to