Re: Mimicking two distinct virtual hosts just like in HTTPd
Am 2021-11-08 um 17:36 schrieb Mark Thomas: On 08/11/2021 15:36, Michael Osipov wrote: Folks, consider the following in httpd.conf: Listen {IP}:8443 Listen {IP}:8444 later: DocumentRoot /www/webapps1 ServerName {hostname} mod_ssl config... DocumentRoot /www/webapps2 ServerName {hostname} mod_ssl config2... The second virtual host shall deliver only a subset of webapps1, but configured client cert auth to avoid issues with PHA and renotiation. Now, I am looking for the same in Tomcat. Given that I have one Server, one Service, two Connectors one Engine and two Hosts there is no way to bind a Host in Tomcat to an listen address, but only to a hostname/IP address. From my understanding of the server.xml I would need set up *two* Service elements with one Engine, Connector and Host each. Is my understanding correct? Yes. Connector elements are associated with a Service so if you want different Hosts on different ports you need different Services. Thanks, I already thought so. This is a solution I can happily live with. Maybe this could be simplified in Tomcat 11 from an admin/developer point of view. M
Re: Mimicking two distinct virtual hosts just like in HTTPd
On 08/11/2021 15:36, Michael Osipov wrote: Folks, consider the following in httpd.conf: Listen {IP}:8443 Listen {IP}:8444 later: DocumentRoot /www/webapps1 ServerName {hostname} mod_ssl config... DocumentRoot /www/webapps2 ServerName {hostname} mod_ssl config2... The second virtual host shall deliver only a subset of webapps1, but configured client cert auth to avoid issues with PHA and renotiation. Now, I am looking for the same in Tomcat. Given that I have one Server, one Service, two Connectors one Engine and two Hosts there is no way to bind a Host in Tomcat to an listen address, but only to a hostname/IP address. From my understanding of the server.xml I would need set up *two* Service elements with one Engine, Connector and Host each. Is my understanding correct? Yes. Connector elements are associated with a Service so if you want different Hosts on different ports you need different Services. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Mimicking two distinct virtual hosts just like in HTTPd
Folks, consider the following in httpd.conf: Listen {IP}:8443 Listen {IP}:8444 later: DocumentRoot /www/webapps1 ServerName {hostname} mod_ssl config... DocumentRoot /www/webapps2 ServerName {hostname} mod_ssl config2... The second virtual host shall deliver only a subset of webapps1, but configured client cert auth to avoid issues with PHA and renotiation. Now, I am looking for the same in Tomcat. Given that I have one Server, one Service, two Connectors one Engine and two Hosts there is no way to bind a Host in Tomcat to an listen address, but only to a hostname/IP address. From my understanding of the server.xml I would need set up *two* Service elements with one Engine, Connector and Host each. Is my understanding correct? Michael - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listing all applications in manager across configured virtual hosts
The general idea seems like a reasonable use case. Yes, I will look into it and see what I can come up with in terms of a patch we can try. Jason On 12/5/2019 1:08 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Jason, > > On 12/5/19 14:08, Guild, Jason A (DOT) wrote: >> Hi all: >> >> We have configured a Tomcat with two virtual hosts, one for hosting >> client-facing applications on a "vanity" name, and the other for >> the "machine" which hosts private URLs for access to >> admin/diagnostic functions by admins only. >> >> We have an instance of Tomcat manager on the running just fine on >> the "machine" host. Requests to "/manager/html/list" only shows >> applications running on the "machine" host, and not those running >> on the "vanity" host. >> >> I understand from [0] that "If you have Tomcat configured to >> support multiple virtual hosts (websites) you would need to >> configure a Manager for each." >> >> But if I request the complete server status from that same manager >> running on the "machine" host, the "Application list" heading in >> the output contains a listing of all deployed applications ordered >> by all configured virtual hosts. >> >> Clearly the manager has knowledge of all configured applications >> regardless of virtual host. Is is possible to configure a manager >> to just list all applications from all virtual hosts on the main >> "List Applications" screen? >> >> My environment is Tomcat 9.0.29 with OpenJDK 1.8.0_232 on Debian >> Linux. > Clearly, it's possible because you can see it on another screen within > the manager. If all you want is a list (and not full management), then > it should be fairly easy to accomplish. > > The Manager application isn't very complicated. Would you care to > develop a patch/PR for this? I'd recommend making it somehow optional, > as users with separate Managers for many many virtual hosts probably > don't want all that exposed. > > - -chris > -BEGIN PGP SIGNATURE- > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3pf98ACgkQHPApP6U8 > pFgxBg//T+phrpFrqWXfFJjJK5cRd6udQez0Oe+HWls/xBvetuf3/iNqlGe40R6V > R+oMxVM0Wvt70ZgCHAPCW0ccaVOE84eF1w81B6H9XGViUvgLTxF+e+hcyL3TT6Q4 > F1xSx8kGQS4T+f3SarY9YeTvnn56CRlPbLGasMGxY0ZvmI1WIeNaU7ZcLdPIZiWx > H4A7d2/bs87NohKP5jff8GtzHmKXgaj5EzztUjQDeXCcKJBPrG1jAShehiMFCLZc > f9LoY+l/ESgSxO+RChyfo25lzT6YhiG4xHb3x5TKjdMeHKq5pkzparifd/1MGPp3 > FQQHNp8+FYs1MnKOQ+PrEZ6KRLLXTgRYUVx1S9Vnl9QD3T0vr6yb62qpCApU6SRD > sGyrQYHZreTh24MIGFrw5vcp7otZWOXcgpoADZyZ7sJdRHvnLFcc2V2e8xndfUIU > EpDuHkpC5d43FPg19gws62c1lVBV8CpwN6ABo95xGe0gymMgfh6FF/atoL2GcHi2 > vr1lcEno8p6VW/yi+gLgCH85o3NygkTElx1GfJ0cns8Sw+GCHzy/SUXCeI5Kc8pH > h4ITWUbMiSFwgcD86K7OwdOfjXqv0MJGZSDm5s5Xtse503SDRo1DGelerOsgpGpl > x5mj1+iytve6FYsMIS7qPAu3KdSpkMXFRJG3fQRM+/fP1eAVIJY= > =O90O > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Jason Guild Analyst/Programmer V Alaska Department of Transportation & Public Facilities Statewide Design & Engineering Services 820 E. 15th Ave. Anchorage, Alaska 99501 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listing all applications in manager across configured virtual hosts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jason, On 12/5/19 14:08, Guild, Jason A (DOT) wrote: > Hi all: > > We have configured a Tomcat with two virtual hosts, one for hosting > client-facing applications on a "vanity" name, and the other for > the "machine" which hosts private URLs for access to > admin/diagnostic functions by admins only. > > We have an instance of Tomcat manager on the running just fine on > the "machine" host. Requests to "/manager/html/list" only shows > applications running on the "machine" host, and not those running > on the "vanity" host. > > I understand from [0] that "If you have Tomcat configured to > support multiple virtual hosts (websites) you would need to > configure a Manager for each." > > But if I request the complete server status from that same manager > running on the "machine" host, the "Application list" heading in > the output contains a listing of all deployed applications ordered > by all configured virtual hosts. > > Clearly the manager has knowledge of all configured applications > regardless of virtual host. Is is possible to configure a manager > to just list all applications from all virtual hosts on the main > "List Applications" screen? > > My environment is Tomcat 9.0.29 with OpenJDK 1.8.0_232 on Debian > Linux. Clearly, it's possible because you can see it on another screen within the manager. If all you want is a list (and not full management), then it should be fairly easy to accomplish. The Manager application isn't very complicated. Would you care to develop a patch/PR for this? I'd recommend making it somehow optional, as users with separate Managers for many many virtual hosts probably don't want all that exposed. - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3pf98ACgkQHPApP6U8 pFgxBg//T+phrpFrqWXfFJjJK5cRd6udQez0Oe+HWls/xBvetuf3/iNqlGe40R6V R+oMxVM0Wvt70ZgCHAPCW0ccaVOE84eF1w81B6H9XGViUvgLTxF+e+hcyL3TT6Q4 F1xSx8kGQS4T+f3SarY9YeTvnn56CRlPbLGasMGxY0ZvmI1WIeNaU7ZcLdPIZiWx H4A7d2/bs87NohKP5jff8GtzHmKXgaj5EzztUjQDeXCcKJBPrG1jAShehiMFCLZc f9LoY+l/ESgSxO+RChyfo25lzT6YhiG4xHb3x5TKjdMeHKq5pkzparifd/1MGPp3 FQQHNp8+FYs1MnKOQ+PrEZ6KRLLXTgRYUVx1S9Vnl9QD3T0vr6yb62qpCApU6SRD sGyrQYHZreTh24MIGFrw5vcp7otZWOXcgpoADZyZ7sJdRHvnLFcc2V2e8xndfUIU EpDuHkpC5d43FPg19gws62c1lVBV8CpwN6ABo95xGe0gymMgfh6FF/atoL2GcHi2 vr1lcEno8p6VW/yi+gLgCH85o3NygkTElx1GfJ0cns8Sw+GCHzy/SUXCeI5Kc8pH h4ITWUbMiSFwgcD86K7OwdOfjXqv0MJGZSDm5s5Xtse503SDRo1DGelerOsgpGpl x5mj1+iytve6FYsMIS7qPAu3KdSpkMXFRJG3fQRM+/fP1eAVIJY= =O90O -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
listing all applications in manager across configured virtual hosts
Hi all: We have configured a Tomcat with two virtual hosts, one for hosting client-facing applications on a "vanity" name, and the other for the "machine" which hosts private URLs for access to admin/diagnostic functions by admins only. We have an instance of Tomcat manager on the running just fine on the "machine" host. Requests to "/manager/html/list" only shows applications running on the "machine" host, and not those running on the "vanity" host. I understand from [0] that "If you have Tomcat configured to support multiple virtual hosts (websites) you would need to configure a Manager for each." But if I request the complete server status from that same manager running on the "machine" host, the "Application list" heading in the output contains a listing of all deployed applications ordered by all configured virtual hosts. Clearly the manager has knowledge of all configured applications regardless of virtual host. Is is possible to configure a manager to just list all applications from all virtual hosts on the main "List Applications" screen? My environment is Tomcat 9.0.29 with OpenJDK 1.8.0_232 on Debian Linux. Thanks, Jason [0] https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html
Re: Configuring Tomcat Clustering Solution for Virtual-Hosts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Vinu, On 9/19/19 06:26, Vinu Vibhu Sobhana wrote: > Hai, > > Iam having two Web Servers configured to run Tomcat8.5. My project > manager had assigned me to configure these Tomcat Web Servers in > cluster mode so that the sessions will be managed by the Tomcat > Cluster. The same had been done using tomcat > references/documentation. I have also configured a Hardware LB so > that the VIP may balance the request accessing the URL "http:// ADDRESS>/test". > > But now he had asked to tweak the existing configuration so as to > host multiple application under domain-name basis. Upon verifying > the tomcat documentation, I understood that Host Manager feature of > tomcat can be used for such virtual hosting. You can configure virtual hosting merely by configuring several entries in conf/server.xml. Ths host manager may not be necessary. > I had tried configuring Tomcat Cluster for Virtual-Hosts, but needs > to confirm whether my approach is correct. Please find my queries > and server.xml files listed below. > > 1. Do I need to configure Multiple Cluster class for each > Virtual-Host or a Single Cluster class is enough to manage all > Virtual-Hosts. A single cluster can be configured in conf/server.xml that will cover all virtual hosts in an if you make sure to configure the as a child of the element. If you'd like separate configurations for each virtual host, you may configure sepearate elements as child elements of each element. > 2. While using the Hardware LB with "X-Forwarded-for" enabled, how > can I get the Client IPs listed in the log file using > RemoteIpValve. You will want to enable the RemoteIPValve. You can read about it here: http://tomcat.apache.org/tomcat-8.5-doc/config/valve.html#Remote_IP_Valv e > Should it also be configured Globally or per Virtual-Host basis. That's up to you. If you intend to use your LB for all virtual hosts (which is usually a good idea for HA), then configure it globally. > My server.xml file for both the nodes are mentioned below for > reference. > > server.xml for node1 ### encoding="UTF-8"?> [snip] >defaultHost="localhost" jvmRoute="jvm18"> appBase="webapps" unpackWARs="true" autoDeploy="true"> [snip] Note > that the first (default) is also a VirtualHost. > autoDeploy="true"> www.newapps.com > > > . You may want to consider using HTTPS internally on your network instead of (plaintext) HTTP, and you may also want to consider enabling the EncryptionInterceptor for your cluster. That way, none of your internal communications are in the clear vulnerable to interception or modification within your network. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl2I5QwACgkQHPApP6U8 pFirtw//S3kxxhokYuOEG/434ZMnsV9U3WiOhjt1l7eJoyIqloBeHwca62Irj2mA Pq8FliTJBJYtwCnsK6BLZj9xrnaLJpEf4iVYhkV5ICq6M3ZLJrYzHnuPApn3KlaO 6/9M2+sSQb978Tao1Wy8KNdIFwqP6KRcA/HuPwEwZR987EtGSRgglh3limyFmif1 ZXiz/Vy0+FyjrUhMmhF/2oaWVQ5grKIJ3kvRewYbUxFvGFe0z5i9rlMQnW3rvG/H mGWNYosXMTBdqzbT5mB182xRNU2Fwv2oxIAZCf0Ucnruap61BqxmdLx/DV2u+5rp D+teQ78BvJUlWg0Zumo7wYQgFHV3RVoVI7q4for12FJo+VewSkCjBU/A21A5sQA9 z9HBKShZZCCNQoy7p4KKoI6NOAOK9+EZUSCrf/KpsmU3ujHt1Nj5W9ia49Xor1gC 4Gd9QBsg+M1MF7oPM69vjYJnwq6TWLK47bHPGd+B9FD1N8FBLUs1A6dzdXnE5gsa XWsRianozQGBriZv9HuE7IidhZYYPQuXu6O/pq/w0uQwA9ivKcFi+stayd5MjeCq vQLfgkSbj32vclU0YtUYy3TqLY6WZQQFP89UB1T9HH+KbFwRin+kPzRBZ+9pPmnN P2NRCUMISdRqbItBaa9Jf5NQ2at+WXsZm/+STKlWhmSqyO2CEJY= =Knre -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Configuring Tomcat Clustering Solution for Virtual-Hosts
Hai, Iam having two Web Servers configured to run Tomcat8.5. My project manager had assigned me to configure these Tomcat Web Servers in cluster mode so that the sessions will be managed by the Tomcat Cluster. The same had been done using tomcat references/documentation. I have also configured a Hardware LB so that the VIP may balance the request accessing the URL "http:///test". But now he had asked to tweak the existing configuration so as to host multiple application under domain-name basis. Upon verifying the tomcat documentation, I understood that Host Manager feature of tomcat can be used for such virtual hosting. I had tried configuring Tomcat Cluster for Virtual-Hosts, but needs to confirm whether my approach is correct. Please find my queries and server.xml files listed below. 1. Do I need to configure Multiple Cluster class for each Virtual-Host or a Single Cluster class is enough to manage all Virtual-Hosts. 2. While using the Hardware LB with "X-Forwarded-for" enabled, how can I get the Client IPs listed in the log file using RemoteIpValve. Should it also be configured Globally or per Virtual-Host basis. My server.xml file for both the nodes are mentioned below for reference. server.xml for node1 ### www.newapps.com ### server.xml for node2 ### www.newapps.com ### Thanks! Vinu VS - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: RequestDispatcher.forward between 2 virtual hosts defined in the same Tomcat container
On 06/08/2015 13:40, Neha Munjal wrote: Hi, I would like to know if we can do servlet forwarding between 2 different webapps deployed on 2 different virtual hosts configured in the same Tomcat container. No. Mark So, I have configured 2 different virtual hosts in my Tomcat server.xml as follows: Host name=firstservlet appBase=firstservletapps/ Host name=secondservlet appBase=secondservletapps/ and put the root.xml file for default webapps to: $CATALINA_HOME/conf/Catalina/virtualhost directory. servlet2 is deployed as a different war in the 2nd virtual host. I notice that when I try to fetch the context of servlet2 from Servlet1 to do a forward from Servlet1 to Servlet2, the loaded context is null and so there is forwars. Please note that crossContext attribute is set to true in the context.xml for the 1st war. Also, noticed that in case I do not define any explicit virtual hosts and deploy both the wars in the default host i.e localhost, the forwarding works fine. Can somebody please let me know if servlet.forward works with virtual hosts. Any suggestions would be highly appreciated. Thanks Neha - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RequestDispatcher.forward between 2 virtual hosts defined in the same Tomcat container
Hi, I would like to know if we can do servlet forwarding between 2 different webapps deployed on 2 different virtual hosts configured in the same Tomcat container. So, I have configured 2 different virtual hosts in my Tomcat server.xml as follows: Host name=firstservlet appBase=firstservletapps/ Host name=secondservlet appBase=secondservletapps/ and put the root.xml file for default webapps to: $CATALINA_HOME/conf/Catalina/virtualhost directory. servlet2 is deployed as a different war in the 2nd virtual host. I notice that when I try to fetch the context of servlet2 from Servlet1 to do a forward from Servlet1 to Servlet2, the loaded context is null and so there is forwars. Please note that crossContext attribute is set to true in the context.xml for the 1st war. Also, noticed that in case I do not define any explicit virtual hosts and deploy both the wars in the default host i.e localhost, the forwarding works fine. Can somebody please let me know if servlet.forward works with virtual hosts. Any suggestions would be highly appreciated. Thanks Neha
Re: How to access multiple virtual hosts with a single SSL instance?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 8/13/14, 1:52 AM, Mark Eggers wrote: On 8/12/2014 8:45 PM, Christopher Schultz wrote: Neil, On 8/12/14, 6:01 PM, Neil Aggarwal wrote: Up until now, I have always run Apache in front of Tomcat. I am wondering if I should change to using Tomcat as a standalone server. My concern is how to use multiple virtual hosts with a single SSL instance running on the standard https port. With httpd server, I can access my webapp using the directory name in the URL. For example, if I have an app called app1, it uses URLs that look like this: http://www.app1.com/app1/index.html https://ssl.example.com/app1/index.html If I have another app, it would use urls like this: http://www.app2.com/app2/index.html https://ssl.example.com/app2/index.html This is because mod_jk will forward anything with the app name as the first part of the URL to Tomcat. From what I am reading in the documentation, Tomcat uses the hostname to determine the webapp to use. That won't work since they need to use the same hostname in ssl mode. Tomcat uses both hostname + path to determine where the request should go: if you have multiple virtual hosts, then /foo might map to two different virtual hosts depending upon the Host header (or URL, which generally agree with each other). The only complication TLS adds is that a certificate often only has one single hostname in it, and the server can only bind to all interfaces on a single port (e.g. 443) a single time. Thus, administrators often have to pick a certificate that will work for everyone. As you have mentioned, SNI offers a way around this: the client can notify the server which host they are attempting to contact and the server can reply with the preferred certificate for that host. I don't believe Tomcat has direct support for SNI, though Java 7+ should be able to handle it if the server software (Tomcat in this case) is capable. I haven't looked into how it can be done, but at this point, Tomcat should probably include this feature, at least for JSSE. There are other ways to get around this, including using wildcard TLS certificates, binding to different network interfaces to get s unique interface/port combination for each certificate, etc. Tomcat /can/ be used, here, but it currently takes some creativity. -chris Chris, Does Java 7 have server side support for SNI? I had this discussion on the list a while back, and I think we came to the conclusion that SNI was not supported. I'll have to dig through my archives and the public archives to make sure I'm not mistaken. Ah no - server side SNI is not available until Java 8. I don't know if Tomcat 8 can take advantage of that or not (haven't looked at the code). However Tomcat 7 plus Java 7 equals no server side SNI. It looks like it's possible to hack it, but it looks like a non-trivial effort: http://stackoverflow.com/questions/15100386/java-support-for-server-name-indication-sni-in-server-role (See the links in the first answer) You're stuck with fronting Tomcat with something like Apache HTTPD and using a SAN cert. This is what we currently do in production. Later versions of Apache HTTPD support SSL named virtual hosts (with a little care). Yeah, I read the prior correspondence between you and markt and saw that was your conclusion. A second problem with Tomcat is the lack of support for SNI through tcnative/APR/OpenSSL. At some point, maybe I'll try to figure out how to do SNI with OpenSSL and do all the plumbing through the Java code. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT61rFAAoJEBzwKT+lPKRYdocQAKIGtrNhd9Zyd/mlhf/vnQ2p DWhe4qnz0PLK+eVG0uzYkpqmDpYDGSRLho+d/HkdAmYdaQUoD61ht/RnilHQhJIJ 4AaPpxGbX1+/CGUhbrk1gIh4Clm5nnWSiGsYOjBg6ZdhJvt4QFQ4Js/aadq1ThWw eGIk5dGhL359DNE3pnkeK1CsP2Zl1ExcPaAZ3G4F1og8TpbwD9XsNgdxr8LBpUnk rhoE3AL9H4QxvPDqS7Y7nkUmvgsbr0npgTyZxGhC/R5ALRILBp5lJf1Z+ycGszNc qVRzpx3hljoiBrxdkZT12mpA4B+40eIbomxFEQgu4c8Mtj9FE7qzSBWLtkeHP7X9 dvpCrhG9BzUsbvYOlN6ITqELw5P6vzg1N39yFKTCl1qqqhpq+a10jNngrHhoTL6B vD3u19qR3XuVncl5zEsI6qJt1S7V1IvIXtheJsq1dn8OyX20XG+b/f53hCae0BNm i1a7ozXbAVC5JLepKDgFIShpHjzcpAEnyyXIjaIYAqJsD9CdvWS7+0Vw4Uucirw1 p+GMvgD8tCJ5+bYTpKo8/viqjRe9WhpRVAzUGFEqfkuvYt5lyJOisbFjmeUxXxZ8 8c1NNaVtZPxav0kG282+wtVaQaaq9VN6vIs2HEatcwwwfWIi2Byf5I5Kuq6ajpcF HvLtCyXYRjwdW+CGX1YV =Sn55 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to access multiple virtual hosts with a single SSL instance?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, On 8/13/2014 5:32 AM, Christopher Schultz wrote: Mark, On 8/13/14, 1:52 AM, Mark Eggers wrote: On 8/12/2014 8:45 PM, Christopher Schultz wrote: Neil, On 8/12/14, 6:01 PM, Neil Aggarwal wrote: Up until now, I have always run Apache in front of Tomcat. I am wondering if I should change to using Tomcat as a standalone server. My concern is how to use multiple virtual hosts with a single SSL instance running on the standard https port. With httpd server, I can access my webapp using the directory name in the URL. For example, if I have an app called app1, it uses URLs that look like this: http://www.app1.com/app1/index.html https://ssl.example.com/app1/index.html If I have another app, it would use urls like this: http://www.app2.com/app2/index.html https://ssl.example.com/app2/index.html This is because mod_jk will forward anything with the app name as the first part of the URL to Tomcat. From what I am reading in the documentation, Tomcat uses the hostname to determine the webapp to use. That won't work since they need to use the same hostname in ssl mode. Tomcat uses both hostname + path to determine where the request should go: if you have multiple virtual hosts, then /foo might map to two different virtual hosts depending upon the Host header (or URL, which generally agree with each other). The only complication TLS adds is that a certificate often only has one single hostname in it, and the server can only bind to all interfaces on a single port (e.g. 443) a single time. Thus, administrators often have to pick a certificate that will work for everyone. As you have mentioned, SNI offers a way around this: the client can notify the server which host they are attempting to contact and the server can reply with the preferred certificate for that host. I don't believe Tomcat has direct support for SNI, though Java 7+ should be able to handle it if the server software (Tomcat in this case) is capable. I haven't looked into how it can be done, but at this point, Tomcat should probably include this feature, at least for JSSE. There are other ways to get around this, including using wildcard TLS certificates, binding to different network interfaces to get s unique interface/port combination for each certificate, etc. Tomcat /can/ be used, here, but it currently takes some creativity. -chris Chris, Does Java 7 have server side support for SNI? I had this discussion on the list a while back, and I think we came to the conclusion that SNI was not supported. I'll have to dig through my archives and the public archives to make sure I'm not mistaken. Ah no - server side SNI is not available until Java 8. I don't know if Tomcat 8 can take advantage of that or not (haven't looked at the code). However Tomcat 7 plus Java 7 equals no server side SNI. It looks like it's possible to hack it, but it looks like a non-trivial effort: http://stackoverflow.com/questions/15100386/java-support-for-server-name-indication-sni-in-server-role This looks more like a POC than something that would be supportable in a production environment. The second link indicates as much. (See the links in the first answer) You're stuck with fronting Tomcat with something like Apache HTTPD and using a SAN cert. This is what we currently do in production. Later versions of Apache HTTPD support SSL named virtual hosts (with a little care). Yeah, I read the prior correspondence between you and markt and saw that was your conclusion. A second problem with Tomcat is the lack of support for SNI through tcnative/APR/OpenSSL. At some point, maybe I'll try to figure out how to do SNI with OpenSSL and do all the plumbing through the Java code. That would be really interesting and useful. It won't solve my original constraint (browser / OS combinations that don't support SNI), but it would position me to move to a Tomcat-only stack when that requirement is relaxed. -chris . . . just my two cents /mde/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.13 (MingW32) iQEcBAEBAgAGBQJT64cqAAoJEEFGbsYNeTwt+08IAJC6RbIEwoO7mva3sRap6TVu swTKNJ/6xb6Uq8dB1hLSnNOhO5fLpcB6BJTl6DTEUhIJzt5rFJDRFFu5GMvutWal 3jo9zDKbaOCXKtuCh46B+K412Z8k55v1Ru7PQT63L7ecjAb/Fh/u0sUDVIqCMHlH 2uexD+AQKqnIZHYuI/IUIH+oMWLE+De2BjHWNW2ZD66rAAAZDsFVsMLoYSTunWkk QpHFjDSU0L0Q4Bkuuwq3EL3QNEwuwhM/n4ugsTQZDKmvasVKWHSvC09UvjH9YPSl hhqJuap7id3eIO20GyOGjcPoWx9ansud3pnWQWumzWFTkPXXJSqsdilApYMqgJA= =svyu -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to access multiple virtual hosts with a single SSL instance?
Hello: Up until now, I have always run Apache in front of Tomcat. I am wondering if I should change to using Tomcat as a standalone server. My concern is how to use multiple virtual hosts with a single SSL instance running on the standard https port. With httpd server, I can access my webapp using the directory name in the URL. For example, if I have an app called app1, it uses URLs that look like this: http://www.app1.com/app1/index.html https://ssl.example.com/app1/index.html If I have another app, it would use urls like this: http://www.app2.com/app2/index.html https://ssl.example.com/app2/index.html This is because mod_jk will forward anything with the app name as the first part of the URL to Tomcat. From what I am reading in the documentation, Tomcat uses the hostname to determine the webapp to use. That won't work since they need to use the same hostname in ssl mode. Thanks, Neil -- Neil Aggarwal, (972) 834-1565 We lend money to investors to buy or refinance single family rent houses. No origination fees, quick approval, no credit check. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to access multiple virtual hosts with a single SSL instance?
Hello all: How to use multiple virtual hosts with a single SSL instance running on the standard https port. I just came across SNI which allows me to use separate SSL certificates for each virtual server. Unfortunately, it looks like Tomcat does not yet support it. I guess I am sticking to using Apache in front of Tomcat. Thanks, Neil -- Neil Aggarwal, (972) 834-1565 We lend money to investors to buy or refinance single family rent houses. No origination fees, quick approval, no credit check. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to access multiple virtual hosts with a single SSL instance?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Neil, On 8/12/14, 6:01 PM, Neil Aggarwal wrote: Up until now, I have always run Apache in front of Tomcat. I am wondering if I should change to using Tomcat as a standalone server. My concern is how to use multiple virtual hosts with a single SSL instance running on the standard https port. With httpd server, I can access my webapp using the directory name in the URL. For example, if I have an app called app1, it uses URLs that look like this: http://www.app1.com/app1/index.html https://ssl.example.com/app1/index.html If I have another app, it would use urls like this: http://www.app2.com/app2/index.html https://ssl.example.com/app2/index.html This is because mod_jk will forward anything with the app name as the first part of the URL to Tomcat. From what I am reading in the documentation, Tomcat uses the hostname to determine the webapp to use. That won't work since they need to use the same hostname in ssl mode. Tomcat uses both hostname + path to determine where the request should go: if you have multiple virtual hosts, then /foo might map to two different virtual hosts depending upon the Host header (or URL, which generally agree with each other). The only complication TLS adds is that a certificate often only has one single hostname in it, and the server can only bind to all interfaces on a single port (e.g. 443) a single time. Thus, administrators often have to pick a certificate that will work for everyone. As you have mentioned, SNI offers a way around this: the client can notify the server which host they are attempting to contact and the server can reply with the preferred certificate for that host. I don't believe Tomcat has direct support for SNI, though Java 7+ should be able to handle it if the server software (Tomcat in this case) is capable. I haven't looked into how it can be done, but at this point, Tomcat should probably include this feature, at least for JSSE. There are other ways to get around this, including using wildcard TLS certificates, binding to different network interfaces to get s unique interface/port combination for each certificate, etc. Tomcat /can/ be used, here, but it currently takes some creativity. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJT6t9WAAoJEBzwKT+lPKRY0sUP/iManPcB08Bzpzcp3jHQQfyd iwM9V0jGAxrI5DLV30B+vPdNGut+Rcy8mW3CqEqsFMWC8o4LzJdzEfRGBjzjtvIJ TZxVjQy+Jk/OcyuzAsV92f6U6gVKgcYnyEOkEGFgf/GG06n1RJmmAaG63GZ6qLLv 9OD7eP/wDrpFi1kp+u+RZHez+ZU2XQjsgpH0jOgaMoxqfU0LsxK032chP3vq6aAS VMh2ncTcSN4N5ibs/vIpLliyEV4bop1P5ZLWhid/smaU0OjlMowsYZ8jb6X90lOs SsJnC4hKvWTzuyLRNsZ1xf/vU/nScOUQjrQRivpBxgPK0IOSZE7bzu5nc3kYqXTn xBX/w5Bxb/be2g7hl7jee8Y75flgcfb0tcL6IL50keLV3n95ucqwt3Lb0ZwlCNDT DWNc5LBufR6rQFTtPG0H6zi/5Siw49ZY9KlIyb1bQGPJ+IiCE2fg+GZ2K84y1Ib/ /kC+GtxpMHABVRC6aPFDFaLuG0NAUwWE437ObpWA2r00uUo0eiZhCAyOZePpl8vJ zW/R0Va8XDMZauUbSCSQPlV/OX2uPdlIWygzMfCsRrsjJ6A7LLrlMmVh6075rE8D UQ7oDU7aT/47/DG0yd3OiPYlUx/vq+S5ycYpmstT4s+fPMznO2PHdBDN5GSEkD+6 F945J2LFes2AvdA2m1hE =9sTp -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to access multiple virtual hosts with a single SSL instance?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/12/2014 8:45 PM, Christopher Schultz wrote: Neil, On 8/12/14, 6:01 PM, Neil Aggarwal wrote: Up until now, I have always run Apache in front of Tomcat. I am wondering if I should change to using Tomcat as a standalone server. My concern is how to use multiple virtual hosts with a single SSL instance running on the standard https port. With httpd server, I can access my webapp using the directory name in the URL. For example, if I have an app called app1, it uses URLs that look like this: http://www.app1.com/app1/index.html https://ssl.example.com/app1/index.html If I have another app, it would use urls like this: http://www.app2.com/app2/index.html https://ssl.example.com/app2/index.html This is because mod_jk will forward anything with the app name as the first part of the URL to Tomcat. From what I am reading in the documentation, Tomcat uses the hostname to determine the webapp to use. That won't work since they need to use the same hostname in ssl mode. Tomcat uses both hostname + path to determine where the request should go: if you have multiple virtual hosts, then /foo might map to two different virtual hosts depending upon the Host header (or URL, which generally agree with each other). The only complication TLS adds is that a certificate often only has one single hostname in it, and the server can only bind to all interfaces on a single port (e.g. 443) a single time. Thus, administrators often have to pick a certificate that will work for everyone. As you have mentioned, SNI offers a way around this: the client can notify the server which host they are attempting to contact and the server can reply with the preferred certificate for that host. I don't believe Tomcat has direct support for SNI, though Java 7+ should be able to handle it if the server software (Tomcat in this case) is capable. I haven't looked into how it can be done, but at this point, Tomcat should probably include this feature, at least for JSSE. There are other ways to get around this, including using wildcard TLS certificates, binding to different network interfaces to get s unique interface/port combination for each certificate, etc. Tomcat /can/ be used, here, but it currently takes some creativity. -chris Chris, Does Java 7 have server side support for SNI? I had this discussion on the list a while back, and I think we came to the conclusion that SNI was not supported. I'll have to dig through my archives and the public archives to make sure I'm not mistaken. Ah no - server side SNI is not available until Java 8. I don't know if Tomcat 8 can take advantage of that or not (haven't looked at the code). However Tomcat 7 plus Java 7 equals no server side SNI. You're stuck with fronting Tomcat with something like Apache HTTPD and using a SAN cert. This is what we currently do in production. Later versions of Apache HTTPD support SSL named virtual hosts (with a little care). . . . just my (late night) 2 cents /mde/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.13 (MingW32) iQEbBAEBAgAGBQJT6v05AAoJEEFGbsYNeTwtrrIH+OFbR9JGOvdkVQHQH0/Gqiel OPEk0lQj55FqdBAu68zyP58SeKw0PAI8+C5BX7kLtcFBkgrGGsbuzdIMG4rjNuEY qrFcilq7wLZrelolIv8zaFnEwmcV/C6uNtbq6wN1hlDW/gaiuuqCd266Dh8ClF0i iCGydpFlUO/+J8ytKZY+kj5YPNi1S7RqmC0dpT9nYIDbQbK82DYC56FLmg8Tb8AR TKkJ+ClBLiojHdC9aZaRtZXPPmrOxm9S8pMA9MgNBhQnctv1+TvC0mMsGk3Spy21 clQSckNy+buuRmiJ+VJ1DFlt4Ba1EJgNAbnMe7rivGKq/rg/0rQYbrQvkwb64Q== =B438 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring mod_jk with multiple Apache HTTPD Virtual Hosts
On 04.03.2014 23:09, Doug Strick wrote: The F5 issues were just due to poor environment configuration. Each F5 VIP was sending traffic to the same pool and that pool was only configured for 1 member. That 1 member IP/port was used by several apache virtual hosts. So basically I never knew which virtual host was getting the request which meant some requests were going to listeners not running mod_jk. Always fun joining a new company and having to piece together what someone else has done. Please remember that over 90% of these configs were created by the Adobe CF webserver config utility so I question some of it as well. Here is what's being used in the uriworkermap.properties: /cfformgateway/* = cfusion /CFFormGateway/* = cfusion /flex2gateway/* = cfusion /flex2gateway = cfusion /cffileservlet/* = cfusion /CFFileServlet/* = cfusion /cfform-internal/* = cfusion /flashservices/gateway/* = cfusion /flex-internal/* = cfusion /rest/* = cfusion /*.cfml/* = cfusion /*.mxml = cfusion /*.as = cfusion /*.cfm = cfusion /*.cfm/* = cfusion /*.swc = cfusion /*.cfml = cfusion /*.cfc = cfusion /*.cfc/* = cfusion /*.cfr = cfusion /*.cfswf = cfusion /*.sws = cfusion /*.jsp = cfusion /*.hbmxml = cfusion This is what I'm seeing in the mod_jk log. I've cut out a few sections of the Attempting to map context URI so there's less clutter. [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/' from 24 maps [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] jk_translate::mod_jk.c (3723): no match for / found [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/' from 24 maps [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] jk_map_to_storage::mod_jk.c (3798): no match for / found [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/index.cfm' from 24 maps [ [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] find_match::jk_uri_worker_map.c (958): Found a wildchar match '/*.cfm=cfusion' [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] jk_handler::mod_jk.c (2621): Into handler jakarta-servlet worker=cfusion r-proxyreq=0 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] wc_get_worker_for_name::jk_worker.c (115): found a worker cfusion [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] wc_get_name_for_type::jk_worker.c (292): Found worker type 'ajp13' [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] init_ws_service::mod_jk.c (1097): Service protocol=HTTP/0.9 method=GET ssl=false host=(null) addr=192.168.253.3 name=app1.dev5.abc.com port=80 auth=(null) user=(null) laddr=192.168.253.61 raddr=192.168.253.3 uri=/ [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_get_endpoint::jk_ajp_common.c (3161): acquired connection pool slot=0 after 0 retries [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_marshal_into_msgb::jk_ajp_common.c (626): ajp marshaling done [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_service::jk_ajp_common.c (2450): processing cfusion with 2 retries [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): sending to ajp13 pos=4 len=185 max=8192 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 12 34 00 B5 02 02 00 08 48 54 54 50 2F 30 2E 39 - .4..HTTP/0.9 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 001000 00 01 2F 00 00 0D 31 39 32 2E 31 36 38 2E 32 - .../...192.168.2 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 002035 33 2E 33 00 FF FF 00 22 63 6F 6D 6D 65 72 63 - 53.3app1 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 003065 2E 64 65 76 35 2E 6C 69 66 65 74 65 63 68 6E - dev5.abc [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 00406F 6C 6F 67 69 65 73 2E 63 6F 6D 00 00 50 00 00 - .com..P.. [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 005002 A0 09 00 27 54 4C 54 53 49 44 3D 31 38 36 35 - 'TLTSID=1865 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 006037 36 41 32 41 33 45 35 31 30 41 33 30 30 30 33 - 76A2A3E510A30003 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 007045 43 39 33 42 35 31 31 39 39 42 43 00 A0 08 00 - EC93B51199BC
Re: Configuring mod_jk with multiple Apache HTTPD Virtual Hosts
I went over the documentation multiple times and the light bulb finally went on after everyone's input. Most of the mod_jk configs were built by the Coldfusion web server config tool so that's why it's so cluttered. I made the configuration work by putting the below in httpd.conf: IfModule mod_jk.c JkWorkersFile /apps/httpd/conf.d/modjk/workers.properties JkShmFile /weblogs/mod_jk.jk_shm /IfModule Then I stripped out everything from the virtual host config besides the docroot and log configs like below which managed to start getting me responses. I also found there were major environment issues compounding my experience because the F5 wasn't always sending traffic to this apache host which is why I was banging my head most of the time trying to figure out why I wasn't seeing anything in my logs. Now that my apache config is good I need to figure out why coldfusion is returning a 302 for GET /. IfModule mod_jk.c JkMountFile /apps/httpd/conf.d/modjk/app1.uriworkermap.properties # Where to put jk logs JkLogFile /weblogs/mod_jk.app1.dev5.log # custom environment variables JkEnvVar REDIRECT_URL JkEnvVar REDIRECT_REMOTE_HOST JkEnvVar REDIRECT_PATH JkEnvVar REDIRECT_QUERY_STRING JkEnvVar REDIRECT_HTTP_ACCEPT JkEnvVar REDIRECT_HTTP_USER_AGENT JkEnvVar REDIRECT_REMOTE_ADDR JkEnvVar REDIRECT_SERVER_NAME JkEnvVar REDIRECT_SERVER_PORT JkEnvVar REDIRECT_SERVER_SOFTWARE # Where to put jk shared memory #JkShmFile /weblogs/app1.dev5.jk_shm # Set the jk log level [debug/error/info] JkLogLevel debug # Select the timestamp log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardDirectories AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf DirectoryIndex index.cfm Files ~ .hbmxml$ Order allow,deny Deny from all /Files /IfModule On Mon, Mar 3, 2014 at 1:57 PM, André Warnier a...@ice-sa.com wrote: Doug Strick wrote: Hello, I'm currently working on a project where we're migrating from Adobe Coldfusion 8 to CF 10. Adobe CF10 now uses tomcat as the underlying server and mod_jk is the standard connector used. On our test environment we have a single apache httpd instance serving multiple domains with each going to a different CF instance. We really only want specific workers enabled for specific virtual hosts like below. test1.abc.com -- HTTPD test1 VirtualHost -- CF Test1 test2.abc.com -- HTTPD test2 VirtualHost -- CF Test2 test3.abc.com -- HTTPD test3 VirtualHost -- CF Test3 Each CF instance is on a separate host. A developer has managed to get a config working on their local desktop where CF10 runs under windows and apache runs under a linux VM. The real dev environment is a lot more complicated with multiple virtual hosts. CF is the only one where we're going to use mod_jk (CF 8 used mod_jrun22) so this is the first time using mod_jk in our environment. Using the below config I keep getting JkWorkersFile cannot occur within VirtualHost section. Does anyone have any suggestions as to what I need to do to make this work? See http://tomcat.apache.org/connectors-doc/reference/apache.html quote JkWorkersFile The name of a worker file for the Tomcat servlet containers. This directive is only allowed once. It must be put into the global part of the configuration. [...] unquote And the same for the JkShmFile directive. The global part of the configuration refers to the main (or default) Apache httpd configuration file (apache2.conf or httpd.conf e.g.), *outside* of any VirtualHost section. The JkWorkersFile file defines *all* the workers (in mod_jk parlance, a worker is usually one back-end Tomcat instance). So in your case, you would have 3 workers (Test1, Test2 and Test3). Then inside of each VirtualHost section, you would use JkMount directives, to indicate *for this VirtualHost* which URI's should be proxied to which of the known workers. For example, in VirtualHost #1 JkMount /myapp/ Test1 JkMount /myapp/* Test1 in VirtualHost #2 JkMount /myapp/ Test2 JkMount /myapp/* Test2 in VirtualHost #3 JkMount /myapp/ Test3 JkMount /myapp/* Test3 Also, it does not really make much sense to have both JkMount directives directly in your configuration, *and* a JkMountFile directive. Usually, one uses the one or the other. It is less confusing, because both specify lists of URI's which should be/should not be proxied to Tomcat. Another configuration directive which should only be there once, and in the main httpd configuration section (not in VirtualHost) is LoadModule jk_module /apps/httpd/modules/mod_jk.so It is probably ignored when it occurs in a VirtualHost section. See http://httpd.apache.org/docs/2.2/mod
Re: Configuring mod_jk with multiple Apache HTTPD Virtual Hosts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Doug, On 3/4/14, 11:51 AM, Doug Strick wrote: I went over the documentation multiple times and the light bulb finally went on after everyone's input. Most of the mod_jk configs were built by the Coldfusion web server config tool so that's why it's so cluttered. I made the configuration work by putting the below in httpd.conf: IfModule mod_jk.c JkWorkersFile /apps/httpd/conf.d/modjk/workers.properties JkShmFile /weblogs/mod_jk.jk_shm /IfModule Then I stripped out everything from the virtual host config besides the docroot and log configs like below which managed to start getting me responses. Good. I also found there were major environment issues compounding my experience because the F5 wasn't always sending traffic to this apache host which is why I was banging my head most of the time trying to figure out why I wasn't seeing anything in my logs. Sounds fun. Anything that might be useful to folks searching the list archives for help? Now that my apache config is good I need to figure out why coldfusion is returning a 302 for GET /. GET / probably returns a 302 for /index.cfm, since you set the DirectoryIndex to be index.cfm. What does the whole response look like? IfModule mod_jk.c JkMountFile /apps/httpd/conf.d/modjk/app1.uriworkermap.properties The contents of this file might be useful, too. # Where to put jk logs JkLogFile /weblogs/mod_jk.app1.dev5.log # custom environment variables JkEnvVar REDIRECT_URL JkEnvVar REDIRECT_REMOTE_HOST JkEnvVar REDIRECT_PATH JkEnvVar REDIRECT_QUERY_STRING JkEnvVar REDIRECT_HTTP_ACCEPT JkEnvVar REDIRECT_HTTP_USER_AGENT JkEnvVar REDIRECT_REMOTE_ADDR JkEnvVar REDIRECT_SERVER_NAME JkEnvVar REDIRECT_SERVER_PORT JkEnvVar REDIRECT_SERVER_SOFTWARE I'm not entirely sure you need all these JkEnvVar directives, but I wouldn't remove them unless you are sure they are useless. # Where to put jk shared memory #JkShmFile /weblogs/app1.dev5.jk_shm # Set the jk log level [debug/error/info] JkLogLevel debug # Select the timestamp log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardDirectories Are you sure you want to do that? AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf It's still odd to me that you are using an explicit map but then also doing the AddHandler. DirectoryIndex index.cfm Files ~ .hbmxml$ Order allow,deny Deny from all /Files /IfModule - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFiO2AAoJEBzwKT+lPKRYZ+cP/jQJNPR+fHixhbUy7Ct/2mkf /pnqzOJ/+AUb0mu2N+7+c7sl3+hSd3+p7bi2GIEOMVa3jzXNvWctONPwsn2+A8/d nijlO38E34AOj3RuDcIOYrAdz94TPncFkwQOT2Z4TOR1YRQrZe0rVJwRAD5To/xU M+aYzeXJhTrSXLyZ9vurDkt7JYOO4rEKvQyTN0qbqfbNHuhrpruZDj2WPyuTr4xG 0Y08TmPW+e4Hp/M6zFsgo5LY3PZpNXtkNq6g34OINqGfF64FPO9Y6Ps5IVeozP6G iWmFEtwD5HrZEmgbICZeaOwy+UjhzrpiUF7krSLp2igKlEcGiuMzSJlmY+MEvQ8f JocGehFrY/VYdIYIdQKvkJtervlWUGTjFXZbeQSZgdArhCn7qpFHzI64nzR5y4KC jyjOVCZ36+5LT1+41yNVnq1lTrUUHZ6ODGxJ5+AMaFPXgoOu/H2w1+4hx4f8Q4Bn 1eI8wpJ8IvLYyvaJ+Qmu5Sr+qhgPaFpru+Y38Eu2uH1cgKVz6Cya92sbXRY5yZ3U ChGGhedSFLpt99raUc8Tk9c1+NbNPzTrs9MKn2QBnRkCZTNKaHp71xc9TA1oFvGg YfEgBiazCBMxiEs864V4IcwWeqxqH0rS9vr62E5p6xkt7JSW7KvP55eT3m+bUEHa jOdWslaH0H/syNMdfhsy =mR2i -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring mod_jk with multiple Apache HTTPD Virtual Hosts
The F5 issues were just due to poor environment configuration. Each F5 VIP was sending traffic to the same pool and that pool was only configured for 1 member. That 1 member IP/port was used by several apache virtual hosts. So basically I never knew which virtual host was getting the request which meant some requests were going to listeners not running mod_jk. Always fun joining a new company and having to piece together what someone else has done. Please remember that over 90% of these configs were created by the Adobe CF webserver config utility so I question some of it as well. Here is what's being used in the uriworkermap.properties: /cfformgateway/* = cfusion /CFFormGateway/* = cfusion /flex2gateway/* = cfusion /flex2gateway = cfusion /cffileservlet/* = cfusion /CFFileServlet/* = cfusion /cfform-internal/* = cfusion /flashservices/gateway/* = cfusion /flex-internal/* = cfusion /rest/* = cfusion /*.cfml/* = cfusion /*.mxml = cfusion /*.as = cfusion /*.cfm = cfusion /*.cfm/* = cfusion /*.swc = cfusion /*.cfml = cfusion /*.cfc = cfusion /*.cfc/* = cfusion /*.cfr = cfusion /*.cfswf = cfusion /*.sws = cfusion /*.jsp = cfusion /*.hbmxml = cfusion This is what I'm seeing in the mod_jk log. I've cut out a few sections of the Attempting to map context URI so there's less clutter. [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/' from 24 maps [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] jk_translate::mod_jk.c (3723): no match for / found [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/' from 24 maps [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] jk_map_to_storage::mod_jk.c (3798): no match for / found [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/index.cfm' from 24 maps [ [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] find_match::jk_uri_worker_map.c (958): Found a wildchar match '/*.cfm=cfusion' [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] jk_handler::mod_jk.c (2621): Into handler jakarta-servlet worker=cfusion r-proxyreq=0 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] wc_get_worker_for_name::jk_worker.c (115): found a worker cfusion [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] wc_get_name_for_type::jk_worker.c (292): Found worker type 'ajp13' [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] init_ws_service::mod_jk.c (1097): Service protocol=HTTP/0.9 method=GET ssl=false host=(null) addr=192.168.253.3 name=app1.dev5.abc.com port=80 auth=(null) user=(null) laddr=192.168.253.61 raddr=192.168.253.3 uri=/ [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_get_endpoint::jk_ajp_common.c (3161): acquired connection pool slot=0 after 0 retries [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_marshal_into_msgb::jk_ajp_common.c (626): ajp marshaling done [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_service::jk_ajp_common.c (2450): processing cfusion with 2 retries [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): sending to ajp13 pos=4 len=185 max=8192 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 12 34 00 B5 02 02 00 08 48 54 54 50 2F 30 2E 39 - .4..HTTP/0.9 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 001000 00 01 2F 00 00 0D 31 39 32 2E 31 36 38 2E 32 - .../...192.168.2 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 002035 33 2E 33 00 FF FF 00 22 63 6F 6D 6D 65 72 63 - 53.3app1 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 003065 2E 64 65 76 35 2E 6C 69 66 65 74 65 63 68 6E - dev5.abc [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 00406F 6C 6F 67 69 65 73 2E 63 6F 6D 00 00 50 00 00 - .com..P.. [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 005002 A0 09 00 27 54 4C 54 53 49 44 3D 31 38 36 35 - 'TLTSID=1865 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 006037 36 41 32 41 33 45 35 31 30 41 33 30 30 30 33 - 76A2A3E510A30003 [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 007045 43 39 33 42 35 31 31 39 39 42 43 00 A0 08 00 - EC93B51199BC [Tue Mar 04 16:36:50 2014] [5763:140265396258560] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 008001 30 00 0A 00 0F
Configuring mod_jk with multiple Apache HTTPD Virtual Hosts
Hello, I'm currently working on a project where we're migrating from Adobe Coldfusion 8 to CF 10. Adobe CF10 now uses tomcat as the underlying server and mod_jk is the standard connector used. On our test environment we have a single apache httpd instance serving multiple domains with each going to a different CF instance. We really only want specific workers enabled for specific virtual hosts like below. test1.abc.com -- HTTPD test1 VirtualHost -- CF Test1 test2.abc.com -- HTTPD test2 VirtualHost -- CF Test2 test3.abc.com -- HTTPD test3 VirtualHost -- CF Test3 Each CF instance is on a separate host. A developer has managed to get a config working on their local desktop where CF10 runs under windows and apache runs under a linux VM. The real dev environment is a lot more complicated with multiple virtual hosts. CF is the only one where we're going to use mod_jk (CF 8 used mod_jrun22) so this is the first time using mod_jk in our environment. Using the below config I keep getting JkWorkersFile cannot occur within VirtualHost section. Does anyone have any suggestions as to what I need to do to make this work? This is currently apache 2.2.26 compiled from source and mod_jk 1.2.37 compiled from source as well. VirtualHost Example VirtualHost 192.168.253.61:80 http://192.168.253.61/ DocumentRoot /web/app1.dev5.abc.com/scms ServerName app1.dev5.abc.com ServerAlias origin-app1.dev5.abc.com alias /shared-static /web/app1.dev5.abc.com/shared-static ErrorLog |/apps/httpd/bin/rotatelogs /weblogs/app1.dev5.abc-error.%Y%m%d 86400 -480 CustomLog |/apps/httpd/bin/rotatelogs /weblogs/app1.dev5.abc-access.%Y%m%d 86400 -480 combined env=!keepaliveuri DirectoryIndex index.cfm index.html index.html.var #AddDefaultCharset UTF-8 LoadModule jk_module /apps/httpd/modules/mod_jk.so IfModule mod_jk.c JkMount / cfusion JkMount /* cfusion # Where to find workers.properties JkWorkersFile /apps/httpd/conf.d/modjk/app1.dev5.workers.properties JkMountFile /apps/httpd/conf.d/modjk/app1.dev5.uriworkermap.properties # Where to put jk logs JkLogFile /weblogs/mod_jk.app1.dev5.log # custom environment variables JkEnvVar REDIRECT_URL JkEnvVar REDIRECT_REMOTE_HOST JkEnvVar REDIRECT_PATH JkEnvVar REDIRECT_QUERY_STRING JkEnvVar REDIRECT_HTTP_ACCEPT JkEnvVar REDIRECT_HTTP_USER_AGENT JkEnvVar REDIRECT_REMOTE_ADDR JkEnvVar REDIRECT_SERVER_NAME JkEnvVar REDIRECT_SERVER_PORT JkEnvVar REDIRECT_SERVER_SOFTWARE # Where to put jk shared memory JkShmFile /weblogs/app1.dev5.jk_shm # Set the jk log level [debug/error/info] JkLogLevel info # Select the timestamp log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardDirectories AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf DirectoryIndex index.cfm Files ~ .hbmxml$ Order allow,deny Deny from all /Files /IfModule /VirtualHost
Re: Configuring mod_jk with multiple Apache HTTPD Virtual Hosts
Doug Strick wrote: Hello, I'm currently working on a project where we're migrating from Adobe Coldfusion 8 to CF 10. Adobe CF10 now uses tomcat as the underlying server and mod_jk is the standard connector used. On our test environment we have a single apache httpd instance serving multiple domains with each going to a different CF instance. We really only want specific workers enabled for specific virtual hosts like below. test1.abc.com -- HTTPD test1 VirtualHost -- CF Test1 test2.abc.com -- HTTPD test2 VirtualHost -- CF Test2 test3.abc.com -- HTTPD test3 VirtualHost -- CF Test3 Each CF instance is on a separate host. A developer has managed to get a config working on their local desktop where CF10 runs under windows and apache runs under a linux VM. The real dev environment is a lot more complicated with multiple virtual hosts. CF is the only one where we're going to use mod_jk (CF 8 used mod_jrun22) so this is the first time using mod_jk in our environment. Using the below config I keep getting JkWorkersFile cannot occur within VirtualHost section. Does anyone have any suggestions as to what I need to do to make this work? See http://tomcat.apache.org/connectors-doc/reference/apache.html quote JkWorkersFile The name of a worker file for the Tomcat servlet containers. This directive is only allowed once. It must be put into the global part of the configuration. [...] unquote And the same for the JkShmFile directive. The global part of the configuration refers to the main (or default) Apache httpd configuration file (apache2.conf or httpd.conf e.g.), *outside* of any VirtualHost section. The JkWorkersFile file defines *all* the workers (in mod_jk parlance, a worker is usually one back-end Tomcat instance). So in your case, you would have 3 workers (Test1, Test2 and Test3). Then inside of each VirtualHost section, you would use JkMount directives, to indicate *for this VirtualHost* which URI's should be proxied to which of the known workers. For example, in VirtualHost #1 JkMount /myapp/ Test1 JkMount /myapp/* Test1 in VirtualHost #2 JkMount /myapp/ Test2 JkMount /myapp/* Test2 in VirtualHost #3 JkMount /myapp/ Test3 JkMount /myapp/* Test3 Also, it does not really make much sense to have both JkMount directives directly in your configuration, *and* a JkMountFile directive. Usually, one uses the one or the other. It is less confusing, because both specify lists of URI's which should be/should not be proxied to Tomcat. Another configuration directive which should only be there once, and in the main httpd configuration section (not in VirtualHost) is LoadModule jk_module /apps/httpd/modules/mod_jk.so It is probably ignored when it occurs in a VirtualHost section. See http://httpd.apache.org/docs/2.2/mod/mod_so.html#loadmodule There are some other things which I find a bit strange (or unclear or redundant) in the configuration below, such as the conjunction of : DirectoryIndex index.cfm index.html index.html.var ... JkMount / cfusion JkMount /* cfusion ... AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf DirectoryIndex index.cfm All in all, it looks a bit like an accumulation of miscellaneous overlapping and contradictory instructions, put together by chance more than by a good understanding of what each one really achieves and in what order they are evaluated. For example : JkMount / cfusion JkMount /* cfusion These directives will result in Apache httpd, in effect, proxying *all* requests to the Tomcat worker named cfusion, leaving none to be handled by Apache httpd itself. But then, these directives : DirectoryIndex index.cfm index.html index.html.var AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf DirectoryIndex index.cfm are totaly redundant, even among themselves. This is currently apache 2.2.26 compiled from source and mod_jk 1.2.37 compiled from source as well. VirtualHost Example VirtualHost 192.168.253.61:80 http://192.168.253.61/ DocumentRoot /web/app1.dev5.abc.com/scms ServerName app1.dev5.abc.com ServerAlias origin-app1.dev5.abc.com alias /shared-static /web/app1.dev5.abc.com/shared-static ErrorLog |/apps/httpd/bin/rotatelogs /weblogs/app1.dev5.abc-error.%Y%m%d 86400 -480 CustomLog |/apps/httpd/bin/rotatelogs /weblogs/app1.dev5.abc-access.%Y%m%d 86400 -480 combined env=!keepaliveuri DirectoryIndex index.cfm index.html index.html.var #AddDefaultCharset UTF-8 LoadModule jk_module /apps/httpd/modules/mod_jk.so IfModule mod_jk.c JkMount / cfusion JkMount /* cfusion # Where to find workers.properties JkWorkersFile /apps/httpd/conf.d/modjk/app1.dev5.workers.properties JkMountFile /apps/httpd/conf.d/modjk/app1.dev5.uriworkermap.properties # Where to put jk logs
Re: Configuring mod_jk with multiple Apache HTTPD Virtual Hosts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 3/3/14, 4:57 PM, André Warnier wrote: Doug Strick wrote: Hello, I'm currently working on a project where we're migrating from Adobe Coldfusion 8 to CF 10. Adobe CF10 now uses tomcat as the underlying server and mod_jk is the standard connector used. On our test environment we have a single apache httpd instance serving multiple domains with each going to a different CF instance. We really only want specific workers enabled for specific virtual hosts like below. test1.abc.com -- HTTPD test1 VirtualHost -- CF Test1 test2.abc.com -- HTTPD test2 VirtualHost -- CF Test2 test3.abc.com -- HTTPD test3 VirtualHost -- CF Test3 Each CF instance is on a separate host. A developer has managed to get a config working on their local desktop where CF10 runs under windows and apache runs under a linux VM. The real dev environment is a lot more complicated with multiple virtual hosts. CF is the only one where we're going to use mod_jk (CF 8 used mod_jrun22) so this is the first time using mod_jk in our environment. Using the below config I keep getting JkWorkersFile cannot occur within VirtualHost section. Does anyone have any suggestions as to what I need to do to make this work? See http://tomcat.apache.org/connectors-doc/reference/apache.html quote JkWorkersFile The name of a worker file for the Tomcat servlet containers. This directive is only allowed once. It must be put into the global part of the configuration. [...] unquote And the same for the JkShmFile directive. The global part of the configuration refers to the main (or default) Apache httpd configuration file (apache2.conf or httpd.conf e.g.), *outside* of any VirtualHost section. The JkWorkersFile file defines *all* the workers (in mod_jk parlance, a worker is usually one back-end Tomcat instance). So in your case, you would have 3 workers (Test1, Test2 and Test3). Then inside of each VirtualHost section, you would use JkMount directives, to indicate *for this VirtualHost* which URI's should be proxied to which of the known workers. For example, in VirtualHost #1 JkMount /myapp/ Test1 JkMount /myapp/* Test1 in VirtualHost #2 JkMount /myapp/ Test2 JkMount /myapp/* Test2 in VirtualHost #3 JkMount /myapp/ Test3 JkMount /myapp/* Test3 Also, it does not really make much sense to have both JkMount directives directly in your configuration, *and* a JkMountFile directive. Usually, one uses the one or the other. It is less confusing, because both specify lists of URI's which should be/should not be proxied to Tomcat. +1 It's bad enough that mod_jk has to have a separate configuration file (it's one of the only significant improvements mod_proxy_ajp has over mod_jk), but separating your configuration into 2 different files is going to confuse you in the long run. Along with this, I note that you are mapping / and /* to your mod_jk worker, and then also using AddHandler as well. I suspect you could probably remove all of your JkMount, JkMountFile, and AddHandler directives and replace them all with these: JkMount /*.cfm cfusion JkMount /*.cfml cfusion JkMount /*.cfc cfusion JkMount /*.cfr cfusion JkMount /*.cfswf cfusion This will *only* send requests for the above URL extensions to Tomcat, and everything else (static content, etc.) will be handled by httpd. You should probably set a DocumentRoot for this VirtualHost. I'm not sure if you ever had a problem with the one frontend - one backend configuration because you don't appear to have gotten that far. It's trivial to configure httpd to do that: just use different worker names for each back-end and then in httpd.conf, simply use one of them. If you ever want to load-balance, just create a balancing-worker that balances between the workers you're already defined and then use /that/ in httpd.conf. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJTFQAqAAoJEBzwKT+lPKRY4FMP/Axum0yT0E4g3tTuXkT+saHf jOF6/mwAjC60+WZONTJJRS7B2yli+rr50m1oRKuT0MjrBcnaHLjUH4sX0DhipVis 6G4+cYFNxcxPQR9T/qNXASKXb3g0LP+QzZ2Z6tuI7ouvfgG+2qM2tudLuzF82l3i 4ZrxYsD1wSyfLiz+HHpjiaNxmUuLe7CuDlWR1WBSaSet8Ekm1THaNpV7SulJIlOb 7hezzn9W+4DCmNONlMKkGywVTN3xQ0nr7erbDwoz/Q2MytpozN1duXeGC/CoZrQU 3/2FFtA3GxYzCz953p+7+KVnXYU0yrW7raMC7261x3XuHvn2QTQ1DU3BPqEIQWY3 fYvEXdq2tdu9BCrd0NtEd6pTJC9A4u2QqJUW2wgbdjTs+hlyFFS8kCwyWiwJhpbu xcfPEH91rj8pgq6u2lBM4QRtZWNo7fGYhs+EAMrsVoO0bHY8iXige2f6WlbmDHAC x/EW3O8Cpb3XFPofKG9VgFWtL/m8/OXKX4oy4AEpiyS/Sv0TkTiz6NXuIfYG6C9Q e1w1jMNET/CcJKCMtgL7mmS8skA0NXsXug9mLCu5tp1wK/3son9eJ5Eyc0QaoTTK eLO5MeNX5WZiEXGebTmy/wTsd9RXUJtzpqj1bzaye+1vjjd63f904u2vMDOom5ZR h2/oNGT7l3lph86+3giS =KRdb -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
Can't get name based virtual hosts to work (Windows)
I'm trying to setup name based hosts by editing server.xml. http://masterserver2.raknet.com/ should display a different page than http://lobby3.raknet.com/ http://masterserver2.raknet.com/ The DNS entries are already setup. However, no matter what URL I put, it just goes to the localhost page (error) Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/error unpackWARs=true autoDeploy=true Host name=masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Host name=milestone.masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=milestone.lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/
Re: Can't get name based virtual hosts to work (Windows)
On 3/31/2013 10:50 AM, Kevin Jenkins wrote: I'm trying to setup name based hosts by editing server.xml. http://masterserver2.raknet.com/ should display a different page than http://lobby3.raknet.com/ http://masterserver2.raknet.com/ The DNS entries are already setup. However, no matter what URL I put, it just goes to the localhost page (error) Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/error unpackWARs=true autoDeploy=true Host name=masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Host name=milestone.masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=milestone.lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts Works on Windows, works with Tomcat 6, Tomcat 7. . . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't get name based virtual hosts to work (Windows)
On 31/03/2013 18:50, Kevin Jenkins wrote: I'm trying to setup name based hosts by editing server.xml. http://masterserver2.raknet.com/ should display a different page than http://lobby3.raknet.com/ http://masterserver2.raknet.com/ The DNS entries are already setup. However, no matter what URL I put, it just goes to the localhost page (error) Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/error unpackWARs=true autoDeploy=true Host name=masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ You need to use the full DNS name for the name attribute of the host. I.e.: Host name=masterserver2.raknet.com ... Mark Host name=lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Host name=milestone.masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=milestone.lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't get name based virtual hosts to work (Windows)
Thanks but I had already tried variations on the URL in Host name that before posting. Right now it's going to defaultHost (currently set to masterserver2.raknet.com) even though I enter http://lobby3.raknet.com/ in my webbrowser Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true Host name=masterserver2.raknet.com appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=lobby3.raknet.com appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Host name=milestone.masterserver2.raknet.com appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=milestone.lobby3.raknet.com appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Right now I just have an A record DNS pointing to the server IP address. Do I need to set some other kind of setting than the above change to server.xml? On Sun, Mar 31, 2013 at 11:13 AM, Mark Thomas ma...@apache.org wrote: On 31/03/2013 18:50, Kevin Jenkins wrote: I'm trying to setup name based hosts by editing server.xml. http://masterserver2.raknet.com/ should display a different page than http://lobby3.raknet.com/ http://masterserver2.raknet.com/ The DNS entries are already setup. However, no matter what URL I put, it just goes to the localhost page (error) Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/error unpackWARs=true autoDeploy=true Host name=masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ You need to use the full DNS name for the name attribute of the host. I.e.: Host name=masterserver2.raknet.com ... Mark Host name=lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Host name=milestone.masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=milestone.lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Can't get name based virtual hosts to work (Windows)
From: Kevin Jenkins [mailto:rak...@jenkinssoftware.com] Subject: Re: Can't get name based virtual hosts to work (Windows) Don't top post. It's annoying and confusing. Thanks but I had already tried variations on the URL in Host name that before posting. Right now it's going to defaultHost (currently set to masterserver2.raknet.com) even though I enter http://lobby3.raknet.com/ in my webbrowser Turn on access logging to see exactly what's being sent in for Tomcat to evaluate. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't get name based virtual hosts to work (Windows)
Finally got it working. Thanks to those that helped. Host name=localhost appBase=webapps/error unpackWARs=true autoDeploy=true Host name=www.masterserver2.raknet.com appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true Aliasmasterserver2.raknet.com/Alias Aliasmilestone.masterserver2.raknet.com/Alias Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=masterserver2.raknet.com_access_log. suffix=.txt pattern=%h %l %u %t quot;%rquot; %s %b / /Host Host name=www.lobby3.raknet.com appBase=webapps/lobby3 unpackWARs=true autoDeploy=true Aliaslobby3.raknet.com/Alias Aliasmilestone.lobby3.raknet.com/Alias Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=lobby3.raknet.com_access_log. suffix=.txt pattern=%h %l %u %t quot;%rquot; %s %b / /Host On Sun, Mar 31, 2013 at 1:32 PM, Kevin Jenkins rak...@jenkinssoftware.comwrote: Thanks but I had already tried variations on the URL in Host name that before posting. Right now it's going to defaultHost (currently set to masterserver2.raknet.com) even though I enter http://lobby3.raknet.com/ in my webbrowser Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true Host name=masterserver2.raknet.com appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=lobby3.raknet.com appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Host name=milestone.masterserver2.raknet.com appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=milestone.lobby3.raknet.com appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Right now I just have an A record DNS pointing to the server IP address. Do I need to set some other kind of setting than the above change to server.xml? On Sun, Mar 31, 2013 at 11:13 AM, Mark Thomas ma...@apache.org wrote: On 31/03/2013 18:50, Kevin Jenkins wrote: I'm trying to setup name based hosts by editing server.xml. http://masterserver2.raknet.com/ should display a different page than http://lobby3.raknet.com/ http://masterserver2.raknet.com/ The DNS entries are already setup. However, no matter what URL I put, it just goes to the localhost page (error) Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/error unpackWARs=true autoDeploy=true Host name=masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ You need to use the full DNS name for the name attribute of the host. I.e.: Host name=masterserver2.raknet.com ... Mark Host name=lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Host name=milestone.masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=milestone.lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can't get name based virtual hosts to work (Windows)
On 3/31/2013 1:32 PM, Kevin Jenkins wrote: Thanks but I had already tried variations on the URL in Host name that before posting. Right now it's going to defaultHost (currently set to masterserver2.raknet.com) even though I enter http://lobby3.raknet.com/ in my webbrowser Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true Host name=masterserver2.raknet.com appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=lobby3.raknet.com appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Host name=milestone.masterserver2.raknet.com appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=milestone.lobby3.raknet.com appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Right now I just have an A record DNS pointing to the server IP address. Do I need to set some other kind of setting than the above change to server.xml? On Sun, Mar 31, 2013 at 11:13 AM, Mark Thomas ma...@apache.org wrote: On 31/03/2013 18:50, Kevin Jenkins wrote: I'm trying to setup name based hosts by editing server.xml. http://masterserver2.raknet.com/ should display a different page than http://lobby3.raknet.com/ http://masterserver2.raknet.com/ The DNS entries are already setup. However, no matter what URL I put, it just goes to the localhost page (error) Engine name=Catalina defaultHost=localhost Host name=localhost appBase=webapps/error unpackWARs=true autoDeploy=true Host name=masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ You need to use the full DNS name for the name attribute of the host. I.e.: Host name=masterserver2.raknet.com ... Mark Host name=lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Host name=milestone.masterserver2 appBase=webapps/masterserver2 unpackWARs=true autoDeploy=true/ Host name=milestone.lobby3 appBase=webapps/lobby3 unpackWARs=true autoDeploy=true/ Kevin, You do not want each named virtual host in the same webapps directory. At best, you'll get double deployment. At worst, you won't get what you expect (the behavior you're currently seeing). The Wiki document I referenced explains exactly how to do this. It works fine for Windows (change paths to reflect Windows particulars) and Linux. It works fine in production as well as development. Simply put: 1. Create three directories OUTSIDE of %CATALINA_HOME%\webapps 2. For each named virtual host do the following: Host name=fully-qualified-hostname appBase=absolute-path-to-directory unpackWARs=true autoDeploy=true/ 3. If you want short-named aliases, change the above to: Host name=fully-qualified-hostname appBase=absolute-path-to-directory unpackWARs=true autoDeploy=true Aliasshort-name-one/Alias Aliasshort-name-two/Alias /Host 4. Place a ROOT.war in each of the directories (case is important) 5. If you want a Manager application for each named virtual host: a. By copying 1. Copy manager folder to appBase specified above 2. Copy manager.xml from localhost to %CATALINA_BASE%\conf\fully-qualified-hostname\manager.xml b. By referencing 1. Copy manager.xml from localhost to %CATALINA_BASE%\conf\fully-qualified-hostname\manager.xml 2. Add a docBase attribute to point to the localhost manager application . . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Password protecting directories in virtual hosts
Hello; I've been struggling with this for a couple of weeks now. I've searched web sites, forums and lists, but I can't seem to find the information I want. We have two web sites on a Tomcat 5.5 server (virtual hosts?). I didn't set up the server, but I've been tasked to password protect a directory on one of the sites. I've already successfully password protected a directory one site (site1) using a MemoryRealm, , but would like to protect another site (site2). Here are the working security-constraint , login-config, and security-role sections challange for UN/PW when a user tries to access the directory on site1. It's located in D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\web.xml !-- Begin code modified 20090320 by DJG to password protect Millennium user directory-- security-constraint web-resource-collection web-resource-nameTest Application/web-resource-name url-pattern/site1_staff/*/url-pattern /web-resource-collection auth-constraint role-namesite1staff/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameSite1 Users/realm-name /login-config security-role descriptionThe role that is required to log in to the Manager Application/description role-namesite1staff/role-name /security-role !-- End code modified 20090320 by DJG to password protect Millennium user directory-- I tried to just change the relevant arguments of D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\web.xml so a directory on a site2 was password protected, but changing it (and restarting the tomcat server) did not produce a challenge when going to this directory !-- Begin code modified 20120214 by DJG to password protect AskherePA staff directory-- security-constraint web-resource-collection web-resource-nameTest Application/web-resource-name url-pattern/site2/site2staff/*/url-pattern /web-resource-collection auth-constraint role-namesite2staff/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameSite2 Staff/realm-name /login-config security-role descriptionThe role that is required to log in to the Manager Application/description role-namesite2staff/role-name /security-role !-- End code modified 220120214 by DJG to password protect AskherePA staff directory -- Here's the D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml file ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=site1staff/ role rolename=site2staff/ role rolename=tomcat/ user username=tomcat password=tomcat roles=tomcat/ user username=site1UN password=site1PW roles=site1staff/ user username=site2UN password=site2PW roles=site2staff/ /tomcat-users The two directories appear in D:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\cfusion\site1_staff and D:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\cfusion\site2\site2staff Of course, I would ideally like to password protect both directories on both sites (and other directories on other sites as well), but if I can get this working for now, my boss'll be happy! Thanks! Dennis Gormley - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Password protecting directories in virtual hosts
The easy way is to use a reverse proxy as apache2 in front-side, in another words, use the traditional apache2 with modproxy to display the tomcat6 pages. Its very easy to do it! 2013/2/14 Dennis Gormley gorm...@hslc.org Hello; I've been struggling with this for a couple of weeks now. I've searched web sites, forums and lists, but I can't seem to find the information I want. We have two web sites on a Tomcat 5.5 server (virtual hosts?). I didn't set up the server, but I've been tasked to password protect a directory on one of the sites. I've already successfully password protected a directory one site (site1) using a MemoryRealm, , but would like to protect another site (site2). Here are the working security-constraint , login-config, and security-role sections challange for UN/PW when a user tries to access the directory on site1. It's located in D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\web.xml !-- Begin code modified 20090320 by DJG to password protect Millennium user directory-- security-constraint web-resource-collection web-resource-nameTest Application/web-resource-* *name url-pattern/site1_staff/*/**url-pattern /web-resource-collection auth-constraint role-namesite1staff/role-**name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-**method realm-nameSite1 Users/realm-name /login-config security-role descriptionThe role that is required to log in to the Manager Application/description role-namesite1staff/role-**name /security-role !-- End code modified 20090320 by DJG to password protect Millennium user directory-- I tried to just change the relevant arguments of D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\web.xml so a directory on a site2 was password protected, but changing it (and restarting the tomcat server) did not produce a challenge when going to this directory !-- Begin code modified 20120214 by DJG to password protect AskherePA staff directory-- security-constraint web-resource-collection web-resource-nameTest Application/web-resource- **name url-pattern/site2/**site2staff/*/url-pattern /web-resource-collection auth-constraint role-namesite2staff/role-**name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-**method realm-nameSite2 Staff/realm-name /login-config security-role descriptionThe role that is required to log in to the Manager Application/description role-namesite2staff/role-**name /security-role !-- End code modified 220120214 by DJG to password protect AskherePA staff directory -- Here's the D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml file ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=site1staff/ role rolename=site2staff/ role rolename=tomcat/ user username=tomcat password=tomcat roles=tomcat/ user username=site1UN password=site1PW roles=site1staff/ user username=site2UN password=site2PW roles=site2staff/ /tomcat-users The two directories appear in D:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\cfusion\site1_**staff and D:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\cfusion\site2\** site2staff Of course, I would ideally like to password protect both directories on both sites (and other directories on other sites as well), but if I can get this working for now, my boss'll be happy! Thanks! Dennis Gormley --**--**- To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.orgusers-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Password protecting directories in virtual hosts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Dennis, On 2/14/13 3:22 PM, Dennis Gormley wrote: We have two web sites on a Tomcat 5.5 server (virtual hosts?). You should upgrade as soon as possible: Tomcat 5.5 is not longer supported. You should move to Tomcat 7.0 at your earliest convenience. It might not be important, but you should find out if you are using virtual hosting or not. A typical Tomcat configuration does not use virtual hosting, as the server will respond to any request and route it to the default host. I didn't set up the server, but I've been tasked to password protect a directory on one of the sites. I've already successfully password protected a directory one site (site1) using a MemoryRealm, , but would like to protect another site (site2). Note that MemoryRealm is not very good, unless you just want to use something like a few global admin passwords. You're better off using something backed by a database or LDAP, so you can actually change things without having to restart Tomcat. Here are the working security-constraint , login-config, and security-role sections challange for UN/PW when a user tries to access the directory on site1. It's located in D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\web.xml That is the site-wide web.xml file, and you shouldn't be modifying it. This is likely the problem. Instead, you want to find the web.xml file that is specific for each individual webapp. Those files can be in a number of places, so I'll start with the easiest to find and go toward the trickiest. 1. In \Tomcat 5.5\webapps\[webappname]\WEB-INF\web.xml 2. In \Tomcat 5.5\webapps\[webappname].war (in WEB-INF/web.xml) 3. Look in ...\Tomcat 5.5\conf\[engine]\[host]\[webappname].xml There may be a docBase attribute in the Context element. That will tell you where the webapp is located on the disk. Look under there in WEB-INF/web.xml or, if it's a WAR file, you may have to extract it from the WAR before looking at it. security-constraint web-resource-collection web-resource-nameTest Application/web-resource-name url-pattern/site1_staff/*/url-pattern /web-resource-collection auth-constraint role-namesite1staff/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameSite1 Users/realm-name /login-config That looks like the kind of thing you'd have to do in order to secure a directory. Note that you aren't securing a directory: you are securing a URL pattern. The fact that URL patterns are mapped to a physical place on the disk is a (very convenient) coincidence. I just mention that because there are ways to alias URLs and disk-paths to get around these restrictions. Apache httpd (the web server) can protect physical directories and URL locations separately (where the dir-based protection is slightly more secure for on-disk resources) but Tomcat can only protect URLs. Editing the site-wide configuration is likely to be a problem, because each security-constraint is context-scoped (that is, scoped to the webapp) and so you don't need the leading /webappname. Let's find your individual web.xml files and start there. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlEdVoEACgkQ9CaO5/Lv0PAVtQCdGtyWcg8CMWRwznPPcYZKrS3D pr8AoJpHG66cImxpDC08Y6BRRDruXZOZ =DY4B -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Password protecting directories in virtual hosts
Dennis Gormley wrote: Hello; I've been struggling with this for a couple of weeks now. I've searched web sites, forums and lists, but I can't seem to find the information I want. We have two web sites on a Tomcat 5.5 server (virtual hosts?). I didn't set up the server, but I've been tasked to password protect a directory on one of the sites. I've already successfully password protected a directory one site (site1) using a MemoryRealm, , but would like to protect another site (site2). Here are the working security-constraint , login-config, and security-role sections challange for UN/PW when a user tries to access the directory on site1. It's located in D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\web.xml !-- Begin code modified 20090320 by DJG to password protect Millennium user directory-- security-constraint web-resource-collection web-resource-nameTest Application/web-resource-name url-pattern/site1_staff/*/url-pattern /web-resource-collection auth-constraint role-namesite1staff/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameSite1 Users/realm-name /login-config security-role descriptionThe role that is required to log in to the Manager Application/description role-namesite1staff/role-name /security-role !-- End code modified 20090320 by DJG to password protect Millennium user directory-- I tried to just change the relevant arguments of D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\web.xml so a directory on a site2 was password protected, but changing it (and restarting the tomcat server) did not produce a challenge when going to this directory !-- Begin code modified 20120214 by DJG to password protect AskherePA staff directory-- security-constraint web-resource-collection web-resource-nameTest Application/web-resource-name url-pattern/site2/site2staff/*/url-pattern /web-resource-collection auth-constraint role-namesite2staff/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameSite2 Staff/realm-name /login-config security-role descriptionThe role that is required to log in to the Manager Application/description role-namesite2staff/role-name /security-role !-- End code modified 220120214 by DJG to password protect AskherePA staff directory -- Here's the D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml file ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=site1staff/ role rolename=site2staff/ role rolename=tomcat/ user username=tomcat password=tomcat roles=tomcat/ user username=site1UN password=site1PW roles=site1staff/ user username=site2UN password=site2PW roles=site2staff/ /tomcat-users The two directories appear in D:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\cfusion\site1_staff and D:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\cfusion\site2\site2staff Of course, I would ideally like to password protect both directories on both sites (and other directories on other sites as well), but if I can get this working for now, my boss'll be happy! Hi. You probably should not be touching (have been touching) the file D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\web.xml . Hopefully you kept a backup of the original. Can you paste here the file D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml ? (remove or obscure any confidential information). Someone may be able to give you a better way than fiddling with the default web.xml. This being said, Tomcat 5.5 is very old and either not supported anymore, or about to become unsupported. The current version is Tomcat 7.0.35. See here : http://tomcat.apache.org/whichversion.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0 - JNDI resource caching over virtual hosts
I am using Tomcat 6.0.18 deployed as web service on Windows XP SP3. I created additional Host element in conf/server.xml, so I have two virtual hosts: localhost (default) and janko Host name=jankoappBase=itsapps !-- Access log processes all example. Documentation at: /docs/config/valve.html -- Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=its_access_log. suffix=.txt pattern=common resolveHosts=false/ /Host I deployed the same web applications in both hosts. The first web application is main, the other one is hypersonic database as storage for the web application. The main web application defines access to hypersonic database as resource. Then localhost web application points to hypersonic listening on port 9002 Resource name=jdbc/profile auth=Container uniqueResourceName=jdbc/profile type=com.atomikos.jdbc.nonxa.NonXADataSourceBean factory=org.apache.naming.factory.BeanFactory connectionTimeout=30 poolSize=3 user=sa password= driverClassName=org.hsqldb.jdbcDriver url=jdbc:hsqldb:hsql://localhost:9002 / Then janko web application points to hypersonic listening on port 9003 Resource name=jdbc/profile auth=Container uniqueResourceName=jdbc/profile type=com.atomikos.jdbc.nonxa.NonXADataSourceBean factory=org.apache.naming.factory.BeanFactory connectionTimeout=30 poolSize=3 user=sa password= driverClassName=org.hsqldb.jdbcDriver url=jdbc:hsqldb:hsql://janko:9003 / The deployment descriptors are defined in conf/Catalina/localhost and conf/Catalina/janko folders. docBase points outside of tomcat_home. However when accessing both web applications only one data source is used by both web applications depending which one is used first. It looks to me that JNDI name jdbc/profile is shared across web applications. The application uses log4j for logging. Before both web applications were deployed under the same context name. The side effect was that both applications logged to the same file. When I renamed web application on the janko virtual host, the log4j issue was solved. Looks like the same log4j class instance was used for applications with the same context name. I do not use global resources in server.xml. Resources are defined in application context file only. Based on documentation resource elements defined in context is private to that context only. Thank you in advance for any help, Jan
Re: Tomcat 6.0 - JNDI resource caching over virtual hosts
On 23/10/2012 16:55, Jan Kostelansky wrote: I am using Tomcat 6.0.18 deployed as web service on Windows XP SP3. I created additional Host element in conf/server.xml, so I have two virtual hosts: localhost (default) and janko Host name=jankoappBase=itsapps !-- Access log processes all example. Documentation at: /docs/config/valve.html -- Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=its_access_log. suffix=.txt pattern=common resolveHosts=false/ /Host I deployed the same web applications in both hosts. The first web application is main, the other one is hypersonic database as storage for the web application. The main web application defines access to hypersonic database as resource. Then localhost web application points to hypersonic listening on port 9002 Resource name=jdbc/profile auth=Container uniqueResourceName=jdbc/profile type=com.atomikos.jdbc.nonxa.NonXADataSourceBean factory=org.apache.naming.factory.BeanFactory connectionTimeout=30 poolSize=3 user=sa password= driverClassName=org.hsqldb.jdbcDriver url=jdbc:hsqldb:hsql://localhost:9002 / Then janko web application points to hypersonic listening on port 9003 Resource name=jdbc/profile auth=Container uniqueResourceName=jdbc/profile type=com.atomikos.jdbc.nonxa.NonXADataSourceBean factory=org.apache.naming.factory.BeanFactory connectionTimeout=30 poolSize=3 user=sa password= driverClassName=org.hsqldb.jdbcDriver url=jdbc:hsqldb:hsql://janko:9003 / The deployment descriptors are defined in conf/Catalina/localhost and conf/Catalina/janko folders. docBase points outside of tomcat_home. However when accessing both web applications only one data source is used by both web applications depending which one is used first. It looks to me that JNDI name jdbc/profile is shared across web applications. That's because you can't give the same JNDI name to two different DBs. What about trying to use two different names for the resources? p The application uses log4j for logging. Before both web applications were deployed under the same context name. The side effect was that both applications logged to the same file. When I renamed web application on the janko virtual host, the log4j issue was solved. Looks like the same log4j class instance was used for applications with the same context name. I do not use global resources in server.xml. Resources are defined in application context file only. Based on documentation resource elements defined in context is private to that context only. Thank you in advance for any help, Jan -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Tomcat 6.0 - JNDI resource caching over virtual hosts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan, On 10/23/12 11:55 AM, Jan Kostelansky wrote: I am using Tomcat 6.0.18 deployed as web service on Windows XP SP3. Upgrade: that version of Tomcat is 4 years old and has known security vulnerabilities (http://tomcat.apache.org/security-6.html). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCHAxMACgkQ9CaO5/Lv0PAPqQCfe39/ccffaE2cTy7TAjBr/p+y zr4An25Ns3lzy15KB5+FZ47OXmQKUDB+ =hIXj -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0 - JNDI resource caching over virtual hosts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, On 10/23/12 3:00 PM, Pid wrote: On 23/10/2012 16:55, Jan Kostelansky wrote: I am using Tomcat 6.0.18 deployed as web service on Windows XP SP3. I created additional Host element in conf/server.xml, so I have two virtual hosts: localhost (default) and janko Host name=jankoappBase=itsapps !-- Access log processes all example. Documentation at: /docs/config/valve.html -- Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=its_access_log. suffix=.txt pattern=common resolveHosts=false/ /Host I deployed the same web applications in both hosts. The first web application is main, the other one is hypersonic database as storage for the web application. The main web application defines access to hypersonic database as resource. Then localhost web application points to hypersonic listening on port 9002 Resource name=jdbc/profile auth=Container uniqueResourceName=jdbc/profile type=com.atomikos.jdbc.nonxa.NonXADataSourceBean factory=org.apache.naming.factory.BeanFactory connectionTimeout=30 poolSize=3 user=sa password= driverClassName=org.hsqldb.jdbcDriver url=jdbc:hsqldb:hsql://localhost:9002 / Then janko web application points to hypersonic listening on port 9003 Resource name=jdbc/profile auth=Container uniqueResourceName=jdbc/profile type=com.atomikos.jdbc.nonxa.NonXADataSourceBean factory=org.apache.naming.factory.BeanFactory connectionTimeout=30 poolSize=3 user=sa password= driverClassName=org.hsqldb.jdbcDriver url=jdbc:hsqldb:hsql://janko:9003 / The deployment descriptors are defined in conf/Catalina/localhost and conf/Catalina/janko folders. docBase points outside of tomcat_home. However when accessing both web applications only one data source is used by both web applications depending which one is used first. It looks to me that JNDI name jdbc/profile is shared across web applications. That's because you can't give the same JNDI name to two different DBs. What about trying to use two different names for the resources? I thought locally-defined JNDI resources were essentially private to a particular webapp. Is that not the case? I suppose not, since a JNDI DataSource will outlive the webapp that caused it to be created, and a newly-deployed webapp can inherit the old one, so... I guess I shouldn't have been surprised. Jan, you ought to be able to change the name of the JNDI name and then use resource-link to map it over to what your webapp expects. I noticed that you are using the uniqueResourceName attribute in Resource... what is that? Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCHA+kACgkQ9CaO5/Lv0PApBQCZAZGGXnn27u1pDT7eAOJBmEt8 SKIAoL+qFmZVzZ8T7450CLbVkcLs/d0r =1cJK -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0 - JNDI resource caching over virtual hosts
On 23/10/2012 21:54, Christopher Schultz wrote: Pid, On 10/23/12 3:00 PM, Pid wrote: On 23/10/2012 16:55, Jan Kostelansky wrote: I am using Tomcat 6.0.18 deployed as web service on Windows XP SP3. I created additional Host element in conf/server.xml, so I have two virtual hosts: localhost (default) and janko Host name=jankoappBase=itsapps !-- Access log processes all example. Documentation at: /docs/config/valve.html -- Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=its_access_log. suffix=.txt pattern=common resolveHosts=false/ /Host I deployed the same web applications in both hosts. The first web application is main, the other one is hypersonic database as storage for the web application. The main web application defines access to hypersonic database as resource. Then localhost web application points to hypersonic listening on port 9002 Resource name=jdbc/profile auth=Container uniqueResourceName=jdbc/profile type=com.atomikos.jdbc.nonxa.NonXADataSourceBean factory=org.apache.naming.factory.BeanFactory connectionTimeout=30 poolSize=3 user=sa password= driverClassName=org.hsqldb.jdbcDriver url=jdbc:hsqldb:hsql://localhost:9002 / Then janko web application points to hypersonic listening on port 9003 Resource name=jdbc/profile auth=Container uniqueResourceName=jdbc/profile type=com.atomikos.jdbc.nonxa.NonXADataSourceBean factory=org.apache.naming.factory.BeanFactory connectionTimeout=30 poolSize=3 user=sa password= driverClassName=org.hsqldb.jdbcDriver url=jdbc:hsqldb:hsql://janko:9003 / The deployment descriptors are defined in conf/Catalina/localhost and conf/Catalina/janko folders. docBase points outside of tomcat_home. However when accessing both web applications only one data source is used by both web applications depending which one is used first. It looks to me that JNDI name jdbc/profile is shared across web applications. That's because you can't give the same JNDI name to two different DBs. What about trying to use two different names for the resources? I thought locally-defined JNDI resources were essentially private to a particular webapp. Is that not the case? I suppose not, since a JNDI DataSource will outlive the webapp that caused it to be created, and a newly-deployed webapp can inherit the old one, so... I guess I shouldn't have been surprised. I can't find docs to support my position, but I'm (was?) sure it's the case. Obscure bug, deliberate design or one of us has the wrong end of (possibly the wrong) stick? Interesting. Might put that on the backlog to have a sniff around the code. p Jan, you ought to be able to change the name of the JNDI name and then use resource-link to map it over to what your webapp expects. I noticed that you are using the uniqueResourceName attribute in Resource... what is that? Thanks, -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- [key:62590808] signature.asc Description: OpenPGP digital signature
Virtual Hosts, SSL, Tomcat
I potentially have the need to support multiple virtual hosts with SSL on a single IP address / port combination. This is called named virtual hosts on Apache HTTPD, and virtual hosts with a single connector on Tomcat. With a late version of Apache HTTPD / OpenSSL / mod_ssl, I can accomplish this using SNI ( server name indication - RFC 4366). IE (7 and 8) will fail on Windows/XP, but all other reasonable browser / OS combinations are reported to work. I can then tie these named virtual hosts to the appropriate Tomcat virtual hosts via mod_jk. I'm also trying to do this natively on Tomcat (either 6.0.33 or 7.0.22). Unfortunately this doesn't look to be easily possible. Based on the brief discussions on the mailing list and some other reading, I've come up with the following possible solutions. 1. Use the APR connector for SSL This will get me the OpenSSL support for SNI. Unfortunately there doesn't seem to be a way to enter more than one certificate file. 2. Use Java 7 Java 7 has support for SNI. I think I would have to do the following in order to be successful. Please correct me if I'm wrong. a. Build the appropriate Tomcat using Java 7 JDK b. Replace Eclipse JDT with Java 7 JDK c. Build web applications with Java 7 JDK d. Run Tomcat under Java 7 JRE e. Ensure that JSSE is being used f. Add multiple certificates to the keystore 3. Use wildcard certificates If I restrict the virtual hosts on a physical host to a single domain or subdomain, I should be able to use *.some.domain.com as a way of providing a certificate. The easiest (and most generally usable) mechanisms still seem to be the standard unique address/port combination or a wildcard certificate. Have I missed (or misunderstood) the current state of SSL affairs? Are there other practical solutions for running Tomcat virtual hosts with SSL? Thanks in advance. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual Hosts, SSL, Tomcat
On 15/10/2011 21:26, Mark Eggers wrote: I potentially have the need to support multiple virtual hosts with SSL on a single IP address / port combination. This is called named virtual hosts on Apache HTTPD, and virtual hosts with a single connector on Tomcat. With a late version of Apache HTTPD / OpenSSL / mod_ssl, I can accomplish this using SNI ( server name indication - RFC 4366). IE (7 and 8) will fail on Windows/XP, but all other reasonable browser / OS combinations are reported to work. I can then tie these named virtual hosts to the appropriate Tomcat virtual hosts via mod_jk. That is the way I would recommend right now. I'm also trying to do this natively on Tomcat (either 6.0.33 or 7.0.22). Unfortunately this doesn't look to be easily possible. Based on the brief discussions on the mailing list and some other reading, I've come up with the following possible solutions. 1. Use the APR connector for SSL This will get me the OpenSSL support for SNI. Unfortunately there doesn't seem to be a way to enter more than one certificate file. Correct. There is no code in the APR/native connector to handle this. It should be possible to implement but it isn't there yet. 2. Use Java 7 Java 7 has support for SNI. Only on the client side, not the server side so this is not an option. 3. Use wildcard certificates If I restrict the virtual hosts on a physical host to a single domain or subdomain, I should be able to use *.some.domain.com as a way of providing a certificate. Yep, that should work. The easiest (and most generally usable) mechanisms still seem to be the standard unique address/port combination or a wildcard certificate. Have I missed (or misunderstood) the current state of SSL affairs? They are a little worse than you thought. Are there other practical solutions for running Tomcat virtual hosts with SSL? Not that I can think of. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual Hosts, SSL, Tomcat
Mark, Thanks for the weekend reply. Too bad SNI in Java 7 is only client side for the time being. So it looks like: 1. Wildcard certs and restrict server architecture 2. Apache mod_ssl SNI / mod_jk and restrict clients (may not be possible) 3. Traditional one cert per IP-based virtual host on Apache HTTPD and chew up IP address space. . . . . just my two cents. /mde/ ( a new record in short messages from me ;-) ) - Original Message - From: Mark Thomas ma...@apache.org To: Tomcat Users List users@tomcat.apache.org Cc: Sent: Saturday, October 15, 2011 1:32 PM Subject: Re: Virtual Hosts, SSL, Tomcat On 15/10/2011 21:26, Mark Eggers wrote: I potentially have the need to support multiple virtual hosts with SSL on a single IP address / port combination. This is called named virtual hosts on Apache HTTPD, and virtual hosts with a single connector on Tomcat. With a late version of Apache HTTPD / OpenSSL / mod_ssl, I can accomplish this using SNI ( server name indication - RFC 4366). IE (7 and 8) will fail on Windows/XP, but all other reasonable browser / OS combinations are reported to work. I can then tie these named virtual hosts to the appropriate Tomcat virtual hosts via mod_jk. That is the way I would recommend right now. I'm also trying to do this natively on Tomcat (either 6.0.33 or 7.0.22). Unfortunately this doesn't look to be easily possible. Based on the brief discussions on the mailing list and some other reading, I've come up with the following possible solutions. 1. Use the APR connector for SSL This will get me the OpenSSL support for SNI. Unfortunately there doesn't seem to be a way to enter more than one certificate file. Correct. There is no code in the APR/native connector to handle this. It should be possible to implement but it isn't there yet. 2. Use Java 7 Java 7 has support for SNI. Only on the client side, not the server side so this is not an option. 3. Use wildcard certificates If I restrict the virtual hosts on a physical host to a single domain or subdomain, I should be able to use *.some.domain.com as a way of providing a certificate. Yep, that should work. The easiest (and most generally usable) mechanisms still seem to be the standard unique address/port combination or a wildcard certificate. Have I missed (or misunderstood) the current state of SSL affairs? They are a little worse than you thought. Are there other practical solutions for running Tomcat virtual hosts with SSL? Not that I can think of. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Virtual hosts on Tomcat 7 for 3 webapps
Hi there I have a server that runs 3 different web apps on the same ip but each on its own port. eg ip:8080, ip:8081 and ip:8082. All apps should run simultaneously and have their own folders. Can a single Tomcat support the 3 of them and can i use virtual hosts on Tomcat alone ? Thanks Sent from my iPhone - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual hosts on Tomcat 7 for 3 webapps
why you don't use virtualhost over apache ? it's easier do it with it. Un saludo 2011/9/3 Ioannis Parapontis parapont...@gmail.com Hi there I have a server that runs 3 different web apps on the same ip but each on its own port. eg ip:8080, ip:8081 and ip:8082. All apps should run simultaneously and have their own folders. Can a single Tomcat support the 3 of them and can i use virtual hosts on Tomcat alone ? Thanks Sent from my iPhone - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual hosts on Tomcat 7 for 3 webapps
On Sat, Sep 3, 2011 at 2:51 PM, Ioannis Parapontis parapont...@gmail.com wrote: I have a server that runs 3 different web apps on the same ip but each on its own port. eg ip:8080, ip:8081 and ip:8082. All apps should run simultaneously and have their own folders. Can a single Tomcat support the 3 of them and can i use virtual hosts on Tomcat alone ? Yes. You don't need Apache httpd in front of Tomcat, and you don't even need to run on separate ports if you use named virtual servers. -- Hassan Schroeder hassan.schroe...@gmail.com http://about.me/hassanschroeder twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual hosts on Tomcat 7 for 3 webapps
Thanks for the responses. The reason i do not use apache is that the server that runs my 3 apps works better with Tomcat. So it would be useful if some guidelines are provided on how i should do this. Sent from my iPhone On 4 Σεπ 2011, at 1:01, Manuel Fernández Panzuelamanuelfernandezpanzu...@gmail.com wrote: why you don't use virtualhost over apache ? it's easier do it with it. Un saludo 2011/9/3 Ioannis Parapontis parapont...@gmail.com Hi there I have a server that runs 3 different web apps on the same ip but each on its own port. eg ip:8080, ip:8081 and ip:8082. All apps should run simultaneously and have their own folders. Can a single Tomcat support the 3 of them and can i use virtual hosts on Tomcat alone ? Thanks Sent from my iPhone - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual hosts on Tomcat 7 for 3 webapps
On Sat, Sep 3, 2011 at 3:25 PM, Ioannis Parapontis parapont...@gmail.com wrote: So it would be useful if some guidelines are provided on how i should do this. They are; see the documentation's virtual hosting how-to :-) -- Hassan Schroeder hassan.schroe...@gmail.com http://about.me/hassanschroeder twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual hosts on Tomcat 7 for 3 webapps
- Original Message - From: Ioannis Parapontis parapont...@gmail.com To: Tomcat Users List users@tomcat.apache.org Cc: Sent: Saturday, September 3, 2011 3:25 PM Subject: Re: Virtual hosts on Tomcat 7 for 3 webapps T hanks for the responses. The reason i do not use apache is that the server that runs my 3 apps works better with Tomcat. So it would be useful if some guidelines are provided on how i should do this. Sent from my iPhone See the following Wiki entry for setting up virtual hosts. While it's geared towards a development environment, if you add the hosts to DNS it should work find in a production environment. http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts . . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6.0.29, Manager App, multiple virtual hosts
Hi, I'm using Tomcat 6.0.29 with JVM 1.6.x with multiple virtual hosts. If the Tomcat manager app is only in a single vhost can the manager app be configured to control all applications in Tomcat, regardless of vhost? Or is it specific to the vhost its in? Reading the docs says its vhost specific but I thought I'd get confirmation. Thanks, -- Best Regards, Brett Delle Grazie __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.29, Manager App, multiple virtual hosts
On 07/10/2010 16:26, Brett Delle Grazie wrote: Hi, I'm using Tomcat 6.0.29 with JVM 1.6.x with multiple virtual hosts. If the Tomcat manager app is only in a single vhost can the manager app be configured to control all applications in Tomcat, regardless of vhost? Or is it specific to the vhost its in? Reading the docs says its vhost specific but I thought I'd get confirmation. vhost only. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk and tomcat virtual hosts not connecting
Hi Moritz, Try adding: Aliasjira.example.com/Alias Aliaswww.jira.example.com/Alias To the server.xml inside the Host name=jirapp Best Regards, Brett -Original Message- From: Moritz Winter [mailto:moritz.a.win...@googlemail.com] Sent: Tuesday, July 27, 2010 7:11 PM To: users@tomcat.apache.org Subject: mod_jk and tomcat virtual hosts not connecting Hi, First of all I would like to mention that this is my first post on this list, I hope that this question is sent in the right place. I have tried finding a solution for my problem, but it either doesn't exist, or my limited brain can't manage to figure out how to do it (I strongly hope it is the latter). My issue is with the mod_jk plugin. I want to redirect my subdomain requests jira.example.com to a tomcat 6 virtual host called jiraapp. If I call the subdomain jira.example.com Im always getting the default tomcat 6 host called localhost. I tested every part: 1.) mod_jk: if i change the workers name in either workers.properties or und er my enabled-site VirtualHost or if i change the mapping to my virtual host (/etc/hosts: 127.0.0.1 localhost jiraapp) apache doesnt start. So I think this should work and is configured right. 2.) if I do a lynx jiraapp:8080 on the machine it works and shows the right webapp. But if I access jira.example.com I always getting the default root-webapp of tomcat 6. So theres no difference in calling jira.example.com or example.com:8080. In general my setup looks like this: 1.) browse to jira.example.com 2.) apache VirtualHost hands over to mod_jk 3.) mod_jk redirects to worker.jiraworker.host:worker.jiraworker.port (jiraa pp:8009) via ajp 4.) jiraapp resolves to 127.0.0.1 trough /etc/hosts 5.) tomcat relays to the jiraapp name based virtual host Do I miss something here? My guess would be that iam doing something wrong in step 4 because i can call lynx jiraapp on the local bash (5) and i can access the default virtual host from remote (1-3). Help would be appreciated. Versions: Apache Tomcat/6.0.29 Sun-Java 1.6.0_20-b02 Apache/2.2.9 (Debian) mod_jk/1.2.26 proxy_html/3.0.0 Server libapache2-mod-jk 1:1.2.26-2+lenny1 == jk.load == LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info # JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories -ForwardLocalAddress JkRequestLogFormat %w %V %T == workers.properties == workers.tomcat_home=/opt/tomcat workers.java_home=/usr/lib/jvm/java-6-sun worker.list=jiraworker worker.jiraworker.port=8009 worker.jiraworker.host=jiraapp worker.jiraworker.type=ajp13 == /etc/hosts == ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 127.0.0.1 localhost.localdomain localhost jiraapp == server.xml === Engine name=Catalina defaultHost=localhost [...] Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false [...] /Host Host name=jiraapp appBase=jiraapp docBase=/opt/tomcat/jiraapp unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false == apache example.com virtual hosts configuration file == VirtualHost *:80 ServerName www.jira.example.com ServerAlias jira.example.com JkMount /* jiraworker /VirtualHost -- Best Regards, Brett Delle Grazie __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
mod_jk and tomcat virtual hosts not connecting
Hi, First of all I would like to mention that this is my first post on this list, I hope that this question is sent in the right place. I have tried finding a solution for my problem, but it either doesn't exist, or my limited brain can't manage to figure out how to do it (I strongly hope it is the latter). My issue is with the mod_jk plugin. I want to redirect my subdomain requests jira.example.com to a tomcat 6 virtual host called jiraapp. If I call the subdomain jira.example.com Im always getting the default tomcat 6 host called localhost. I tested every part: 1.) mod_jk: if i change the workers name in either workers.properties or und er my enabled-site VirtualHost or if i change the mapping to my virtual host (/etc/hosts: 127.0.0.1 localhost jiraapp) apache doesnt start. So I think this should work and is configured right. 2.) if I do a lynx jiraapp:8080 on the machine it works and shows the right webapp. But if I access jira.example.com I always getting the default root-webapp of tomcat 6. So theres no difference in calling jira.example.com or example.com:8080. In general my setup looks like this: 1.) browse to jira.example.com 2.) apache VirtualHost hands over to mod_jk 3.) mod_jk redirects to worker.jiraworker.host:worker.jiraworker.port (jiraa pp:8009) via ajp 4.) jiraapp resolves to 127.0.0.1 trough /etc/hosts 5.) tomcat relays to the jiraapp name based virtual host Do I miss something here? My guess would be that iam doing something wrong in step 4 because i can call lynx jiraapp on the local bash (5) and i can access the default virtual host from remote (1-3). Help would be appreciated. Versions: Apache Tomcat/6.0.29 Sun-Java 1.6.0_20-b02 Apache/2.2.9 (Debian) mod_jk/1.2.26 proxy_html/3.0.0 Server libapache2-mod-jk 1:1.2.26-2+lenny1 == jk.load == LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info # JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories -ForwardLocalAddress JkRequestLogFormat %w %V %T == workers.properties == workers.tomcat_home=/opt/tomcat workers.java_home=/usr/lib/jvm/java-6-sun worker.list=jiraworker worker.jiraworker.port=8009 worker.jiraworker.host=jiraapp worker.jiraworker.type=ajp13 == /etc/hosts == ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 127.0.0.1 localhost.localdomain localhost jiraapp == server.xml === Engine name=Catalina defaultHost=localhost [...] Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false [...] /Host Host name=jiraapp appBase=jiraapp docBase=/opt/tomcat/jiraapp unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false == apache example.com virtual hosts configuration file == VirtualHost *:80 ServerName www.jira.example.com ServerAlias jira.example.com JkMount /* jiraworker /VirtualHost - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk and tomcat virtual hosts not connecting
Hi Moritz, Am Dienstag, den 27.07.2010, 15:40 +0200 schrieb Moritz Winter: My issue is with the mod_jk plugin. I want to redirect my subdomain requests jira.example.com to a tomcat 6 virtual host called jiraapp. If I call the subdomain jira.example.com Im always getting the default tomcat 6 host called localhost. I think your problem is, that mod_jk doesn't change the hostname of the original request. So name your virtual host in tomcat jira.example.com instead of jiraapp. I tested every part: 1.) mod_jk: if i change the workers name in either workers.properties or und er my enabled-site VirtualHost or if i change the mapping to my virtual host (/etc/hosts: 127.0.0.1 localhost jiraapp) apache doesnt start. So I think this should work and is configured right. 2.) if I do a lynx jiraapp:8080 on the machine it works and shows the right webapp. But if I access jira.example.com I always getting the default root-webapp of tomcat 6. So theres no difference in calling jira.example.com or example.com:8080. In general my setup looks like this: 1.) browse to jira.example.com 2.) apache VirtualHost hands over to mod_jk 3.) mod_jk redirects to worker.jiraworker.host:worker.jiraworker.port (jiraa pp:8009) via ajp 4.) jiraapp resolves to 127.0.0.1 trough /etc/hosts 5.) tomcat relays to the jiraapp name based virtual host Do I miss something here? My guess would be that iam doing something wrong in step 4 because i can call lynx jiraapp on the local bash (5) and i can access the default virtual host from remote (1-3). Help would be appreciated. Versions: Apache Tomcat/6.0.29 Sun-Java 1.6.0_20-b02 Apache/2.2.9 (Debian) mod_jk/1.2.26 proxy_html/3.0.0 Server libapache2-mod-jk 1:1.2.26-2+lenny1 == jk.load == LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info # JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories -ForwardLocalAddress JkRequestLogFormat %w %V %T == workers.properties == workers.tomcat_home=/opt/tomcat workers.java_home=/usr/lib/jvm/java-6-sun I don't think that you need tomcat_home or java_home in your setup. worker.list=jiraworker worker.jiraworker.port=8009 worker.jiraworker.host=jiraapp worker.jiraworker.type=ajp13 == /etc/hosts == ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 127.0.0.1 localhost.localdomain localhost jiraapp == server.xml === Engine name=Catalina defaultHost=localhost [...] Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false [...] /Host Host name=jiraapp appBase=jiraapp docBase=/opt/tomcat/jiraapp unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false == apache example.com virtual hosts configuration file == VirtualHost *:80 ServerName www.jira.example.com ServerAlias jira.example.com I don't know what happens if you access your server through www.jira.example.com. I think you will find, that your default tomcat virtual host will be called instead of jira.example.com. You will probably want to redirect users to jira.example.com in that case. Bye Felix JkMount /* jiraworker /VirtualHost - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk and tomcat virtual hosts not connecting
Hi Felix, youre absolutely right and it works like a charm, thank you so much!! Vielen Dank ;-) Btw. the www prefix is just working fine if I add the alias to the tomcat server.xml! Greetings! Am 27.07.2010 17:55, schrieb Felix Schumacher: Hi Moritz, Am Dienstag, den 27.07.2010, 15:40 +0200 schrieb Moritz Winter: My issue is with the mod_jk plugin. I want to redirect my subdomain requests jira.example.com to a tomcat 6 virtual host called jiraapp. If I call the subdomain jira.example.com Im always getting the default tomcat 6 host called localhost. I think your problem is, that mod_jk doesn't change the hostname of the original request. So name your virtual host in tomcat jira.example.com instead of jiraapp. I tested every part: 1.) mod_jk: if i change the workers name in either workers.properties or und er my enabled-siteVirtualHost or if i change the mapping to my virtual host (/etc/hosts: 127.0.0.1 localhost jiraapp) apache doesnt start. So I think this should work and is configured right. 2.) if I do a lynx jiraapp:8080 on the machine it works and shows the right webapp. But if I access jira.example.com I always getting the default root-webapp of tomcat 6. So theres no difference in calling jira.example.com or example.com:8080. In general my setup looks like this: 1.) browse to jira.example.com 2.) apacheVirtualHost hands over to mod_jk 3.) mod_jk redirects to worker.jiraworker.host:worker.jiraworker.port (jiraa pp:8009) via ajp 4.) jiraapp resolves to 127.0.0.1 trough /etc/hosts 5.) tomcat relays to the jiraapp name based virtual host Do I miss something here? My guess would be that iam doing something wrong in step 4 because i can call lynx jiraapp on the local bash (5) and i can access the default virtual host from remote (1-3). Help would be appreciated. Versions: Apache Tomcat/6.0.29 Sun-Java 1.6.0_20-b02 Apache/2.2.9 (Debian) mod_jk/1.2.26 proxy_html/3.0.0 Server libapache2-mod-jk 1:1.2.26-2+lenny1 == jk.load == LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info # JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories -ForwardLocalAddress JkRequestLogFormat %w %V %T == workers.properties == workers.tomcat_home=/opt/tomcat workers.java_home=/usr/lib/jvm/java-6-sun I don't think that you need tomcat_home or java_home in your setup. worker.list=jiraworker worker.jiraworker.port=8009 worker.jiraworker.host=jiraapp worker.jiraworker.type=ajp13 == /etc/hosts == ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 127.0.0.1 localhost.localdomain localhost jiraapp == server.xml === Engine name=Catalina defaultHost=localhost [...] Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false [...] /Host Host name=jiraapp appBase=jiraapp docBase=/opt/tomcat/jiraapp unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false == apache example.com virtual hosts configuration file == VirtualHost *:80 ServerName www.jira.example.com ServerAlias jira.example.com I don't know what happens if you access your server through www.jira.example.com. I think you will find, that your default tomcat virtual host will be called instead of jira.example.com. You will probably want to redirect users to jira.example.com in that case. Bye Felix JkMount /* jiraworker /VirtualHost - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: mod_jk and tomcat virtual hosts not connecting
Try this pdf , it might help. IT seems to be you are trying complex configuration, the simple configuration would be example.com/jira If you want simple configuration follow the attachment. -Original Message- From: Moritz Winter [mailto:moritz.a.win...@googlemail.com] Sent: Tuesday, July 27, 2010 7:11 PM To: users@tomcat.apache.org Subject: mod_jk and tomcat virtual hosts not connecting Hi, First of all I would like to mention that this is my first post on this list, I hope that this question is sent in the right place. I have tried finding a solution for my problem, but it either doesn't exist, or my limited brain can't manage to figure out how to do it (I strongly hope it is the latter). My issue is with the mod_jk plugin. I want to redirect my subdomain requests jira.example.com to a tomcat 6 virtual host called jiraapp. If I call the subdomain jira.example.com Im always getting the default tomcat 6 host called localhost. I tested every part: 1.) mod_jk: if i change the workers name in either workers.properties or und er my enabled-site VirtualHost or if i change the mapping to my virtual host (/etc/hosts: 127.0.0.1 localhost jiraapp) apache doesnt start. So I think this should work and is configured right. 2.) if I do a lynx jiraapp:8080 on the machine it works and shows the right webapp. But if I access jira.example.com I always getting the default root-webapp of tomcat 6. So theres no difference in calling jira.example.com or example.com:8080. In general my setup looks like this: 1.) browse to jira.example.com 2.) apache VirtualHost hands over to mod_jk 3.) mod_jk redirects to worker.jiraworker.host:worker.jiraworker.port (jiraa pp:8009) via ajp 4.) jiraapp resolves to 127.0.0.1 trough /etc/hosts 5.) tomcat relays to the jiraapp name based virtual host Do I miss something here? My guess would be that iam doing something wrong in step 4 because i can call lynx jiraapp on the local bash (5) and i can access the default virtual host from remote (1-3). Help would be appreciated. Versions: Apache Tomcat/6.0.29 Sun-Java 1.6.0_20-b02 Apache/2.2.9 (Debian) mod_jk/1.2.26 proxy_html/3.0.0 Server libapache2-mod-jk 1:1.2.26-2+lenny1 == jk.load == LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/apache2/workers.properties JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info # JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories -ForwardLocalAddress JkRequestLogFormat %w %V %T == workers.properties == workers.tomcat_home=/opt/tomcat workers.java_home=/usr/lib/jvm/java-6-sun worker.list=jiraworker worker.jiraworker.port=8009 worker.jiraworker.host=jiraapp worker.jiraworker.type=ajp13 == /etc/hosts == ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts 127.0.0.1 localhost.localdomain localhost jiraapp == server.xml === Engine name=Catalina defaultHost=localhost [...] Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false [...] /Host Host name=jiraapp appBase=jiraapp docBase=/opt/tomcat/jiraapp unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false == apache example.com virtual hosts configuration file == VirtualHost *:80 ServerName www.jira.example.com ServerAlias jira.example.com JkMount /* jiraworker /VirtualHost - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
APR usage question regarding multi-core and mutliple virtual hosts...
Hi All, I noticed using Firefox with a plugin yslow that it recommends using only 4 virtual hosts instead of the 16 I have for serving images. I am using a 6 core system and want to make sure I take advantage of it using Apache APR so I setup more than 4 virtual hosts. I am using multiple virtual hosts for serving images since I heard that can improve user response time where they have browsers with 4 or more concurrent connections supported. I have a screenshots page where I have 24 thumbnails being loaded into the browser and I am trying to tune APR for the best user response time. So any best practice for this you all would recommend? Thanks, -Tony - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: APR usage question regarding multi-core and mutliple virtual hosts...
On 28/06/2010 18:58, Tony Anecito wrote: Hi All, I noticed using Firefox with a plugin yslow that it recommends using only 4 virtual hosts instead of the 16 I have for serving images. Does it give an explanation for why 4 is better than 16? I am using a 6 core system and want to make sure I take advantage of it using Apache APR so I setup more than 4 virtual hosts. You are serving static files? I am using multiple virtual hosts for serving images since I heard that can improve user response time where they have browsers with 4 or more concurrent connections supported. I have a screenshots page where I have 24 thumbnails being loaded into the browser and I am trying to tune APR for the best user response time. The multiple sub-domain/hosts trick is to get a browser to open multiple connections to the target site - but it only works if the IP addresses are different AFAIK. (One should be able to determine that for certain with a little monitoring.) I'm not sure that multiple hosts will improve the performance of the server itself it's designed to be multi-threaded. So any best practice for this you all would recommend? CDN's are pretty cheap these days. ;) p Thanks, -Tony - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
Re: basic 2 virtual hosts configuration
MB, You can follow the instructions given for Tomcat 6 on this wiki page: http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts The only difference is that the Manager application for Tomcat 5.5.29 is contained in the ROOT application. This means that you will skip the following step. 3. Copy the manager application from $CATALINA_HOME/webapps to each of the virtual host webapp directories 1. For virtual host foo, this means copying manager to hosts/foo-host/webapps (full path depends on actual location to match the server.xml entry) 2. For virtual host bar, this means copying manager to hosts/bar-host/webapps (full path depends on actual location to match the server.xml entry) I just tested this on my 5.5.29 installation on Fedora 13 (Java 6.0.20). Works as advertised. just my two cents . . . /mde/ --- On Tue, 6/15/10, MB digital.disc...@gmail.com wrote: From: MB digital.disc...@gmail.com Subject: Re: basic 2 virtual hosts configuration To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, June 15, 2010, 10:21 PM Caldarale, Charles R said: Nothing, but you must do it correctly. Yes, I figured that much. :) You don't set the path attribute - in almost all cases it is illegal (and / is never correct, under any circumstances - read the doc). Interesting. Time for a reread. Engine name=Catalina defaultHost=kron Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / Host name=medpsy appBase=/home/webbplatser/medpsy.no / Host name=kron appBase=/home/webbplatser/kron.no / /Engine The above looks ok. Thanks Fragment context settings in /Catalina/kron/ROOT.xml (similar for the other site: docBase=/home/webbplatser/kron.no/ROOT path=/ Take out the docBase and path attributes; they're not allowed here. The path is derived from the name of the .xml file, and the webapp is located in the Host appBase, so docBase must not be used. This seems to be vital info I'll try and incorporate. Time for testing! Why have you declared the above? Where in the doc does it say you should do that? Actually Tomcat did that. Thanks for your response, Charles. Very helpful. Hassan Schroeder said In the documentation? http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html Thanks for your response, Hassan. Perhaps I should have been more clear what I had done already. I've read that page, took my time, cleaned out my old install, reinstalled 5.5.28, updated and installed 5.5.29. I also have 3 books about Tomcat with similar instructions. Information about Tomcat often seem to me to be incomplete, not entirely relevant to what I want to set up - multiple hosts, standalone and so on - or is often way too detailed or just not based around real world examples, which makes it difficult to extract info. I have succeeded many times before setting up server with Tomcat 4. In contrast configuring Apache2 - with vhosts anyway - is a piece of cake to setup. Not the same cup of tea, but nevertheless. I really want to understand Tomcat in this regard as it's very difficult to run a java-based server unless you have a virtual server and this means - for me anyway - I have to set it up and administrate it as there's no budget and no people I know that I can ask as of now. In return for any help I receive, I'll write a guide for mere mortals, put it on the web and make it known here, so no pesky newbies have to ask about this more than necessarily. This setup is so basic it should just work. Folding up my sleeves. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: basic 2 virtual hosts configuration
On 16/06/2010 08:12, Mark Eggers wrote: MB, You can follow the instructions given for Tomcat 6 on this wiki page: http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts The only difference is that the Manager application for Tomcat 5.5.29 is contained in the ROOT application. Eh? I'm not sure you meant what that actually says. p This means that you will skip the following step. 3. Copy the manager application from $CATALINA_HOME/webapps to each of the virtual host webapp directories 1. For virtual host foo, this means copying manager to hosts/foo-host/webapps (full path depends on actual location to match the server.xml entry) 2. For virtual host bar, this means copying manager to hosts/bar-host/webapps (full path depends on actual location to match the server.xml entry) I just tested this on my 5.5.29 installation on Fedora 13 (Java 6.0.20). Works as advertised. just my two cents . . . /mde/ --- On Tue, 6/15/10, MB digital.disc...@gmail.com wrote: From: MB digital.disc...@gmail.com Subject: Re: basic 2 virtual hosts configuration To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, June 15, 2010, 10:21 PM Caldarale, Charles R said: Nothing, but you must do it correctly. Yes, I figured that much. :) You don't set the path attribute - in almost all cases it is illegal (and / is never correct, under any circumstances - read the doc). Interesting. Time for a reread. Engine name=Catalina defaultHost=kron Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / Host name=medpsy appBase=/home/webbplatser/medpsy.no / Host name=kron appBase=/home/webbplatser/kron.no / /Engine The above looks ok. Thanks Fragment context settings in /Catalina/kron/ROOT.xml (similar for the other site: docBase=/home/webbplatser/kron.no/ROOT path=/ Take out the docBase and path attributes; they're not allowed here. The path is derived from the name of the .xml file, and the webapp is located in the Host appBase, so docBase must not be used. This seems to be vital info I'll try and incorporate. Time for testing! Why have you declared the above? Where in the doc does it say you should do that? Actually Tomcat did that. Thanks for your response, Charles. Very helpful. Hassan Schroeder said In the documentation? http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html Thanks for your response, Hassan. Perhaps I should have been more clear what I had done already. I've read that page, took my time, cleaned out my old install, reinstalled 5.5.28, updated and installed 5.5.29. I also have 3 books about Tomcat with similar instructions. Information about Tomcat often seem to me to be incomplete, not entirely relevant to what I want to set up - multiple hosts, standalone and so on - or is often way too detailed or just not based around real world examples, which makes it difficult to extract info. I have succeeded many times before setting up server with Tomcat 4. In contrast configuring Apache2 - with vhosts anyway - is a piece of cake to setup. Not the same cup of tea, but nevertheless. I really want to understand Tomcat in this regard as it's very difficult to run a java-based server unless you have a virtual server and this means - for me anyway - I have to set it up and administrate it as there's no budget and no people I know that I can ask as of now. In return for any help I receive, I'll write a guide for mere mortals, put it on the web and make it known here, so no pesky newbies have to ask about this more than necessarily. This setup is so basic it should just work. Folding up my sleeves. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
Re: basic 2 virtual hosts configuration
You're right of course. I meant you don't copy over the manager web application separately from the ROOT. It's in $CATALINA_HOME/server/webapps/manager and the manager.xml file in $CATALINA_HOME/conf/Catalina/host has a docBase attribute. /mde/ --- On Wed, 6/16/10, Pid p...@pidster.com wrote: From: Pid p...@pidster.com Subject: Re: basic 2 virtual hosts configuration To: Tomcat Users List users@tomcat.apache.org Date: Wednesday, June 16, 2010, 2:58 AM On 16/06/2010 08:12, Mark Eggers wrote: MB, You can follow the instructions given for Tomcat 6 on this wiki page: http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts The only difference is that the Manager application for Tomcat 5.5.29 is contained in the ROOT application. Eh? I'm not sure you meant what that actually says. p This means that you will skip the following step. 3. Copy the manager application from $CATALINA_HOME/webapps to each of the virtual host webapp directories 1. For virtual host foo, this means copying manager to hosts/foo-host/webapps (full path depends on actual location to match the server.xml entry) 2. For virtual host bar, this means copying manager to hosts/bar-host/webapps (full path depends on actual location to match the server.xml entry) I just tested this on my 5.5.29 installation on Fedora 13 (Java 6.0.20). Works as advertised. just my two cents . . . /mde/ --- On Tue, 6/15/10, MB digital.disc...@gmail.com wrote: From: MB digital.disc...@gmail.com Subject: Re: basic 2 virtual hosts configuration To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, June 15, 2010, 10:21 PM Caldarale, Charles R said: Nothing, but you must do it correctly. Yes, I figured that much. :) You don't set the path attribute - in almost all cases it is illegal (and / is never correct, under any circumstances - read the doc). Interesting. Time for a reread. Engine name=Catalina defaultHost=kron Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / Host name=medpsy appBase=/home/webbplatser/medpsy.no / Host name=kron appBase=/home/webbplatser/kron.no / /Engine The above looks ok. Thanks Fragment context settings in /Catalina/kron/ROOT.xml (similar for the other site: docBase=/home/webbplatser/kron.no/ROOT path=/ Take out the docBase and path attributes; they're not allowed here. The path is derived from the name of the .xml file, and the webapp is located in the Host appBase, so docBase must not be used. This seems to be vital info I'll try and incorporate. Time for testing! Why have you declared the above? Where in the doc does it say you should do that? Actually Tomcat did that. Thanks for your response, Charles. Very helpful. Hassan Schroeder said In the documentation? http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html Thanks for your response, Hassan. Perhaps I should have been more clear what I had done already. I've read that page, took my time, cleaned out my old install, reinstalled 5.5.28, updated and installed 5.5.29. I also have 3 books about Tomcat with similar instructions. Information about Tomcat often seem to me to be incomplete, not entirely relevant to what I want to set up - multiple hosts, standalone and so on - or is often way too detailed or just not based around real world examples, which makes it difficult to extract info. I have succeeded many times before setting up server with Tomcat 4. In contrast configuring Apache2 - with vhosts anyway - is a piece of cake to setup. Not the same cup of tea, but nevertheless. I really want to understand Tomcat in this regard as it's very difficult to run a java-based server unless you have a virtual server and this means - for me anyway - I have to set it up and administrate it as there's no budget and no people I know that I can ask as of now. In return for any help I receive, I'll write a guide for mere mortals, put it on the web and make it known here, so no pesky newbies have to ask about this more than necessarily. This setup is so basic it should just work. Folding up my sleeves. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail
Re: basic 2 virtual hosts configuration
On Tue, Jun 15, 2010 at 10:21 PM, MB digital.disc...@gmail.com wrote: http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html Thanks for your response, Hassan. Perhaps I should have been more clear what I had done already. I've read that page, took my time, cleaned out my old install, reinstalled 5.5.28, updated and installed 5.5.29. In return for any help I receive, I'll write a guide for mere mortals, That's what that virtual hosting how-to is *intended* to provide -- what exactly about it did you find difficult or confusing to follow? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: basic 2 virtual hosts configuration
Hassan Schroeder said: That's what that virtual hosting how-to is *intended* to provide And? The how-to not very real world for people in my situation and doesn't contain all the relevant info in one page. That's what I intend to write when I get my head around it all. Unless I find a link to an existing article. The Wiki link from Mark Eggers was nice and very useful, except I'd like to see a production server article instead. That and O'reilly's Tomcat, The definitive guide (of 2008) have gotten me closer to a real solution. At least my hosts work now. Now, if I only could make Netbeans 6.8 (PPC OS X 10.5) to run my local 5.5.29 as nice as the built-in 6. It keeps complaining about stuff even as I have chmod'ed it correctly. -- what exactly about it did you find difficult or confusing to follow? Too little real world, simple examples are only so good. There seem to be only one good way to use the fragment Context file, so why waste time on the others first? They could be listed further down. Real world examples for development and production server setting would be way better. Unless I find something I will write it later. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: basic 2 virtual hosts configuration
On Wed, Jun 16, 2010 at 11:29 AM, MB digital.disc...@gmail.com wrote: And? The how-to not very real world for people in my situation Too little real world You keep saying that, without detail. What is not real world about the content of the how-to? It is, after all, intended to be a minimalist description, and it certainly works if followed. What additional *specific* real world information would you include? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: basic 2 virtual hosts configuration
Hassan Schroeder said: On Wed, Jun 16, 2010 at 11:29 AM, MB digital.disc...@gmail.com wrote: And? The how-to not very real world for people in my situation Too little real world You keep saying that, without detail. What is not real world about the content of the how-to? It is, after all, intended to be a minimalist description, and it certainly works if followed. I'm sorry Hassan, but I don't have time with a meta-debate right now. That the how-to didn't work out for me is proof enough a more useful one can be written. Maybe not a perfect one, but a more useful one for people in my situation. What additional *specific* real world information would you include? Eh, stuff that doesn't have to be extracted in order to be useful. Generalization is useful, but a minimal ampount of specifics are more useful. I have to get back to you on the specifics. I have work to do right now. I'm thankful for the help received so far here, so I'll try and give back when I have the opportunity. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: basic 2 virtual hosts configuration
On Wed, Jun 16, 2010 at 12:13 PM, MB digital.disc...@gmail.com wrote: I'm sorry Hassan, but I don't have time with a meta-debate right now. I'm not trying to debate anything, I'm trying to understand what *exactly* you found lacking so it can be improved. That the how-to didn't work out for me is proof enough a more useful one can be written. Maybe not a perfect one, but a more useful one for people in my situation. which is different how from that of the target audience? What additional *specific* real world information would you include? Eh, stuff that doesn't have to be extracted in order to be useful. Generalization is useful, but a minimal ampount of specifics are more useful. I have to get back to you on the specifics. Lord, I give up. I'm thankful for the help received so far here, so I'll try and give back when I have the opportunity. That's how open source works... -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: basic 2 virtual hosts configuration
From: MB [mailto:digital.disc...@gmail.com] Subject: Re: basic 2 virtual hosts configuration Listener className=org.apache.catalina.startup.TldConfig/ Why have you declared the above? Where in the doc does it say you should do that? Actually Tomcat did that. Tomcat did what? Inserted a Listener element inside one of your Contexts? Please describe precisely how Tomcat did that. Note that the TldConfig class doesn't implement the necessary interfaces so it can never be a valid subject of a Listener element. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
basic 2 virtual hosts configuration
to deploy 2 virtual hosts in Tomcat 5.5.29 (no Apache) what more than the server.xml file below and a context.xml per each host in Catalina do you need to set up? Where do I set path, like for /? Alright in the context file (see below)? server.xml: ?xml version=1.0 encoding=UTF-8? Server port=8005 shutdown=SHUTDOWN GlobalNamingResources !-- Used by Manager webapp -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=80 / Engine name=Catalina defaultHost=kron Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / Host name=medpsy appBase=/home/webbplatser/medpsy.no / Host name=kron appBase=/home/webbplatser/kron.no / /Engine /Service /Server Fragment context settings in /Catalina/kron/ROOT.xml (similar for the other site: ?xml version=1.0 encoding=UTF-8? Context docBase=/home/webbplatser/kron.no/ROOT path=/ reloadable=true workDir=work/Catalina/kron/_ Listener className=org.apache.catalina.startup.TldConfig/ /Context: This set up doesn't serve a pages physically put in any of the ROOT folders of the sites. I get blank pages. GUIDES? Anyone that can point to a guide that focuses only on the steps necessary to configure Tomcat 5.5.x for 2 or more virtual hosts? Preferably without involvement with Apache. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: basic 2 virtual hosts configuration
On Tue, Jun 15, 2010 at 4:23 PM, MB digital.disc...@gmail.com wrote: GUIDES? Anyone that can point to a guide that focuses only on the steps necessary to configure Tomcat 5.5.x for 2 or more virtual hosts? In the documentation? http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: basic 2 virtual hosts configuration
From: MB [mailto:digital.disc...@gmail.com] Subject: basic 2 virtual hosts configuration to deploy 2 virtual hosts in Tomcat 5.5.29 (no Apache) what more than the server.xml file below and a context.xml per each host in Catalina do you need to set up? Nothing, but you must do it correctly. Where do I set path, like for /? You don't set the path attribute - in almost all cases it is illegal (and / is never correct, under any circumstances - read the doc). Engine name=Catalina defaultHost=kron Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / Host name=medpsy appBase=/home/webbplatser/medpsy.no / Host name=kron appBase=/home/webbplatser/kron.no / /Engine The above looks ok. Fragment context settings in /Catalina/kron/ROOT.xml (similar for the other site: docBase=/home/webbplatser/kron.no/ROOT path=/ Take out the docBase and path attributes; they're not allowed here. The path is derived from the name of the .xml file, and the webapp is located in the Host appBase, so docBase must not be used. workDir=work/Catalina/kron/_ Remove the workDir attribute, since you've done nothing but specify the default. Listener className=org.apache.catalina.startup.TldConfig/ Why have you declared the above? Where in the doc does it say you should do that? GUIDES? It's all in the docs: http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Don't forget to look in the Tomcat logs for deployment problems. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: basic 2 virtual hosts configuration
Caldarale, Charles R said: Nothing, but you must do it correctly. Yes, I figured that much. :) You don't set the path attribute - in almost all cases it is illegal (and / is never correct, under any circumstances - read the doc). Interesting. Time for a reread. Engine name=Catalina defaultHost=kron Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / Host name=medpsy appBase=/home/webbplatser/medpsy.no / Host name=kron appBase=/home/webbplatser/kron.no / /Engine The above looks ok. Thanks Fragment context settings in /Catalina/kron/ROOT.xml (similar for the other site: docBase=/home/webbplatser/kron.no/ROOT path=/ Take out the docBase and path attributes; they're not allowed here. The path is derived from the name of the .xml file, and the webapp is located in the Host appBase, so docBase must not be used. This seems to be vital info I'll try and incorporate. Time for testing! Why have you declared the above? Where in the doc does it say you should do that? Actually Tomcat did that. Thanks for your response, Charles. Very helpful. Hassan Schroeder said In the documentation? http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html Thanks for your response, Hassan. Perhaps I should have been more clear what I had done already. I've read that page, took my time, cleaned out my old install, reinstalled 5.5.28, updated and installed 5.5.29. I also have 3 books about Tomcat with similar instructions. Information about Tomcat often seem to me to be incomplete, not entirely relevant to what I want to set up - multiple hosts, standalone and so on - or is often way too detailed or just not based around real world examples, which makes it difficult to extract info. I have succeeded many times before setting up server with Tomcat 4. In contrast configuring Apache2 - with vhosts anyway - is a piece of cake to setup. Not the same cup of tea, but nevertheless. I really want to understand Tomcat in this regard as it's very difficult to run a java-based server unless you have a virtual server and this means - for me anyway - I have to set it up and administrate it as there's no budget and no people I know that I can ask as of now. In return for any help I receive, I'll write a guide for mere mortals, put it on the web and make it known here, so no pesky newbies have to ask about this more than necessarily. This setup is so basic it should just work. Folding up my sleeves. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: how to add subdomains dynamically, virtual hosts config
From: Logan Scott [mailto:lo...@sqlist.com] Subject: how to add subdomains dynamically, virtual hosts config tomcat 6.0 Tomcat 6.0.? apache 2.0.55 That's getting a bit long in the tooth... jk connector Version? Now I would like to add the ability to issue subdomains in large numbers, for any of the domains on my server. Can't answer it for httpd, but for Tomcat, use the host-manager webapp included in the Tomcat distribution (not the manager webapp). This will let you create and remove virtual hosts on the fly; look at the servlet-mapping in its WEB-INF/web.xml for usage. Note that this does not persist the changes, so you'll have to take care of that by some other means. You will, of course, also need to create DNS entries as needed (not a Tomcat issue). - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat+apache on name_based virtual hosts
On 04/03/2010 04:01, chenll wrote: Note: both a.university.com and b.university.com are built on Apache instead of Tomcat, so they are not in the directory of webapps. just a.university.com/webap is pointed to the web application which is built on Tomcat. Please start a new thread. p From: chuck.caldar...@unisys.com To: users@tomcat.apache.org Date: Wed, 3 Mar 2010 12:17:47 -0600 Subject: RE: Tomcat+apache on name_based virtual hosts From: Jordan Michaels [mailto:jor...@viviotech.net] Subject: Re: Tomcat+apache on name_based virtual hosts You can do this by creating newHost andContext entries in the server.xml file for each site. Please don't suggest puttingContext elements in server.xml; that's ancient, dismal practice. Place theContext elements in conf/Catalina/[host]/ROOT.xml, with a docBase attribute pointing to the location of the .war file or directory. Host name=a.university.com appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=[PATH TO WEBAPP] / /Host Host name=b.university.com appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=[PATH TO WEBAPP] / /Host Having the same appBase for multipleHost elements is asking for trouble, since the two hosts will scribble on top of each other. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ MSN十年回馈,每位用户可免费获得价值25元的卡巴斯基反病毒软件2010激活码,快来领取! http://kaba.msn.com.cn/?k=1 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat+apache on name_based virtual hosts
Hi, I have a server which has only one IP and runs on Windows XP. And I have two domain names: a.university.com and b.university.com. I have built two websites for both of them on the Apache 2. Now I installed another web application which runs on Tomcat 6, and want to load the web application when I enter http://b.university.com/webap in IE. What should I do? Thank you in advanced! _ 想知道明天天气如何?必应告诉你! http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5form=MICHJ2
Re: Tomcat+apache on name_based virtual hosts
You can do this by creating new Host and Context entries in the server.xml file for each site. For example: Host name=a.university.com appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=[PATH TO WEBAPP] / /Host and Host name=b.university.com appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=[PATH TO WEBAPP] / /Host Hope this helps! Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Railo Community Distributions chenll wrote: Hi, I have a server which has only one IP and runs on Windows XP. And I have two domain names: a.university.com and b.university.com. I have built two websites for both of them on the Apache 2. Now I installed another web application which runs on Tomcat 6, and want to load the web application when I enter http://b.university.com/webap in IE. What should I do? Thank you in advanced! _ 想知道明天天气如何?必应告诉你! http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5form=MICHJ2 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat+apache on name_based virtual hosts
On 03/03/2010 17:01, chenll wrote: Hi, I have a server which has only one IP and runs on Windows XP. And I have two domain names: a.university.com and b.university.com. I have built two websites for both of them on the Apache 2. Now I installed another web application which runs on Tomcat 6, and want to load the web application when I enter http://b.university.com/webap in IE. What should I do? Thank you in advanced! _ 想知道明天天气如何?必应告诉你! http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5form=MICHJ2 Please don't hijack an existing thread. Start a new message, this means a completely new message addressed to the list, simply editing the subject line body leaves headers in place that put your message in the middle of another (in this case, long) thread. p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat+apache on name_based virtual hosts
From: Jordan Michaels [mailto:jor...@viviotech.net] Subject: Re: Tomcat+apache on name_based virtual hosts You can do this by creating new Host and Context entries in the server.xml file for each site. Please don't suggest putting Context elements in server.xml; that's ancient, dismal practice. Place the Context elements in conf/Catalina/[host]/ROOT.xml, with a docBase attribute pointing to the location of the .war file or directory. Host name=a.university.com appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=[PATH TO WEBAPP] / /Host Host name=b.university.com appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=[PATH TO WEBAPP] / /Host Having the same appBase for multiple Host elements is asking for trouble, since the two hosts will scribble on top of each other. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat+apache on name_based virtual hosts
Note: both a.university.com and b.university.com are built on Apache instead of Tomcat, so they are not in the directory of webapps. just a.university.com/webap is pointed to the web application which is built on Tomcat. From: chuck.caldar...@unisys.com To: users@tomcat.apache.org Date: Wed, 3 Mar 2010 12:17:47 -0600 Subject: RE: Tomcat+apache on name_based virtual hosts From: Jordan Michaels [mailto:jor...@viviotech.net] Subject: Re: Tomcat+apache on name_based virtual hosts You can do this by creating new Host and Context entries in the server.xml file for each site. Please don't suggest putting Context elements in server.xml; that's ancient, dismal practice. Place the Context elements in conf/Catalina/[host]/ROOT.xml, with a docBase attribute pointing to the location of the .war file or directory. Host name=a.university.com appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=[PATH TO WEBAPP] / /Host Host name=b.university.com appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=[PATH TO WEBAPP] / /Host Having the same appBase for multiple Host elements is asking for trouble, since the two hosts will scribble on top of each other. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ MSN十年回馈,每位用户可免费获得价值25元的卡巴斯基反病毒软件2010激活码,快来领取! http://kaba.msn.com.cn/?k=1
Re: Tomcat 6 and Apache 2 - using Tomcat 6 with virtual hosts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 2/6/2010 7:35 PM, Caldarale, Charles R wrote: From: Sam Anderson [mailto:sam...@gmail.com] Subject: Tomcat 6 and Apache 2 - using Tomcat 6 with virtual hosts Tomcat needs a hard restart in order for it to work. Nope. You can add and remove virtual hosts on the fly with the host-manager app that comes with Tomcat. Unfortunately, there's very little documentation for it, so look at the web.xml file for and experiment a bit. Note that the changes are not persisted, so you'll need to update server.xml separately, or reapply the host-manager commands on each Tomcat restart. One of the members of the list recently indicated that they might be motivated to either augment the manager app or write a specialized add-on that could persist such changes. I think this was a couple of weeks ago, but I haven't heard anything recently. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktwTtEACgkQ9CaO5/Lv0PBkiQCghElqzh0mFTvVmlZmzqgFstih jwAAnA5GHBOzleMcnXNPy3Wihs1WpctW =V0vI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6 and Apache 2 - using Tomcat 6 with virtual hosts
Hi there everyone. Firstly, i hope this is the correct list to post to. I have been using Tomcat 6 with Apache2 on Debian Lenny for the purposes of hosting multiple Railo websites on the same server. My question is related to virtual hosting and Tomcat 6. I need to be able to create new virtualhosts, and for them to use Tomcat, however from my recent searches Tomcat needs a hard restart in order for it to work. This would impact on all other websites on the same server. So, I would prefer to reload rather than restart. Can anyone know if this is do-able/possible, and if so, could you please suggest the correct way to set this up, or recommend modules that can be implimented or configs that do this. Many thanks in advance Sam - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6 and Apache 2 - using Tomcat 6 with virtual hosts
From: Sam Anderson [mailto:sam...@gmail.com] Subject: Tomcat 6 and Apache 2 - using Tomcat 6 with virtual hosts Tomcat needs a hard restart in order for it to work. Nope. You can add and remove virtual hosts on the fly with the host-manager app that comes with Tomcat. Unfortunately, there's very little documentation for it, so look at the web.xml file for and experiment a bit. Note that the changes are not persisted, so you'll need to update server.xml separately, or reapply the host-manager commands on each Tomcat restart. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Virtual hosts on tomcat 5.5.15
Hi everybody, currently I am running a few virtual domains on a root server with tomcat 5.5.15 installed. So far everything works fine. Now I just wanted to upgrade to the latest 5.5.x series in fact migrate to version 5.5.28. For example a virtual host on tomcat 5.5.15 has been configured as follows: Host name=www.blah.de debug=0 unpackWARs=true appBase=/home/blah Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=virtual_log. suffix=.txt timestamp=true/ Context path= docBase= debug=0 reloadable=true/ Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=virtual_log. suffix=.txt pattern=common resolveHosts=false/ /Host Works fine without any problems. If I switch now to Tomcat 5.5.28 the context is beeing deployed and the JSP pages are accessible, but the whole WEB-INF folder including web.xml and taglibs cannot be found. I've noticed this behaviour with all tomcat versions later than 5.5.15. Does anybody know if some configuration ore something else has changed? Unfortunately I could not find any changelog or any other information about this issue. Does anybody have an idea, what's going wrong? Any suggestions are really appreciated. Cheers Matthias - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual hosts on tomcat 5.5.15
On 18/11/2009 08:09, Matthias Pueski wrote: Hi everybody, currently I am running a few virtual domains on a root server with tomcat 5.5.15 installed. So far everything works fine. Now I just wanted to upgrade to the latest 5.5.x series in fact migrate to version 5.5.28. For example a virtual host on tomcat 5.5.15 has been configured as follows: Host name=www.blah.de debug=0 unpackWARs=true appBase=/home/blah Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=virtual_log. suffix=.txt timestamp=true/ Context path= docBase= debug=0 reloadable=true/ That'll cause you some problems. Do you have a META-INF/context.xml defined in your web app? Have a read of the docs about how to properly define a Context and give us a shout if you can't fix it. N.B. You'll probably have to rename the app ROOT.war or the exploded app dir ROOT. http://tomcat.apache.org/tomcat-5.5-doc/config/context.html p Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=virtual_log. suffix=.txt pattern=common resolveHosts=false/ /Host Works fine without any problems. If I switch now to Tomcat 5.5.28 the context is beeing deployed and the JSP pages are accessible, but the whole WEB-INF folder including web.xml and taglibs cannot be found. I've noticed this behaviour with all tomcat versions later than 5.5.15. Does anybody know if some configuration ore something else has changed? Unfortunately I could not find any changelog or any other information about this issue. Does anybody have an idea, what's going wrong? Any suggestions are really appreciated. Cheers Matthias - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Virtual hosts on tomcat 5.5.15
From: Matthias Pueski [mailto:matth...@pueski.de] Subject: Virtual hosts on tomcat 5.5.15 Host name=www.blah.de debug=0 unpackWARs=true appBase=/home/blah Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=virtual_log. suffix=.txt timestamp=true/ There is no Logger element allowed in 5.5. Context path= docBase= debug=0 reloadable=true/ As Pid noted, an empty docBase is illegal. Also, you should not be placing Context elements in server.xml. If you want to define the default webapp for a Host, name the .war file or directory ROOT (case sensitive), located immediately under the Host appBase directory. The Context element belongs in the webapp's META-INF/context.xml file, or in conf/Catalina/[host]/[appName].xml. The fact that anything worked under 5.5.15 is purely accidental, since your config is seriously broken. It appears to have been copied verbatim from a much older version of Tomcat (or perhaps derived from the tons of misinformation about Tomcat out on the Internet), which is always bad practice. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Virtual hosts on tomcat 5.5.15
Thank you both very much! I did the following: 1.) Removed the context element from the server.xml 2.) added META-INF/context.xml to the web application and removed the docBase attribute 3.) Removed the logger element 4.) moved the Web Application to a folder named ROOT, directly under the appBase Now everything works fine. Am Mittwoch, den 18.11.2009, 08:18 -0600 schrieb Caldarale, Charles R: From: Matthias Pueski [mailto:matth...@pueski.de] Subject: Virtual hosts on tomcat 5.5.15 Host name=www.blah.de debug=0 unpackWARs=true appBase=/home/blah Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=virtual_log. suffix=.txt timestamp=true/ There is no Logger element allowed in 5.5. Context path= docBase= debug=0 reloadable=true/ As Pid noted, an empty docBase is illegal. Also, you should not be placing Context elements in server.xml. If you want to define the default webapp for a Host, name the .war file or directory ROOT (case sensitive), located immediately under the Host appBase directory. The Context element belongs in the webapp's META-INF/context.xml file, or in conf/Catalina/[host]/[appName].xml. The fact that anything worked under 5.5.15 is purely accidental, since your config is seriously broken. It appears to have been copied verbatim from a much older version of Tomcat (or perhaps derived from the tons of misinformation about Tomcat out on the Internet), which is always bad practice. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Testing Tomcat with Virtual Hosts
'm trying to test Tomcat virtual hosts on my dev machine (windows 7/Tomcat 6). I'd like to have requests for localhost, test1.localhost and test2.localhost all route through to the same tomcat instance. I've edited my hosts file to look as follows: 127.0.0.1 localhost ::1 localhost 127.0.0.1 test1.localhost localhost test2.localhost And added modified the Engine in server.xml as follows: Engine defaultHost=localhost name=Catalina Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase / Host appBase=webapps autoDeploy=true name=localhost unpackWARs=true xmlNamespaceAware=false xmlValidation=false Aliastest1.localhost/Alias Aliastest2.localhost/Alias /Host /Engine However, I'm getting a 404 when hitting test1.localhost:8080/myWebApp, although localhost:8080/myWebApp works fine. I can ping test1.localhost fine. What have I missed? -- View this message in context: http://old.nabble.com/Testing-Tomcat-with-Virtual-Hosts-tp26387899p26387899.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Testing Tomcat with Virtual Hosts
From: Marty Pitt NZ [mailto:martyp...@me.com] Subject: Testing Tomcat with Virtual Hosts I've edited my hosts file to look as follows: 127.0.0.1 localhost ::1 localhost 127.0.0.1 test1.localhost localhost test2.localhost The last line is a little odd; why aren't you using 127.0.0.1 for test2.localhost? However, I'm getting a 404 when hitting test1.localhost:8080/myWebApp, although localhost:8080/myWebApp works fine. Can't see anything wrong in what you've done in the Tomcat config. Try enabling the AccessLogValve and see what it says. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual Hosts and manager application.
Thank you this seems to have fixed my problems. Regards, Wes On Mon, Aug 24, 2009 at 9:10 PM, Pid p...@pidster.com wrote: On 24/08/2009 16:09, Wesley Acheson wrote: Hi, Host name=applications.westest.example.com appbase=/home/servers/applications.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Assuming that you've copied and pasted, set appBase not appbase p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual Hosts and manager application.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wesley, On 8/24/2009 5:20 PM, Wesley Acheson wrote: Off topic is it wrong to reply to two emails like this in one mail (for threading purposes?) While not wrong, it is kind of confusing. There's no particular reason not to reply to messages individually. Your apps will be deployed at least twice, maybe more. Why don't you use just use the manager webapp from where it gets installed by default (in CATALINA_HOME/server/webapps/manager)? Its being deployed once per host. I need more than one because the standard manager install only works for one host. Right, I get it. But, since the manager app is also sitting in Tomcat's webapps directory, which has auto-deploy turned-on for your localhost Host, it will deployed there as well. I'm not sure there's really a problem with that (it's just another deployment, under a different Host), but I just wanted to point out that it /will/ be deployed twice in your configuration, when you are trying to really have it only deploy once (for testing). This is similar to the instructions at http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html A default Tomcat installation includes the manager. To add an instance of the Manager web application Context to a new host install the manager.xmlcontext configuration file in the $CATALINA_BASE/conf/[enginename]/[hostname] folder. Here is an example: Context path=/manager debug=0 privileged=true docBase=/usr/local/kinetic/tomcat6/server/webapps/manager /Context Somebody boned those instructions: the path attribute should not be set. If you have Tomcat configured to support multiple virtual hosts (websites) you would need to configure a Manager for each. Yup, and it's as easy as duplicating the manager.xml file into each of your conf/Catalina/[hostname] directories. You shouldn't have to do anything else at all (except maybe modify the ResourceLink to point to maybe another type of user database. I did a direct copy [of manager.xml]. I only started changing it after I ran into the problem even then I don't think I changed it much. What problems were you having? Those mentioned in your original post (like Document base .../apache-tomcat-6.0.20/./manager does not exist)? The only reason I can think of to get that odd error would be to mess with the docBase in the manager.xml file itself. Otherwise, I'm at a loss. I might suggest wiping your TC install and starting again, step-by-step. It's possible that you're broken something else somewhere and we'll have a tough time finding it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqT9YAACgkQ9CaO5/Lv0PCS1QCghtkCCglzZj19CqywFXyRipb6 EAYAnifZVMGkJb5IkzjTnOEKE6LCaRqG =7s1B -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Virtual Hosts and manager application.
Hi, I'm using the following configuration. *VERSION*: Tomcat 6.0.20* OS*: Fedora core 9 *uname -a*: Linux attacker.myriad.local 2.6.27.25-78.2.56.fc9.i686 #1 SMP Thu Jun 18 12:47:50 EDT 2009 i686 i686 i386 GNU/Linux *install path*: /home/servers/apache-tomcat-6.0.20 On *another* machine (windows and my desktop). I'm running Apache HTTP which is connected via AJP. I don't think thats relevant to my query but you seem to want all the details one can give. Basically my problem is I have added hosts to the server as follows in server.xml (please note I've removed comments for brevity and everything before service.) Service name=Catalina Connector port=8180 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8543 / Connector port=8109 protocol=AJP/1.3 redirectPort=8543 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ !-- Define the default virtual host Note: XML Schema validation will not work with Xerces 2.2. -- Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=applications.westest.example.com appbase=/home/servers/applications.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=cashier.westest.example.com appbase=/home/servers/cashier.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=communication.westest.example.com appbase=/home/servers/communication.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service Now to try to add the manager application to each domain following the instructions found at http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html i've added a manager.xml to each of my hosts. For example /home/servers/apache-tomcat-6.0.20/conf/Catalina/ cashier.westest.example.com/manager.xml the contents of this file are as follows. ?xml version=1.0 encoding=UTF-8? Context docBase=${catalina.home}/webapps/manager privileged=true antiResourceLocking=false antiJARLocking=false /Context However whenever I alter this file (or restart) I get the following in catalina.out Aug 24, 2009 5:04:14 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/manager] Aug 24, 2009 5:04:14 PM org.apache.catalina.startup.HostConfig deployDescriptor WARNING: A docBase /home/servers/apache-tomcat-6.0.20/webapps/manager inside the host appBase has been specified, and will be ignored Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:619) Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/manager] startup failed due to previous errors Aug 24, 2009
Re: Virtual Hosts and manager application.
Thanks Jonathan. I've tried but I get the same or a similar result. See its right when the WARNING is issued but wrong two lines down. * manager.xml* ?xml version=1.0 encoding=UTF-8? Context docBase=/home/servers/apache-tomcat-6.0.20/webapps/manager privileged=true antiResourceLocking=false antiJARLocking=false /Context *catalinia.out* * *Aug 24, 2009 5:17:25 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/manager] Aug 24, 2009 5:17:25 PM org.apache.catalina.startup.HostConfig deployDescriptor WARNING: A docBase /home/servers/apache-tomcat-6.0.20/webapps/manager inside the host appBase has been specified, and will be ignored Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:619) Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/manager] startup failed due to previous errors Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[ cashier.westest.myriadpayments.com].[/manager] has not been started cat manager.xml* * On Mon, Aug 24, 2009 at 5:13 PM, Jonathan Mast jhmast.develo...@gmail.comwrote: Try placing the literal path to the manager in there instead of the ${catalina.home} variable. On Mon, Aug 24, 2009 at 11:09 AM, Wesley Acheson wesley.ache...@gmail.comwrote: Hi, I'm using the following configuration. *VERSION*: Tomcat 6.0.20* OS*: Fedora core 9 *uname -a*: Linux attacker.myriad.local 2.6.27.25-78.2.56.fc9.i686 #1 SMP Thu Jun 18 12:47:50 EDT 2009 i686 i686 i386 GNU/Linux *install path*: /home/servers/apache-tomcat-6.0.20 On *another* machine (windows and my desktop). I'm running Apache HTTP which is connected via AJP. I don't think thats relevant to my query but you seem to want all the details one can give. Basically my problem is I have added hosts to the server as follows in server.xml (please note I've removed comments for brevity and everything before service.) Service name=Catalina Connector port=8180 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8543 / Connector port=8109 protocol=AJP/1.3 redirectPort=8543 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ !-- Define the default virtual host Note: XML Schema validation will not work with Xerces 2.2. -- Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=applications.westest.example.com appbase=/home/servers/applications.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=cashier.westest.example.com appbase=/home/servers/cashier.westest unpackWARs=true autoDeploy=true
Re: Virtual Hosts and manager application.
Try placing the literal path to the manager in there instead of the ${catalina.home} variable. On Mon, Aug 24, 2009 at 11:09 AM, Wesley Acheson wesley.ache...@gmail.comwrote: Hi, I'm using the following configuration. *VERSION*: Tomcat 6.0.20* OS*: Fedora core 9 *uname -a*: Linux attacker.myriad.local 2.6.27.25-78.2.56.fc9.i686 #1 SMP Thu Jun 18 12:47:50 EDT 2009 i686 i686 i386 GNU/Linux *install path*: /home/servers/apache-tomcat-6.0.20 On *another* machine (windows and my desktop). I'm running Apache HTTP which is connected via AJP. I don't think thats relevant to my query but you seem to want all the details one can give. Basically my problem is I have added hosts to the server as follows in server.xml (please note I've removed comments for brevity and everything before service.) Service name=Catalina Connector port=8180 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8543 / Connector port=8109 protocol=AJP/1.3 redirectPort=8543 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ !-- Define the default virtual host Note: XML Schema validation will not work with Xerces 2.2. -- Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=applications.westest.example.com appbase=/home/servers/applications.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=cashier.westest.example.com appbase=/home/servers/cashier.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Host name=communication.westest.example.com appbase=/home/servers/communication.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service Now to try to add the manager application to each domain following the instructions found at http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html i've added a manager.xml to each of my hosts. For example /home/servers/apache-tomcat-6.0.20/conf/Catalina/ cashier.westest.example.com/manager.xml the contents of this file are as follows. ?xml version=1.0 encoding=UTF-8? Context docBase=${catalina.home}/webapps/manager privileged=true antiResourceLocking=false antiJARLocking=false /Context However whenever I alter this file (or restart) I get the following in catalina.out Aug 24, 2009 5:04:14 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/manager] Aug 24, 2009 5:04:14 PM org.apache.catalina.startup.HostConfig deployDescriptor WARNING: A docBase /home/servers/apache-tomcat-6.0.20/webapps/manager inside the host appBase has been specified, and will be ignored Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:619) Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() Aug
Re: Virtual Hosts and manager application.
You need to specify the path attribute in the Context tag. I would recommend something other than just manager as I've see malicious bots looking for it. I would also remove the anitResourceLocking and antiJARLocking attrs, why do you think you need them? On Mon, Aug 24, 2009 at 11:21 AM, Wesley Acheson wesley.ache...@gmail.comwrote: Thanks Jonathan. I've tried but I get the same or a similar result. See its right when the WARNING is issued but wrong two lines down. * manager.xml* ?xml version=1.0 encoding=UTF-8? Context docBase=/home/servers/apache-tomcat-6.0.20/webapps/manager privileged=true antiResourceLocking=false antiJARLocking=false /Context *catalinia.out* * *Aug 24, 2009 5:17:25 PM org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/manager] Aug 24, 2009 5:17:25 PM org.apache.catalina.startup.HostConfig deployDescriptor WARNING: A docBase /home/servers/apache-tomcat-6.0.20/webapps/manager inside the host appBase has been specified, and will be ignored Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:619) Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/manager] startup failed due to previous errors Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[ cashier.westest.myriadpayments.com].[/manager] has not been started cat manager.xml* * On Mon, Aug 24, 2009 at 5:13 PM, Jonathan Mast jhmast.develo...@gmail.comwrote: Try placing the literal path to the manager in there instead of the ${catalina.home} variable. On Mon, Aug 24, 2009 at 11:09 AM, Wesley Acheson wesley.ache...@gmail.comwrote: Hi, I'm using the following configuration. *VERSION*: Tomcat 6.0.20* OS*: Fedora core 9 *uname -a*: Linux attacker.myriad.local 2.6.27.25-78.2.56.fc9.i686 #1 SMP Thu Jun 18 12:47:50 EDT 2009 i686 i686 i386 GNU/Linux *install path*: /home/servers/apache-tomcat-6.0.20 On *another* machine (windows and my desktop). I'm running Apache HTTP which is connected via AJP. I don't think thats relevant to my query but you seem to want all the details one can give. Basically my problem is I have added hosts to the server as follows in server.xml (please note I've removed comments for brevity and everything before service.) Service name=Catalina Connector port=8180 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8543 / Connector port=8109 protocol=AJP/1.3 redirectPort=8543 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ !-- Define the default virtual host Note: XML Schema validation will not work with Xerces 2.2. -- Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true
Re: Virtual Hosts and manager application.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonathan, On 8/24/2009 11:39 AM, Jonathan Mast wrote: You need to specify the path attribute in the Context tag. Er, no. The name of the file specifies the context path. No path attribute is necessary. In fact, it will likely confuse things. java.lang.IllegalArgumentException: Document base /home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a readable directory Wes, Are you sure you're looking at the right file? How many managers are you trying to deploy? One for each Host? How about starting with just a single one to get it working. It looks like you may have several of them configured, and maybe are confusing the warnings with each other. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqSuasACgkQ9CaO5/Lv0PDp3wCgmKFvVz+H5XaCoihnzc20iFqA 74AAoK6zRaq82xZgj5DtlM9gPg8r5OkH =vI3M -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual Hosts and manager application.
Hi All, Comments below. The one thing that may be unusual about my server.xml (see initial email) is the fact that server.xml is specifying docRoots that are parellel with my tomcat installation not in a sub folder. I've a sneaking suspicion that this would fix the problem but I don't want to do that. On Mon, Aug 24, 2009 at 5:39 PM, Jonathan Mast jhmast.develo...@gmail.comwrote: You need to specify the path attribute in the Context tag. I would recommend something other than just manager as I've see malicious bots looking for it. True but for the moment on our internal network on a developer server I just want to get something working. I'll configure more things later. I would also remove the anitResourceLocking and antiJARLocking attrs, why do you think you need them? Honestly my first version of the manager.xml was a simple copy out of a host created with host manager. I thought this was the easiest way to get a working config, without being limited to the limitations of host-manager (Hosts not persisted after restart). It had those attributes so my file does. On Mon, Aug 24, 2009 at 6:02 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonathan, On 8/24/2009 11:39 AM, Jonathan Mast wrote: You need to specify the path attribute in the Context tag. Er, no. The name of the file specifies the context path. No path attribute is necessary. In fact, it will likely confuse things. I previously tried with the path before my initial email. I didn't list all the steps I had gone through to try to fix it. java.lang.IllegalArgumentException: Document base /home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a readable directory Wes, Are you sure you're looking at the right file? How many managers are you trying to deploy? One for each Host? How about starting with just a single one to get it working. It looks like you may have several of them configured, and maybe are confusing the warnings with each other. - -chris I'm trying to deploy 3 managers but I focused on 1, cashier.westest.example.com I'm pretty sure its this one because I get the logged messages when I change the manager.xml Its the only one being reloaded in that instance. Or am I wrong with that? I'm also getting 404 errors when I hit http://cashier.westest.example.com/manager/html so I know the changes haven't fixed this one. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqSuasACgkQ9CaO5/Lv0PDp3wCgmKFvVz+H5XaCoihnzc20iFqA 74AAoK6zRaq82xZgj5DtlM9gPg8r5OkH =vI3M -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual Hosts and manager application.
On 24/08/2009 16:09, Wesley Acheson wrote: Hi, Host name=applications.westest.example.com appbase=/home/servers/applications.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Assuming that you've copied and pasted, set appBase not appbase p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual Hosts and manager application.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wes, On 8/24/2009 12:18 PM, Wesley Acheson wrote: Comments below. The one thing that may be unusual about my server.xml (see initial email) is the fact that server.xml is specifying docRoots that are parellel with my tomcat installation not in a sub folder. I've a sneaking suspicion that this would fix the problem but I don't want to do that. Aah, yes. This: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Plus this: ?xml version=1.0 encoding=UTF-8? Context docBase=${catalina.home}/webapps/manager privileged=true antiResourceLocking=false antiJARLocking=false /Context Will lead to confusion. Your apps will be deployed at least twice, maybe more. Why don't you use just use the manager webapp from where it gets installed by default (in CATALINA_HOME/server/webapps/manager)? Honestly my first version of the manager.xml was a simple copy out of a host created with host manager. I thought this was the easiest way to get a working config, without being limited to the limitations of host-manager (Hosts not persisted after restart). It had those attributes so my file does. I would use the manager.xml file unchanged, except for its path (and possibly file name), of course. I'm trying to deploy 3 managers but I focused on 1, cashier.westest.example.com Okay. I so you should have (as you already do): Host name=cashier.westest.example.com appbase=/home/servers/cashier.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Then, copy the stock manager.xml into CATALINA_BASE/conf/Catalina/cashier.westest.example.com/ Wouldn't that do it? I'm pretty sure its this one because I get the logged messages when I change the manager.xml Its the only one being reloaded in that instance. Or am I wrong with that? It's probably being loaded twice because autoDeploy=true for your localhost Host. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqS5zgACgkQ9CaO5/Lv0PCmZgCfa4Tc4eoiebsvWAKvo11v0SzX 92IAnAp/RoGEJs7y19STKxJxrWPzPqc8 =ZSwD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Virtual Hosts and manager application.
I'm back to work on thursday so I won't be able to try any suggested fixes till then. I'll let you know. Off topic is it wrong to reply to two emails like this in one mail (for threading purposes?) On Mon, Aug 24, 2009 at 9:10 PM, Pid p...@pidster.com wrote: On 24/08/2009 16:09, Wesley Acheson wrote: Hi, Host name=applications.westest.example.com appbase=/home/servers/applications.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Assuming that you've copied and pasted, set appBase not appbase p Wow good spot. I wouldn't have noticed maybe this is causing the problem. On Mon, Aug 24, 2009 at 9:17 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wes, On 8/24/2009 12:18 PM, Wesley Acheson wrote: Comments below. The one thing that may be unusual about my server.xml (see initial email) is the fact that server.xml is specifying docRoots that are parellel with my tomcat installation not in a sub folder. I've a sneaking suspicion that this would fix the problem but I don't want to do that. Aah, yes. This: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Plus this: ?xml version=1.0 encoding=UTF-8? Context docBase=${catalina.home}/webapps/manager privileged=true antiResourceLocking=false antiJARLocking=false /Context Will lead to confusion. Your apps will be deployed at least twice, maybe more. Why don't you use just use the manager webapp from where it gets installed by default (in CATALINA_HOME/server/webapps/manager)? Its being deployed once per host. I need more than one because the standard manager install only works for one host. This is similar to the instructions at http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html A default Tomcat installation includes the manager. To add an instance of the Manager web application Context to a new host install the manager.xmlcontext configuration file in the $CATALINA_BASE/conf/[enginename]/[hostname] folder. Here is an example: Context path=/manager debug=0 privileged=true docBase=/usr/local/kinetic/tomcat6/server/webapps/manager /Context If you have Tomcat configured to support multiple virtual hosts (websites) you would need to configure a Manager for each. Honestly my first version of the manager.xml was a simple copy out of a host created with host manager. I thought this was the easiest way to get a working config, without being limited to the limitations of host-manager (Hosts not persisted after restart). It had those attributes so my file does. I would use the manager.xml file unchanged, except for its path (and possibly file name), of course. Thats what I did a direct copy. I only started changing it after I ran into the problem even then I don't think I changed it much. I'm trying to deploy 3 managers but I focused on 1, cashier.westest.example.com Okay. I so you should have (as you already do): Host name=cashier.westest.example.com appbase=/home/servers/cashier.westest unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host Then, copy the stock manager.xml into CATALINA_BASE/conf/Catalina/cashier.westest.example.com/ Wouldn't that do it? Thats where I ran into problems I'm pretty sure its this one because I get the logged messages when I change the manager.xml Its the only one being reloaded in that instance. Or am I wrong with that? It's probably being loaded twice because autoDeploy=true for your localhost Host. Sorry this is a miss-communication on my behalf. What I meant was not that its being deployed twice but that I was sure that tc only reloaded the context that had been altered. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqS5zgACgkQ9CaO5/Lv0PCmZgCfa4Tc4eoiebsvWAKvo11v0SzX 92IAnAp/RoGEJs7y19STKxJxrWPzPqc8 =ZSwD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: apache2.2 tomcat5.5.27 Windows 2008 virtual hosts
Hi, Just one last update. Nothing changed related to DNS or firewall rules. Tomcat does not work via localhost either. Kind regards and thank you all for the feedback. Piet On Mon, Aug 17, 2009 at 5:39 PM, David Smith d...@cornell.edu wrote: Hmmm ... maybe retour.mycompany.com isn't resolving to the IP you think it is. Is there anything in your tomcat logs that might imply the request is actually getting there? To me this smells a lot like a network issue (DNS not resolving, firewall rules, etc., ...). Can you verify tomcat works on the machine itself via a localhost request? I'd also like to see what the server.xml file looks like. I don't think its the issue, but it'd be nice to elliminate it entirely. --David java piet wrote: Sorry David, The addresses and names are fakes for reasons of confidentiality. The addresses and names in my code have worked before though. Kind regards, Piet On Mon, Aug 17, 2009 at 2:42 PM, David Smith d...@cornell.edu wrote: Are you replacing DNS names and IPs with fakes for the purposes of email or are these real values? 192.168.x.x is unroutable and suggests the time out is because your firewall or cable router aren't passing through the requests from clients. --David java piet wrote: Thank you for the feedback. Sorry for the incomplete information. The Apache http server is functioning as a reverse proxy. Multiple applications have to be accessed through the internet. Now, I have Tomcat listening on 8081. Going to retour.mycompany.com:8080 or retour.mycompany.com:8081 gives a network timeout. (The server at retour.mycompany.com is taking too long to respond.) On the other hand, when I use the ip address like http://192.168.210.143:8080/ I get the resource (/) not found error while http://192.168.210.143:8081/ gives a network timeout. Tomcat without the Apache http server service gives the same network timeout when accessed through 8081. Hope this gives a clearer picture. Kind regards. Piet On Sun, Aug 16, 2009 at 9:02 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: java piet [mailto:javap...@gmail.com] Subject: Re: apache2.2 tomcat5.5.27 Windows 2008 virtual hosts The reason for the Apache http server is because I thought I need it to handle the virtual hosting. No, Tomcat can handle that quite well: http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html As for the port 80, something else is already using it on the server. You may be able to use a different IP address and have Tomcat use port 80 with that. First I will try to have Tomcat listen on 8081 and see where that gets me. Your first step should really be to eliminate httpd; it will make things much simpler. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: apache2.2 tomcat5.5.27 Windows 2008 virtual hosts
Thank you for the feedback. Sorry for the incomplete information. The Apache http server is functioning as a reverse proxy. Multiple applications have to be accessed through the internet. Now, I have Tomcat listening on 8081. Going to retour.mycompany.com:8080 or retour.mycompany.com:8081 gives a network timeout. (The server at retour.mycompany.com is taking too long to respond.) On the other hand, when I use the ip address like http://192.168.210.143:8080/ I get the resource (/) not found error while http://192.168.210.143:8081/ gives a network timeout. Tomcat without the Apache http server service gives the same network timeout when accessed through 8081. Hope this gives a clearer picture. Kind regards. Piet On Sun, Aug 16, 2009 at 9:02 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: java piet [mailto:javap...@gmail.com] Subject: Re: apache2.2 tomcat5.5.27 Windows 2008 virtual hosts The reason for the Apache http server is because I thought I need it to handle the virtual hosting. No, Tomcat can handle that quite well: http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html As for the port 80, something else is already using it on the server. You may be able to use a different IP address and have Tomcat use port 80 with that. First I will try to have Tomcat listen on 8081 and see where that gets me. Your first step should really be to eliminate httpd; it will make things much simpler. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: apache2.2 tomcat5.5.27 Windows 2008 virtual hosts
Sorry David, The addresses and names are fakes for reasons of confidentiality. The addresses and names in my code have worked before though. Kind regards, Piet On Mon, Aug 17, 2009 at 2:42 PM, David Smith d...@cornell.edu wrote: Are you replacing DNS names and IPs with fakes for the purposes of email or are these real values? 192.168.x.x is unroutable and suggests the time out is because your firewall or cable router aren't passing through the requests from clients. --David java piet wrote: Thank you for the feedback. Sorry for the incomplete information. The Apache http server is functioning as a reverse proxy. Multiple applications have to be accessed through the internet. Now, I have Tomcat listening on 8081. Going to retour.mycompany.com:8080 or retour.mycompany.com:8081 gives a network timeout. (The server at retour.mycompany.com is taking too long to respond.) On the other hand, when I use the ip address like http://192.168.210.143:8080/ I get the resource (/) not found error while http://192.168.210.143:8081/ gives a network timeout. Tomcat without the Apache http server service gives the same network timeout when accessed through 8081. Hope this gives a clearer picture. Kind regards. Piet On Sun, Aug 16, 2009 at 9:02 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: java piet [mailto:javap...@gmail.com] Subject: Re: apache2.2 tomcat5.5.27 Windows 2008 virtual hosts The reason for the Apache http server is because I thought I need it to handle the virtual hosting. No, Tomcat can handle that quite well: http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html As for the port 80, something else is already using it on the server. You may be able to use a different IP address and have Tomcat use port 80 with that. First I will try to have Tomcat listen on 8081 and see where that gets me. Your first step should really be to eliminate httpd; it will make things much simpler. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org