RE: different context on different ports, but one tomcat
From: Szabolcs Márton [mailto:[EMAIL PROTECTED] Subject: different context on different ports, but one tomcat I have ONE instance of Tomcat with 3 different webapps (context) instance#1: accept connection only on port 80 from anywhere instance#2: accept connections only on https port from anywhere instance#3 accept connections on port 7080 but only from localhost You didn't bother to tell us what level of Tomcat you're using, but this should be a starting point for the current version: http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Remote%20Address%20Filter You will probably have to extend the above filter to add checks for port numbers and secure connections. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: different context on different ports, but one tomcat
From: Caldarale, Charles R Subject: RE: different context on different ports, but one tomcat From: Szabolcs Márton [mailto:[EMAIL PROTECTED] Subject: different context on different ports, but one tomcat I have ONE instance of Tomcat with 3 different webapps (context) instance#1: accept connection only on port 80 from anywhere instance#2: accept connections only on https port from anywhere instance#3 accept connections on port 7080 but only from localhost You didn't bother to tell us what level of Tomcat you're using, but this should be a starting point for the current version: http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Remo te%20Address%20Filter You will probably have to extend the above filter to add checks for port numbers and secure connections. Forgot to mention that #2 should be handled by configuring a transport-guarantee of CONFIDENTIAL in its web.xml descriptor. Why do you think it's necesary to prohibit https access to application #1? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: different context on different ports, but one tomcat
If the webapps shall be completely isolated and shall not share connectors it could be an option to define three separate services in server.xml. Then the transport guarantee for webapp2 is given by the server configuration. You should be aware that you must assign separate thread pools to each connector and thus need more resources than if your webapps can share a connector. -- Matthias Server port=8005 shutdown=SHUTDOWN !-- listener and resource definitions skipped -- Service name=Catalina1 Connector port=80 protocol=HTTP/1.1 connectionTimeout=2 / Engine name=Catalina1 defaultHost=localhost !-- Valve, realm etc. skipped -- Host name=localhost appBase=webapps1 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service Service name=Catalina2 Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true scheme=https secure=true clientAuth=false sslProtocol=TLS / Engine name=Catalina2 defaultHost=localhost !-- Valve, realm etc. skipped -- Host name=localhost appBase=webapps2 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service Service name=Catalina3 Connector port=7080 address=127.0.0.1 protocol=HTTP/1.1 / Engine name=Catalina3 defaultHost=localhost !-- Valve, realm etc. skipped -- Host name=localhost appBase=webapps3 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server -Original Message- From: Szabolcs Márton [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 20, 2008 5:54 PM To: users@tomcat.apache.org Subject: different context on different ports, but one tomcat Hi! anybody has idea what should i do, when i would like the following to happen: I have ONE instance of Tomcat with 3 different webapps (context) instance#1: accept connection only on port 80 from anywhere instance#2: accept connections only on https port from anywhere instance#3 accept connections on port 7080 but only from localhost this is possible in tomcat? firstly only with tomcat, no firewall or apache! if it is not possible, that any tricks appropiated :) thx Saby - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: different context on different ports, but one tomcat
Caldarale, Charles R wrote: From: Szabolcs Márton [mailto:[EMAIL PROTECTED] Subject: different context on different ports, but one tomcat I have ONE instance of Tomcat with 3 different webapps (context) instance#1: accept connection only on port 80 from anywhere instance#2: accept connections only on https port from anywhere instance#3 accept connections on port 7080 but only from localhost You didn't bother to tell us what level of Tomcat you're using, but this should be a starting point for the current version: http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Remote%20Address%20Filter this would be incorrect, since you've already accepted the connection and parsed the HTTP request. Matthias Reich posted the correct solution, just use multiple Service containers Filip You will probably have to extend the above filter to add checks for port numbers and secure connections. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]