Re: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-17 Thread mirkocal

Here it is the whole description of my needs (in my posts I have reported
just a part of the problem) and the solution I have found (also thanks to
your suggestion):
Problem
I have a Win 2003 server and I want to run on it several web apps of
different customers, each one responding to a different URL. Some of them
are written in ASP (and then running under IIS 6) and other ones in Java
(running under Tomcat 6).
I need that all my web apps can be riched by port 80.

Solution 
Since both IIS and Tomcat cannot be listening on port 80 at the same time, I
have thought to leave IIS on port 80 and redirect Java calls to Tomcat using
isapi_redirect.dll. 

1 - Under Tomcat, I have created a specific virtual host
www.teamfarnesevini.it with the same name and alias of my URL and context
pointing to my application (TeamFarneseVini under Tomcat
6.0\work\Catalina\www.teamfarnesevini.it\TeamFarneseVini) that has been
deployed under this virtual host (here is its definition in server.xml)

Host name=localhost  appBase=webapps
unpackWARs=false autoDeploy=false
xmlValidation=false xmlNamespaceAware=false
/Host

Host name=www.teamfarnesevini.it  appBase=webapps
unpackWARs=false autoDeploy=false
xmlValidation=false xmlNamespaceAware=false
Context path= docBase=TeamFarneseVini/
Aliaswww.teamfarnesevini.it/Alias
/Host

2 - Under IIS I have configured the dll and the web site teamfarnesevini.it
pointing to the phisical dir of my application as shown in
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html

3 - I have created the worker

