[jetty-user] Having trouble with AsyncProxyServlet$Transparent
Kevin White <[email protected]>
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <[email protected]> |
I'm trying to set up AsyncProxyServlet$Transparent, and I keep getting
403 Forbidden.
I've tried to pare this down to the bare minimum, so I'm just using the
example here:
http://docs.codehaus.org/display/JETTY/Asynchronous+Proxy+Servlet
I take a brand new jetty-6.1.25.zip file and unzip it on Windows 7. I
clear out the distributed contexts and webapps directories. I make a
webapp called lvs4 and put web.xml in WEB-INF:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
<display-name>lvs4</display-name>
<servlet>
<servlet-name>GoogleProxy</servlet-name>
<servlet-class>org.mortbay.proxy.AsyncProxyServlet$Transparent</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>ProxyTo</param-name><param-value>http://www.google.com</param-value>
</init-param>
<init-param>
<param-name>Prefix</param-name><param-value>/google</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>GoogleProxy</servlet-name>
<url-pattern>/google/*</url-pattern>
</servlet-mapping>
</web-app>
When I run jetty, I see this:
2010-10-04 15:53:15.552:INFO:/lvs4:Transparent AsyncProxyServlet @
/google to http://www.google.com
However, when I do this:
http://localhost:8080/lvs4/google/hello.html
I get:
HTTP ERROR 403
Problem accessing /lvs4/google/hello.html. Reason:
FORBIDDEN
I've actually had a proxy setup to point to a server I control, and by
using tcpdump, I can confirm that the connections aren't being proxied
through.
Misspelling the URL:
http://localhost:8080/lvs4/gooogle/hello.html
gives me a 404 NOT_FOUND.
Access log shows:
127.0.0.1 - - [04/Oct/2010:20:00:37 +0000] "GET
/lvs4/google/hello.html HTTP/1.1" 403 1387
127.0.0.1 - - [04/Oct/2010:20:01:41 +0000] "GET
/lvs4/gooogle/hello.html HTTP/1.1" 404 1388
So, what is turning my proxy into a 403?
Is it something on Windows 7? (Doubtful, as how would Jetty know it was
being blocked?) Is it something in the default distributed config? I
haven't found anything.
Thanks,
Kevin
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email