Alias' and the like
Bump! Would really appreciate some help on this one... cheers, David - Forwarded by David Hay/Lex/Lexmark on 12/07/2006 13:29 - |-+ | | [EMAIL PROTECTED] | | || | | 11/07/2006 13:03 | | | Please respond to| | | Tomcat Users| | | List| | || |-+ -| | | | To: Tomcat Users List users@tomcat.apache.org | | cc: | | Subject: Alias' and the like | -| Hi, We're running Apache in front of multiple tomcats with mod_jk. We have an admin app that we'd like to access using a different URL from other server connections, and I am looking for advice on the best way to do this. We will have the single web app, but need to access parts of it from: http://myserver/admin and the rest of it from http://myserver/services I think I have several choices: 1) add a Tomcat context for /admin and /services in the conf directory. When I tried this, however, it seemed to load the whole web app twice (we're using Spring, so it loads the app Context twice ). Is there a way to just point to it, rather than load it? 2) add an Alias in Apache's httpd.conf what do I point it to seeing that it has to go through mod_jk and tomcat? 3) use mod_jk how would I do that? we currently have 3 load balancers defined, so we can balance 3 aspects of the system as follows: JKMount /services/admin/* adminloadbalancer JKMount /services/httpadaptor/* adaptorloadbalancer JkMount /services/* clientloadbalancer I'd like to do JKMount /admin/* adminloadbalancer but need the alias for /admin to point to /services/admin. I would be very grateful if someone could explain the best option... cheers, David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alias' and the like
Hello Dave Option #2 allows you to access seemlingly disprate sites thru Virtual Hosts check out http://httpd.apache.org/docs/1.3/vhosts/examples.html#serverpath HTH Martin-- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, July 12, 2006 1:29 PM Subject: Alias' and the like Bump! Would really appreciate some help on this one... cheers, David - Forwarded by David Hay/Lex/Lexmark on 12/07/2006 13:29 - |-+ | | [EMAIL PROTECTED] | | || | | 11/07/2006 13:03 | | | Please respond to| | | Tomcat Users| | | List| | || |-+ -| | | | To: Tomcat Users List users@tomcat.apache.org | | cc: | | Subject: Alias' and the like | -| Hi, We're running Apache in front of multiple tomcats with mod_jk. We have an admin app that we'd like to access using a different URL from other server connections, and I am looking for advice on the best way to do this. We will have the single web app, but need to access parts of it from: http://myserver/admin and the rest of it from http://myserver/services I think I have several choices: 1) add a Tomcat context for /admin and /services in the conf directory. When I tried this, however, it seemed to load the whole web app twice (we're using Spring, so it loads the app Context twice ). Is there a way to just point to it, rather than load it? 2) add an Alias in Apache's httpd.conf what do I point it to seeing that it has to go through mod_jk and tomcat? 3) use mod_jk how would I do that? we currently have 3 load balancers defined, so we can balance 3 aspects of the system as follows: JKMount /services/admin/* adminloadbalancer JKMount /services/httpadaptor/* adaptorloadbalancer JkMount /services/* clientloadbalancer I'd like to do JKMount /admin/* adminloadbalancer but need the alias for /admin to point to /services/admin. I would be very grateful if someone could explain the best option... cheers, David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alias' and the like
[EMAIL PROTECTED] wrote: Hi, I'd like to do JKMount /admin/* adminloadbalancer but need the alias for /admin to point to /services/admin. I would be very grateful if someone could explain the best option... Use mod_rewrite. You need to rewrite the incoming URL on the fly, right? RewriteEngine on RewriteRule^/examples/(.*) /servlets-examples/$1 [PT] JkMount /servlets-examples/* myworker In your case it should be: RewriteRule^/admin/(.*) /services/admin/$1 [PT] JkMount /services/admin/* adminloadbalance Regards, Mladen. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alias' and the like
This solution works if you're front-ending with Apache- I have seen CGI/Perl do this to specifically route incoming requests to CGI/Perl site 1 to their folder (and consequent access to site2 to Tomcat) Symlink is terminal specific setting up term access to symbols representing another folder .. Symlink is agnostic to which protocol is used to access port 8080 should route to Apache/Tomcat in that order with no proviso for security and consequent erroring by external programs that cant read a symlink (such as WinSCP) Caveat Emptor- M- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Brian Munroe [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org; Martin Gainty [EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 1:59 PM Subject: Re: Alias' and the like On 7/12/06, Martin Gainty [EMAIL PROTECTED] wrote: allows you to access seemlingly disprate sites thru Virtual Hosts check out http://httpd.apache.org/docs/1.3/vhosts/examples.html#serverpath I am pretty sure Alias will only work *if* you (Dave) don't need to process it through Tomcat. It is shown in the mod_jk examples as a way to link to static content, Just a total shot in the dark here (and probably really bad advice), but how about a symlink in the webapps dir? admin - services -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alias' and the like
We have to be able to run on Windows, so won't be able to use symlink. I'm going to take a look at mod_rewrite suggested by Mladen. cheers, David x54680 |-+ | | Martin Gainty | | | [EMAIL PROTECTED]| | | com | | || | | 12/07/2006 16:07 | | | Please respond to| | | Tomcat Users| | | List| | || |-+ -| | | | To: Tomcat Users List users@tomcat.apache.org | | cc: | | Subject: Re: Alias' and the like | -| This solution works if you're front-ending with Apache- I have seen CGI/Perl do this to specifically route incoming requests to CGI/Perl site 1 to their folder (and consequent access to site2 to Tomcat) Symlink is terminal specific setting up term access to symbols representing another folder .. Symlink is agnostic to which protocol is used to access port 8080 should route to Apache/Tomcat in that order with no proviso for security and consequent erroring by external programs that cant read a symlink (such as WinSCP) Caveat Emptor- M- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Brian Munroe [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org; Martin Gainty [EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 1:59 PM Subject: Re: Alias' and the like On 7/12/06, Martin Gainty [EMAIL PROTECTED] wrote: allows you to access seemlingly disprate sites thru Virtual Hosts check out http://httpd.apache.org/docs/1.3/vhosts/examples.html#serverpath I am pretty sure Alias will only work *if* you (Dave) don't need to process it through Tomcat. It is shown in the mod_jk examples as a way to link to static content, Just a total shot in the dark here (and probably really bad advice), but how about a symlink in the webapps dir? admin - services -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alias' and the like
On 7/12/06, Martin Gainty [EMAIL PROTECTED] wrote: This solution works if you're front-ending with Apache- I have seen CGI/Perl do this to specifically route incoming requests to CGI/Perl site 1 to their folder (and consequent access to site2 to Tomcat) Do you have any configuration file examples? I can't get it to work. Here is my test Alias /admin1 /usr/local/tomcat/dev/webapps/bmtest/admin Alias /service /usr/local/tomcat/dev/webapps/bmtest/service JkMount /admin1* dev JkMount /service* dev Inside of my bmtest/admin and bmtest/service directories I have very basic JSP files. I get a Tomcat level 404 I am still not convinced that JkMount respects the Alias directive. -- brian ps. While we continue to beat this dead horse, I think Mladen Turk came up with a vaild solution. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alias' and the like
personally I caution against OS specific constructs to use Apache or Tomcat specific directives including mod-rewrite e.g. httpd.conf VirtualHost * ServerName /usr/local/tomcat/dev/webapps/bmtest/admin ServerAlias admin1 ... /VirtualHost Good Luck * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Brian Munroe [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, July 12, 2006 4:47 PM Subject: Re: Alias' and the like On 7/12/06, Martin Gainty [EMAIL PROTECTED] wrote: This solution works if you're front-ending with Apache- I have seen CGI/Perl do this to specifically route incoming requests to CGI/Perl site 1 to their folder (and consequent access to site2 to Tomcat) Do you have any configuration file examples? I can't get it to work. Here is my test Alias /admin1 /usr/local/tomcat/dev/webapps/bmtest/admin Alias /service /usr/local/tomcat/dev/webapps/bmtest/service JkMount /admin1* dev JkMount /service* dev Inside of my bmtest/admin and bmtest/service directories I have very basic JSP files. I get a Tomcat level 404 I am still not convinced that JkMount respects the Alias directive. -- brian ps. While we continue to beat this dead horse, I think Mladen Turk came up with a vaild solution. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alias' and the like
On 7/12/06, Martin Gainty [EMAIL PROTECTED] wrote: I'm about done with this thread, but I just gotta send one more e.g. httpd.conf VirtualHost * ServerName /usr/local/tomcat/dev/webapps/bmtest/admin ServerAlias admin1 ... /VirtualHost ServerAlias is for setting an alternative host name for name-baeed virtual hosts. It has nothing to do with what David (or myself at one point in time) is trying to accomplish. -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Alias' and the like
Hi, We're running Apache in front of multiple tomcats with mod_jk. We have an admin app that we'd like to access using a different URL from other server connections, and I am looking for advice on the best way to do this. We will have the single web app, but need to access parts of it from: http://myserver/admin and the rest of it from http://myserver/services I think I have several choices: 1) add a Tomcat context for /admin and /services in the conf directory. When I tried this, however, it seemed to load the whole web app twice (we're using Spring, so it loads the app Context twice ). Is there a way to just point to it, rather than load it? 2) add an Alias in Apache's httpd.conf what do I point it to seeing that it has to go through mod_jk and tomcat? 3) use mod_jk how would I do that? we currently have 3 load balancers defined, so we can balance 3 aspects of the system as follows: JKMount /services/admin/* adminloadbalancer JKMount /services/httpadaptor/* adaptorloadbalancer JkMount /services/* clientloadbalancer I'd like to do JKMount /admin/* adminloadbalancer but need the alias for /admin to point to /services/admin. I would be very grateful if someone could explain the best option... cheers, David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]