4 - In the uriworkermap.properties I have added the following lines:
  /TeamFarneseVini=ajp13
  /TeamFarneseVini/*.jsp=ajp13
  /TeamFarneseVini/*.do=ajp13
  /*.*=ajp13
  
Now all seems to work correctly, but if you have a simplest solution I would
be very happy! In particular, I don't think that the last directive in
uriworkermap /*.*=ajp13 is very clear... but without it it doesn't work!

Thanks for your help

Mirko
-- 
View this message in context: 
http://old.nabble.com/Problem-redirecting-requests-from-IIS-to-Tomcat-by-isapi_redirect.dll-tp27893887p27933369.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: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-16 Thread Pid

On 15/03/2010 22:50, mirkocal wrote:


Thanks for your answers, but maybe I have not been enaugh clear.
What I want is that my web application can be launched asking for
www.myapp.it and, in the future, deploy other web apps on the same physical
machine under Tomcat, each one responding to a diffferent URL (all pointing
to the IP address of my machine).


Are you talking about virtual hosts, or multiple webapps in the same 
host?  Please provide some example URLs so we know what you mean.



I've tried to do this using IIS and Tomcat
communication mechanism, but it doesn't work.


You haven't really explained what doesn't work actually means.


Any other suggest?


Drop IIS and just use Tomcat?


p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-16 Thread mirkocal

Well, I need to install on the same physical machine multiple application
running under Tomcat, let's say
- MyApp1 - URL www.myapp1.it
- MyApp2 - URL www.myapp2.it
What I need is that both application can be launched simply asking for
respectively www.myapp1.it and  www.myapp2.it using port 80.
I've tried to obtain this connecting IIS with Tomcat, but maybe I can use
Virtual Hosting.
Could you please explain me how to do it?

Thanks
-- 
View this message in context: 
http://old.nabble.com/Problem-redirecting-requests-from-IIS-to-Tomcat-by-isapi_redirect.dll-tp27893887p27916856.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: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-16 Thread Pid

On 16/03/2010 12:18, mirkocal wrote:


Well, I need to install on the same physical machine multiple application
running under Tomcat, let's say
- MyApp1 - URL www.myapp1.it
- MyApp2 - URL www.myapp2.it
What I need is that both application can be launched simply asking for
respectively www.myapp1.it and  www.myapp2.it using port 80.
I've tried to obtain this connecting IIS with Tomcat, but maybe I can use
Virtual Hosting.
Could you please explain me how to do it?


Your application should be called ROOT.war

 http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html


p


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-16 Thread Electronjockey

I've done this many times.
First you need to configure IIS to handle host headers. You can do this 
one of two ways. You can (a) create multiple virtual sites in IIS or (b) 
use an ISAPI redirector to simulate virtual hosts. I recommend option (a).
Next you have to decide if you can afford to have all of your tomcat 
apps down when you need to take tomcat offline. If you can then you can 
run one instance of Tomcat and make use of rewrite rules 
(uriworkermap.properties file). If you can't then you'll need multiple 
instances of Tomcat.


The way I configured my intranet applications was to create multiple 
virtual hosts in IIS (and configured each with the tomcat connector). 
Each connected to the same one instance of Tomcat. I use a 
isapi_redirect.properties file instead of the registry for 
configuration. I then use the uriworkermap.properties file to handle 
mapping the IIS virtual host to the tomcat application. Unfortunately I 
don't have access at the moment to my uriworkermap.properties, but I'll 
see if I can't come up with a sample for you.


Hope this gets you started.


-Original Message-
From: mirkocal mirko.cala...@gmail.com
To : users@tomcat.apache.org
Sent: Tue Mar 16 8:18:08 2010
Subject: Re: Problem redirecting requests from IIS to Tomcat by 
isapi_redirect.dll


Well, I need to install on the same physical machine multiple application
running under Tomcat, let's say
- MyApp1 - URL www.myapp1.it
- MyApp2 - URL www.myapp2.it
What I need is that both application can be launched simply asking for
respectively www.myapp1.it and  www.myapp2.it using port 80.
I've tried to obtain this connecting IIS with Tomcat, but maybe I can use
Virtual Hosting.
Could you please explain me how to do it?

Thanks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-16 Thread Caldarale, Charles R
 From: Electronjockey [mailto:electronjoc...@hotmail.com]
 Subject: Re: Problem redirecting requests from IIS to Tomcat by
 isapi_redirect.dll
 
 First you need to configure IIS to handle host headers.

Actually, the first thing to do is get rid of IIS, since it doesn't appear to 
be playing any useful role in the OP's environment, then configure Tomcat to 
use port 80, and follow the instructions at the link Pid provided.

 - 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: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-16 Thread Electronjockey
Yes, my error, I just surmised that since he was using IIS with the 
Tomcat connector that he did in fact have a reason for using it. If 
that is not the case, then you are correct. The desired result can be 
achieved by disabling or removing IIS and reconfiguring Tomcat to 
respond on port 80 and configure virtual hosts.


-Original Message-
From: Caldarale, Charles R chuck.caldar...@unisys.com
To : Tomcat Users List users@tomcat.apache.org
Sent: Tue Mar 16 9:26:19 2010
Subject: Re: Problem redirecting requests from IIS to Tomcat by 
isapi_redirect.dll


From: Electronjockey [mailto:electronjoc...@hotmail.com]
Subject: Re: Problem redirecting requests from IIS to Tomcat by
isapi_redirect.dll

First you need to configure IIS to handle host headers.

Actually, the first thing to do is get rid of IIS, since it doesn't 
appear to be playing any useful role in the OP's environment, then 
configure Tomcat to use port 80, and follow the instructions at the link 
Pid provided.


- 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



Re: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-15 Thread mirkocal

Thanks for your answers, but maybe I have not been enaugh clear. 
What I want is that my web application can be launched asking for
www.myapp.it and, in the future, deploy other web apps on the same physical
machine under Tomcat, each one responding to a diffferent URL (all pointing
to the IP address of my machine). I've tried to do this using IIS and Tomcat
communication mechanism, but it doesn't work.
Any other suggest?
-- 
View this message in context: 
http://old.nabble.com/Problem-redirecting-requests-from-IIS-to-Tomcat-by-isapi_redirect.dll-tp27893887p27911392.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: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-15 Thread mirkocal

Thanks for your answers, but maybe I have not been enaugh clear. 
What I want is that my web application can be launched asking for
www.myapp.it and, in the future, deploy other web apps on the same physical
machine under Tomcat, each one responding to a diffferent URL (all pointing
to the IP address of my machine). I've tried to do this using IIS and Tomcat
communication mechanism, but it doesn't work.
Any other suggest?
-- 
View this message in context: 
http://old.nabble.com/Problem-redirecting-requests-from-IIS-to-Tomcat-by-isapi_redirect.dll-tp27893887p27911408.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



Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-14 Thread mirkocal

Hi, I'm trying to redirect requests from IIS 6 to Tomcat 6.
I've followed the instructions reported in the official Tomcat
documentation:
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
http://tomcat.apache.org/connectors-doc/generic_howto/workers.html
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html
In particular, I've created:
- the required registry key
- the web app MyApp under Tomcat
- the web site MyApp under IIS containing the virtual directory MyApp
pointing to the fisical directory of the Tomcat web app (further than the
jakarta virtual dir) with host header value www.myapp.it and ISAPI filter as
shown in the docs 
I'm using isapi_redirect.dll ver. 1.2.30, the operating system is Win 2003.
Now, asking for www.myapp.it I am only redirected on Tomcat main page, but
MyApp is not started. To access it, I have to ask for www.myapp.it/MyApp but
what I want is to start the application asking simply for www.myapp.it.
Any suggest is appriciated!!!
thanks in advance


Mirko
-- 
View this message in context: 
http://old.nabble.com/Problem-redirecting-requests-from-IIS-to-Tomcat-by-isapi_redirect.dll-tp27893887p27893887.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: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-14 Thread André Warnier

mirkocal wrote:

Hi, I'm trying to redirect requests from IIS 6 to Tomcat 6.
I've followed the instructions reported in the official Tomcat
documentation:
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
http://tomcat.apache.org/connectors-doc/generic_howto/workers.html
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html
In particular, I've created:
- the required registry key
- the web app MyApp under Tomcat
- the web site MyApp under IIS containing the virtual directory MyApp
pointing to the fisical directory of the Tomcat web app (further than the
jakarta virtual dir) with host header value www.myapp.it and ISAPI filter as
shown in the docs 


That, you should probably not do, because if you define the webapp dir 
directly to IIS, it means you are bypassing Tomcat.

Try accessing http://www.myapp.it/MyApp/WEB-INF/web.xml.
If it works, then something is wrong, because Tomcat (for security 
reasons) would never show you this file.


Basically, you should have only the jakarta virtual dir, and it will 
work for all your Tomcat webapps.
Only in some special cases, you do need to add MyApp, but then you 
should be really careful.



I'm using isapi_redirect.dll ver. 1.2.30, the operating system is Win 2003.

That's fine.


Now, asking for www.myapp.it I am only redirected on Tomcat main page


That is as it should be, with the standard installation.

, but

MyApp is not started. To access it, I have to ask for www.myapp.it/MyApp


That is also normal.

 but

what I want is to start the application asking simply for www.myapp.it.


This is a different issue.
For that to work, you need to make your app be the Tomcat default 
application (which is named ROOT (in capitals)).

See here :
http://wiki.apache.org/tomcat/HowTo
#39


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem redirecting requests from IIS to Tomcat by isapi_redirect.dll

2010-03-14 Thread Rainer Jung

On 14.03.2010 13:25, André Warnier wrote:

mirkocal wrote:

Hi, I'm trying to redirect requests from IIS 6 to Tomcat 6.
I've followed the instructions reported in the official Tomcat
documentation:
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
http://tomcat.apache.org/connectors-doc/generic_howto/workers.html
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html
In particular, I've created:
- the required registry key
- the web app MyApp under Tomcat
- the web site MyApp under IIS containing the virtual directory MyApp
pointing to the fisical directory of the Tomcat web app (further than the
jakarta virtual dir) with host header value www.myapp.it and ISAPI
filter as
shown in the docs


That, you should probably not do, because if you define the webapp dir
directly to IIS, it means you are bypassing Tomcat.
Try accessing http://www.myapp.it/MyApp/WEB-INF/web.xml.
If it works, then something is wrong, because Tomcat (for security
reasons) would never show you this file.

Basically, you should have only the jakarta virtual dir, and it will
work for all your Tomcat webapps.
Only in some special cases, you do need to add MyApp, but then you
should be really careful.


I'm using isapi_redirect.dll ver. 1.2.30, the operating system is Win
2003.

That's fine.


Now, asking for www.myapp.it I am only redirected on Tomcat main page


That is as it should be, with the standard installation.

, but

MyApp is not started. To access it, I have to ask for www.myapp.it/MyApp


That is also normal.

but

what I want is to start the application asking simply for www.myapp.it.


This is a different issue.
For that to work, you need to make your app be the Tomcat default
application (which is named ROOT (in capitals)).
See here :
http://wiki.apache.org/tomcat/HowTo
#39


If you really need to publish the webapp /MyApp under a different path 
than the one it is deployed in Tomcat, you could play around with the 
rewrite feature of the isapi redirector. Look for the word rewrite on 
the page


http://tomcat.apache.org/connectors-doc/reference/iis.html

Warning: it will only rewrite request URLs, not Redirect URLs, Cookie 
paths etc. If you can put the app into the root context as suggested by 
André, it will be easier.


Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org