-
1. Re: Reverse Proxy Configuration
ctomc Mar 3, 2014 4:21 AM (in response to hwellmann.de)1 of 1 people found this helpfulHey,
it is simple, just add reverse-proxy handler under <handlers>
example:
<handlers>
<reverse-proxy name="reverse-proxy" connections-per-thread="30">
<host name="ajp://localhost:8080" instance-id="myRoute"/>
</reverse-proxy>
</handlers>
then just reference your handler in host configuration.
--
tomaz
-
2. Re: Reverse Proxy Configuration
hwellmann.de Mar 3, 2014 1:13 PM (in response to ctomc)Thanks, that got me going, but I had to add this to get rid of a 404:
<location name="/" handler="reverse-proxy"/>
Also, I got a 500 when trying
<host name="http://www.jboss.org" instance-id="myRoute"/>
I had to add the port number like this:
<host name="http://www.jboss.org:80" instance-id="myRoute"/>
-
3. Re: Reverse Proxy Configuration
ctomc Mar 3, 2014 3:37 PM (in response to hwellmann.de)Harald Wellmann wrote:
Also, I got a 500 when trying
<host name="http://www.jboss.org" instance-id="myRoute"/>
Can you paste stack trace?
-
4. Re: Re: Reverse Proxy Configuration
rhusar Mar 5, 2014 8:13 AM (in response to ctomc)Tomaz Cerar wrote:
Harald Wellmann wrote:
Also, I got a 500 when trying
<host name="http://www.jboss.org" instance-id="myRoute"/>
Can you paste stack trace?
Here it is:
14:09:01,101 ERROR [io.undertow.request] (default I/O-1) Blocking request failed HttpServerExchange{ GET /}: java.lang.IllegalArgumentException: port out of range:-1 at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143) [rt.jar:1.7.0_51] at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224) [rt.jar:1.7.0_51] at io.undertow.client.http.HttpClientProvider.connect(HttpClientProvider.java:64) at io.undertow.client.UndertowClient.connect(UndertowClient.java:89) at io.undertow.server.handlers.proxy.ProxyConnectionPool.openConnection(ProxyConnectionPool.java:134) at io.undertow.server.handlers.proxy.ProxyConnectionPool.connect(ProxyConnectionPool.java:278) at io.undertow.server.handlers.proxy.LoadBalancingProxyClient.getConnection(LoadBalancingProxyClient.java:225) at io.undertow.server.handlers.proxy.ProxyHandler$3.run(ProxyHandler.java:147) at io.undertow.util.SameThreadExecutor.execute(SameThreadExecutor.java:17) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:180) at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:153) at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:69) at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:38) at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.2.0.Final.jar:3.2.0.Final] at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291) [xnio-api-3.2.0.Final.jar:3.2.0.Final] at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286) [xnio-api-3.2.0.Final.jar:3.2.0.Final] at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.2.0.Final.jar:3.2.0.Final] at org.xnio.nio.NioTcpServerHandle.handleReady(NioTcpServerHandle.java:53) [xnio-nio-3.2.0.Final.jar:3.2.0.Final] at org.xnio.nio.WorkerThread.run(WorkerThread.java:531) [xnio-nio-3.2.0.Final.jar:3.2.0.Final]
apart form that it seems to work fine. Should we default to 80/443?