Hello John,

using the virual host is a correct approach, it should work.
I make some tests on my side.

best regards,
Thierry Boileau

>
> I am trying to run a Component that provides 2 different HTTP 
> services, both using the same domain, but on different ports.  The 
> specific ports are configurable, but in my testing, I'm using 8081 and 
> 8443 for one service, and 9999 for the other.  So my goal is to route 
> to 2 different apps when I receive requests: go to app 1 on 
> "myhost.com:8081" and "myhost.com:8443", and go to app 2 on 
> "myhost.com:9999".
>
> My initial solution is to create 2 different VirtualHost objects, call 
> setHostPort() on each of them, and let the routing work that way. 
>  When I'm using a web browser, this seems to work fine.  
>
> I have an issue that I can't seem to solve, though.  One of my test 
> clients connects using apache.commons.HttpClient, and my server can't 
> route its requests - the routing fails and I get 404s.  I suspect it's 
> because the "Host" header isn't being populated properly, but in all 
> my fiddling with the client program, I haven't been able to get it to 
> work.  
>
> I can continue trying to fix the test client, but I wonder if my 
> approach is the best way to handle this.  I also wonder if I'm going 
> to have further problems when I try to run the server with app 1 bound 
> to port 80 and 443.  Is the routing going to continue working if the 
> requests come with the default ports?  I thought the solution to that 
> might be to make app 1 the components default host, but that seems to 
> break all routing to app 2; it never receives any calls, even when its 
> port number is specified in the request (such as with a web browser as 
> the client.)
>
> Thanks for any thoughts!
>
> --------------------------------
> John Wismar
> mailto:[email protected]

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2393543

Reply via email to