Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

protected tomcat connectors

 
John Dunne
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Does anyone know of a way to restrict the use of a connector to certain contexts? The problem I have is this: I'm redirecting all traffic from port 80 to a proxy servlet thats within a https context. As I cant redirect from port 80 to 8443 without problems occuring, I'd be happy with opening port 8080 if I could restrict the 8080 port so that only the proxy servlet can be accessed through it!

Thanks in advance,
John.
 
John Dunne
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Tomcat 5. Is there anyone knowing anything that might lead to something?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All I can think of would be a Filter that examines ALL incoming requests to ports 80 and 8080 and decides if the request is legal..
Bill
 
John Dunne
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After a nice stretch in sunny Greece, its now time to solve some more problems!

Thanks for the response.... I'll try your idea....
 
Ronny Batty
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone had any success with this, you seem to be trying to achieve a similar result to me, sorry if it appears that I'm reposting the same question, just trying to spark a bit of life back into this Thread ;-)

app1 : Setup in its own service with a normal HTTP connector listening on port 8080 and an HTTPS connector listening on port 8443.
app2 : Setup in its own service with a normal HTTP connector listening on port 8081.

My intended goal is to allow only HTTPS access to app1 externally and normal HTTP access to app1 internally (by redirecting port 80 requests to 8081 on our firewall), this would also allow external access to app2 on port 80.

I had assumed that due to the structure of web.xml (ie. a Connector is defined within a Service) that anything picked up by the 8081 connector would be restricted to the app2 Context only, this does not seem to be the case as I can access both app Contexts using any of the 3 connectors :-(

Ronny.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic