Re: Regarding Tomcat url redirection

2024-04-24 Thread Christopher Schultz
r.xml and rewrite.config,

re-post

your current server.xml  element, and the complete contents

of

rewrite.config?

Have you looked at the log files after start?

-chris


On Thu, Apr 18, 2024 at 1:36 PM lavanya tech <

lavanyatech...@gmail.com



wrote:


Hi Thomas,

Thanks for the fast response.

I added classname rewrite valeus in contex.xml file .

 
 
className="org.apache.catalina.valves.rewrite.RewriteValve"

/>

 

created rewrite.config so both of them is located under  conf

under

apache-tomcat.

So according to the documentaion they say context.xml should be

placed

under webapps and rewrite.config file should be put in WEB-INF

folder

of

apache-tomcat

Thnks,
Ammu



On Thu, Apr 18, 2024 at 1:22 PM Mark Thomas 

wrote:



On 18/04/2024 12:05, lavanya tech wrote:

Hi Team,

I am using "Tomcat 10.1" in our environment and I wanted to

redirect

url

from https://example.com to https://www.servercom: and for

this i

modified the server.xml as below in tomcat config, and the below
configuration doesnot seems to work. Does anyone has ideas.

Please

suggest.

The url alone https://www.servercom:/ already works. But

just

redirection from the old to one doesnot.


autoDeploy="true">

  
  example.com
  
  
className="org.apache.catalina.valves.rewrite.RewriteValve"/>

  
  
unpackWARs="true"

autoDeploy="true">
  
  example.com
  
className="org.apache.catalina.valves.rewrite.RewriteValve"/>

  
defaultHost="localhost">

  
  
  example.com
  
  
[NC]

  https://www.servercom:/example/$1 [R=301,L]


1. That isn't valid XML.

2. Where in the Tomcat docs does it say you can nest re-write

rules

in

a

Host element (or any other element)?


  
  
  
  



You need to configure the RewriteValve.
https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html

Mark



-

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






-
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: Regarding Tomcat url redirection

2024-04-24 Thread lavanya tech
gt;> Location: https://www.example.com:/example
> >>
> >> If you make a request like:
> >>
> >> $ curl -v http://www.example.com:/something
> >>
> >> I wouldn't expect a redirect because of your "host" condition. The
> >> "%{HTTP_HOST} example.com" looks at the entire Host header and not just
> >> anything that ends in "example.com". You'd have to use a glob/regex if
> >> you wanted to check for [anything and maybe nothing.]example.com.
> >>
> >> You'd also have to make sure that your application is serving responses
> >> to requests to / which is why I'm recommending you use the ROOT web
> >> application name instead of "towl".
> >>
> >> -chris
> >>
> >>> On Fri, Apr 19, 2024 at 1:21 PM Christopher Schultz <
> >>> ch...@christopherschultz.net> wrote:
> >>>
> >>>> Ammu,
> >>>>
> >>>> On 4/18/24 09:34, lavanya tech wrote:
> >>>>> I am attaching server.xml and context.xml and rewrite.config files.
> >>>>> The paths are
> >>>>>
> >>>>> /git/app/apache-tomcat-10.1.11/webapps/towl/context.xml
> >>>>> 
> >>>>> >> className="org.apache.catalina.valves.rewrite.RewriteValve"
> >>>> />
> >>>>>
> >>>>> 
> >>>>
> >>>> This file ^^^ is in the wrong place. It should be in
> >>>> /git/app/apache-tomcat-10.1.11/webapps/towl/META-INF/context.xml
> >>>>
> >>>>> /git/app/apache-tomcat-10.1.11/webapps/towl/WEB-INF/rewrite.config
> >>>>>
> >>>>>  >>>>> https://www.example.com:/example [R=301,L]
> >>>>
> >>>> Why do you have < symbols at the beginning of these lines?
> >>>>
> >>>>> server.xml
> >>>>>
> >>>>> [...]
> >>>>>
> >>>>>   unpackWARs="true"
> >>>>> autoDeploy="true">
> >>>>>  
> >>>>
> >>>> It's best not to define any  in server.xml. I would remove
> this
> >>>>  entirely and allow Tomcat to auto-reploy from your
> >>>> webapps/towl directory. If you need this application to be deployed as
> >>>> the ROOT context (on / and not /towl) then you should re-name
> >>>> /git/app/apache-tomcat-10.1.11/webapps/towl to
> >>>> /git/app/apache-tomcat-10.1.11/webapps/ROOT
> >>>>
> >>>> You also don't need a  for example.com as well as adding an
> >>>>  for the same domain (though this is probably to anonymize the
> >>>> configuration). You can feel free to simply use the "localhost" 
> >>>> as the default  and deploy everything into it. This makes your
> >>>> configuration changes relative to a stock Tomcat less significant and
> >>>> easier to apply to new versions if/when necessary.
> >>>>
> >>>> -chris
> >>>>
> >>>>> On Thu, Apr 18, 2024 at 2:17 PM Christopher Schultz <
> >>>>> ch...@christopherschultz.net> wrote:
> >>>>>
> >>>>>> Ammu,
> >>>>>>
> >>>>>> On 4/18/24 07:45, lavanya tech wrote:
> >>>>>>> I added classname rewrite valeus in contex.xml file .
> >>>>>>>
> >>>>>>> 
> >>>>>>>  >>>> className="org.apache.catalina.valves.rewrite.RewriteValve"
> >>>>>> />
> >>>>>>> 
> >>>>>>>
> >>>>>>> created rewrite.config so both of them is located under  conf under
> >>>>>>> apache-tomcat.
> >>>>>>>
> >>>>>>>
> >>>>>>>  >>>>>>>  >>>>>>> https://www.example.com:/example [R=301,L]
> >>>>>>>
> >>>>>>> So according to the documentaion they say context.xml should be
> >> placed
> >>>>>>> under webapps and rewrite.config file should be put in WEB-INF
> folder
> >>>> of
> >>>>>>

Re: Regarding Tomcat url redirection

2024-04-23 Thread Christopher Schultz
 <
ch...@christopherschultz.net> wrote:


Ammu,

On 4/18/24 07:45, lavanya tech wrote:

I added classname rewrite valeus in contex.xml file .



className="org.apache.catalina.valves.rewrite.RewriteValve"

/>



created rewrite.config so both of them is located under  conf under
apache-tomcat.


https://www.example.com:/example [R=301,L]

So according to the documentaion they say context.xml should be

placed

under webapps and rewrite.config file should be put in WEB-INF folder

of

apache-tomcat . I placed and restarted tomcat webserver but still it
doesnot redirect.


Can you give full paths to both server.xml and rewrite.config, re-post
your current server.xml  element, and the complete contents

of

rewrite.config?

Have you looked at the log files after start?

-chris


On Thu, Apr 18, 2024 at 1:36 PM lavanya tech <

lavanyatech...@gmail.com



wrote:


Hi Thomas,

Thanks for the fast response.

I added classname rewrite valeus in contex.xml file .



className="org.apache.catalina.valves.rewrite.RewriteValve"

/>



created rewrite.config so both of them is located under  conf under
apache-tomcat.

So according to the documentaion they say context.xml should be

placed

under webapps and rewrite.config file should be put in WEB-INF

folder

of

apache-tomcat

Thnks,
Ammu



On Thu, Apr 18, 2024 at 1:22 PM Mark Thomas 

wrote:



On 18/04/2024 12:05, lavanya tech wrote:

Hi Team,

I am using "Tomcat 10.1" in our environment and I wanted to

redirect

url

from https://example.com to https://www.servercom: and for

this i

modified the server.xml as below in tomcat config, and the below
configuration doesnot seems to work. Does anyone has ideas. Please

suggest.

The url alone https://www.servercom:/ already works. But just
redirection from the old to one doesnot.


autoDeploy="true">

 
 example.com
 
 
className="org.apache.catalina.valves.rewrite.RewriteValve"/>

 
 
unpackWARs="true"

autoDeploy="true">
 
 example.com
 
className="org.apache.catalina.valves.rewrite.RewriteValve"/>

 
 
 
 example.com
 
 
[NC]

 https://www.servercom:/example/$1 [R=301,L]


1. That isn't valid XML.

2. Where in the Tomcat docs does it say you can nest re-write rules

in

a

Host element (or any other element)?


 
 
 
 



You need to configure the RewriteValve.
https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html

Mark



-

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






-
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: Regarding Tomcat url redirection

2024-04-22 Thread lavanya tech
gt; 
>> >>
>> >> It's best not to define any  in server.xml. I would remove
>> this
>> >>  entirely and allow Tomcat to auto-reploy from your
>> >> webapps/towl directory. If you need this application to be deployed as
>> >> the ROOT context (on / and not /towl) then you should re-name
>> >> /git/app/apache-tomcat-10.1.11/webapps/towl to
>> >> /git/app/apache-tomcat-10.1.11/webapps/ROOT
>> >>
>> >> You also don't need a  for example.com as well as adding an
>> >>  for the same domain (though this is probably to anonymize the
>> >> configuration). You can feel free to simply use the "localhost" 
>> >> as the default  and deploy everything into it. This makes your
>> >> configuration changes relative to a stock Tomcat less significant and
>> >> easier to apply to new versions if/when necessary.
>> >>
>> >> -chris
>> >>
>> >>> On Thu, Apr 18, 2024 at 2:17 PM Christopher Schultz <
>> >>> ch...@christopherschultz.net> wrote:
>> >>>
>> >>>> Ammu,
>> >>>>
>> >>>> On 4/18/24 07:45, lavanya tech wrote:
>> >>>>> I added classname rewrite valeus in contex.xml file .
>> >>>>>
>> >>>>>
>> >>>>>> >> className="org.apache.catalina.valves.rewrite.RewriteValve"
>> >>>> />
>> >>>>>
>> >>>>>
>> >>>>> created rewrite.config so both of them is located under  conf under
>> >>>>> apache-tomcat.
>> >>>>>
>> >>>>>
>> >>>>>> >>>>>> >>>>> https://www.example.com:/example [R=301,L]
>> >>>>>
>> >>>>> So according to the documentaion they say context.xml should be
>> placed
>> >>>>> under webapps and rewrite.config file should be put in WEB-INF
>> folder
>> >> of
>> >>>>> apache-tomcat . I placed and restarted tomcat webserver but still it
>> >>>>> doesnot redirect.
>> >>>>
>> >>>> Can you give full paths to both server.xml and rewrite.config,
>> re-post
>> >>>> your current server.xml  element, and the complete contents
>> of
>> >>>> rewrite.config?
>> >>>>
>> >>>> Have you looked at the log files after start?
>> >>>>
>> >>>> -chris
>> >>>>
>> >>>>> On Thu, Apr 18, 2024 at 1:36 PM lavanya tech <
>> lavanyatech...@gmail.com
>> >>>
>> >>>>> wrote:
>> >>>>>
>> >>>>>> Hi Thomas,
>> >>>>>>
>> >>>>>> Thanks for the fast response.
>> >>>>>>
>> >>>>>> I added classname rewrite valeus in contex.xml file .
>> >>>>>>
>> >>>>>>
>> >>>>>>> >> className="org.apache.catalina.valves.rewrite.RewriteValve"
>> >>>> />
>> >>>>>>
>> >>>>>>
>> >>>>>> created rewrite.config so both of them is located under  conf under
>> >>>>>> apache-tomcat.
>> >>>>>>
>> >>>>>> So according to the documentaion they say context.xml should be
>> placed
>> >>>>>> under webapps and rewrite.config file should be put in WEB-INF
>> folder
>> >> of
>> >>>>>> apache-tomcat
>> >>>>>>
>> >>>>>> Thnks,
>> >>>>>> Ammu
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> On Thu, Apr 18, 2024 at 1:22 PM Mark Thomas 
>> wrote:
>> >>>>>>
>> >>>>>>> On 18/04/2024 12:05, lavanya tech wrote:
>> >>>>>>>> Hi Team,
>> >>>>>>>>
>> >>>>>>>> I am using "Tomcat 10.1" in our environment and I wanted to
>> redirect
>> >>>> url
>> >>>>>>>> from https://example.com to https://www.servercom: and for
>> >> this i
>> >>>>>>>> modified the server.xml as below in tomcat config, and the below
>> >>>>>>>> configuration doesnot seems to work. Does anyone has ideas.
>> Please
>> >>>>>>> suggest.
>> >>>>>>>> The url alone https://www.servercom:/ already works. But
>> just
>> >>>>>>>> redirection from the old to one doesnot.
>> >>>>>>>>
>> >>>>>>>> > >>>>>>> autoDeploy="true">
>> >>>>>>>> 
>> >>>>>>>> example.com
>> >>>>>>>> 
>> >>>>>>>> > >>>>>>> className="org.apache.catalina.valves.rewrite.RewriteValve"/>
>> >>>>>>>> 
>> >>>>>>>> > unpackWARs="true"
>> >>>>>>>> autoDeploy="true">
>> >>>>>>>> 
>> >>>>>>>> example.com
>> >>>>>>>> > >>>>>>> className="org.apache.catalina.valves.rewrite.RewriteValve"/>
>> >>>>>>>> 
>> >>>>>>>> > >>>>>>>> unpackWARs="true" autoDeploy="true">
>> >>>>>>>> 
>> >>>>>>>> example.com
>> >>>>>>>> 
>> >>>>>>>> > [NC]
>> >>>>>>>> > >>>>>>>> https://www.servercom:/example/$1 [R=301,L]
>> >>>>>>>
>> >>>>>>> 1. That isn't valid XML.
>> >>>>>>>
>> >>>>>>> 2. Where in the Tomcat docs does it say you can nest re-write
>> rules
>> >> in
>> >>>> a
>> >>>>>>> Host element (or any other element)?
>> >>>>>>>
>> >>>>>>>> 
>> >>>>>>>> 
>> >>>>>>>> 
>> >>>>>>>> 
>> >>>>>>>> 
>> >>>>>>>
>> >>>>>>> You need to configure the RewriteValve.
>> >>>>>>> https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html
>> >>>>>>>
>> >>>>>>> Mark
>> >>>>>>>
>> >>>>>>>
>> -
>> >>>>>>> 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
>> >>
>> >>
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>


Re: Regarding Tomcat url redirection

2024-04-22 Thread lavanya tech
 new versions if/when necessary.
> >>
> >> -chris
> >>
> >>> On Thu, Apr 18, 2024 at 2:17 PM Christopher Schultz <
> >>> ch...@christopherschultz.net> wrote:
> >>>
> >>>> Ammu,
> >>>>
> >>>> On 4/18/24 07:45, lavanya tech wrote:
> >>>>> I added classname rewrite valeus in contex.xml file .
> >>>>>
> >>>>>
> >>>>> >> className="org.apache.catalina.valves.rewrite.RewriteValve"
> >>>> />
> >>>>>
> >>>>>
> >>>>> created rewrite.config so both of them is located under  conf under
> >>>>> apache-tomcat.
> >>>>>
> >>>>>
> >>>>> >>>>> >>>>> https://www.example.com:/example [R=301,L]
> >>>>>
> >>>>> So according to the documentaion they say context.xml should be
> placed
> >>>>> under webapps and rewrite.config file should be put in WEB-INF folder
> >> of
> >>>>> apache-tomcat . I placed and restarted tomcat webserver but still it
> >>>>> doesnot redirect.
> >>>>
> >>>> Can you give full paths to both server.xml and rewrite.config, re-post
> >>>> your current server.xml  element, and the complete contents
> of
> >>>> rewrite.config?
> >>>>
> >>>> Have you looked at the log files after start?
> >>>>
> >>>> -chris
> >>>>
> >>>>> On Thu, Apr 18, 2024 at 1:36 PM lavanya tech <
> lavanyatech...@gmail.com
> >>>
> >>>>> wrote:
> >>>>>
> >>>>>> Hi Thomas,
> >>>>>>
> >>>>>> Thanks for the fast response.
> >>>>>>
> >>>>>> I added classname rewrite valeus in contex.xml file .
> >>>>>>
> >>>>>>
> >>>>>> >> className="org.apache.catalina.valves.rewrite.RewriteValve"
> >>>> />
> >>>>>>
> >>>>>>
> >>>>>> created rewrite.config so both of them is located under  conf under
> >>>>>> apache-tomcat.
> >>>>>>
> >>>>>> So according to the documentaion they say context.xml should be
> placed
> >>>>>> under webapps and rewrite.config file should be put in WEB-INF
> folder
> >> of
> >>>>>> apache-tomcat
> >>>>>>
> >>>>>> Thnks,
> >>>>>> Ammu
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Thu, Apr 18, 2024 at 1:22 PM Mark Thomas 
> wrote:
> >>>>>>
> >>>>>>> On 18/04/2024 12:05, lavanya tech wrote:
> >>>>>>>> Hi Team,
> >>>>>>>>
> >>>>>>>> I am using "Tomcat 10.1" in our environment and I wanted to
> redirect
> >>>> url
> >>>>>>>> from https://example.com to https://www.servercom: and for
> >> this i
> >>>>>>>> modified the server.xml as below in tomcat config, and the below
> >>>>>>>> configuration doesnot seems to work. Does anyone has ideas. Please
> >>>>>>> suggest.
> >>>>>>>> The url alone https://www.servercom:/ already works. But just
> >>>>>>>> redirection from the old to one doesnot.
> >>>>>>>>
> >>>>>>>>  >>>>>>> autoDeploy="true">
> >>>>>>>> 
> >>>>>>>> example.com
> >>>>>>>> 
> >>>>>>>>  >>>>>>> className="org.apache.catalina.valves.rewrite.RewriteValve"/>
> >>>>>>>> 
> >>>>>>>>  unpackWARs="true"
> >>>>>>>> autoDeploy="true">
> >>>>>>>> 
> >>>>>>>> example.com
> >>>>>>>>  >>>>>>> className="org.apache.catalina.valves.rewrite.RewriteValve"/>
> >>>>>>>> 
> >>>>>>>>  >>>>>>>> unpackWARs="true" autoDeploy="true">
> >>>>>>>> 
> >>>>>>>> example.com
> >>>>>>>> 
> >>>>>>>>  [NC]
> >>>>>>>>  >>>>>>>> https://www.servercom:/example/$1 [R=301,L]
> >>>>>>>
> >>>>>>> 1. That isn't valid XML.
> >>>>>>>
> >>>>>>> 2. Where in the Tomcat docs does it say you can nest re-write rules
> >> in
> >>>> a
> >>>>>>> Host element (or any other element)?
> >>>>>>>
> >>>>>>>> 
> >>>>>>>> 
> >>>>>>>> 
> >>>>>>>> 
> >>>>>>>> 
> >>>>>>>
> >>>>>>> You need to configure the RewriteValve.
> >>>>>>> https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html
> >>>>>>>
> >>>>>>> Mark
> >>>>>>>
> >>>>>>>
> -
> >>>>>>> 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
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Regarding Tomcat url redirection

2024-04-19 Thread Christopher Schultz
24 at 1:22 PM Mark Thomas  wrote:


On 18/04/2024 12:05, lavanya tech wrote:

Hi Team,

I am using "Tomcat 10.1" in our environment and I wanted to redirect

url

from https://example.com to https://www.servercom: and for

this i

modified the server.xml as below in tomcat config, and the below
configuration doesnot seems to work. Does anyone has ideas. Please

suggest.

The url alone https://www.servercom:/ already works. But just
redirection from the old to one doesnot.


autoDeploy="true">


example.com


className="org.apache.catalina.valves.rewrite.RewriteValve"/>




example.com

className="org.apache.catalina.valves.rewrite.RewriteValve"/>




example.com

https://www.servercom:/example/$1 [R=301,L]


1. That isn't valid XML.

2. Where in the Tomcat docs does it say you can nest re-write rules

in

a

Host element (or any other element)?









You need to configure the RewriteValve.
https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html

Mark

-
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






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



Re: Regarding Tomcat url redirection

2024-04-19 Thread lavanya tech
Hi Chris,

Thank you very much. I removed  for example.com as well as adding an
 in server.xml
I copied context.xml file
/git/app/apache-tomcat-10.1.11/webapps/towl/META-INF/context.xml
Removed < in rewrite.config files.

But still I dont redirect the URL.

For your information






*nslookup alias.example.com <http://alias.example.com>
gives-->Non-authoritative answer:Name: www.example.com
<http://www.example.com>Address:  192.168.200.10Aliases:  alias.example.com
<http://alias.example.com>*


Just to give some information here, *www.example.com
<http://www.example.com>* has alias* "alias.example.com
<http://alias.example.com>"*
But https://www.example.com:/example --> works fine with out issues but
the alias doesnot works (https://alias.example.com)
So i am not sure if the redirect url helps or if its correct

Looking for some suggestions.

Thanks
Ammu

On Fri, Apr 19, 2024 at 1:21 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Ammu,
>
> On 4/18/24 09:34, lavanya tech wrote:
> > I am attaching server.xml and context.xml and rewrite.config files.
> > The paths are
> >
> > /git/app/apache-tomcat-10.1.11/webapps/towl/context.xml
> > 
> >   />
> >  
> > 
>
> This file ^^^ is in the wrong place. It should be in
> /git/app/apache-tomcat-10.1.11/webapps/towl/META-INF/context.xml
>
> > /git/app/apache-tomcat-10.1.11/webapps/towl/WEB-INF/rewrite.config
> >
> >  > https://www.example.com:/example [R=301,L]
>
> Why do you have < symbols at the beginning of these lines?
>
> > server.xml
> >
>  > [...]
> >
> > > autoDeploy="true">
> >
>
> It's best not to define any  in server.xml. I would remove this
>  entirely and allow Tomcat to auto-reploy from your
> webapps/towl directory. If you need this application to be deployed as
> the ROOT context (on / and not /towl) then you should re-name
> /git/app/apache-tomcat-10.1.11/webapps/towl to
> /git/app/apache-tomcat-10.1.11/webapps/ROOT
>
> You also don't need a  for example.com as well as adding an
>  for the same domain (though this is probably to anonymize the
> configuration). You can feel free to simply use the "localhost" 
> as the default  and deploy everything into it. This makes your
> configuration changes relative to a stock Tomcat less significant and
> easier to apply to new versions if/when necessary.
>
> -chris
>
> > On Thu, Apr 18, 2024 at 2:17 PM Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> >> Ammu,
> >>
> >> On 4/18/24 07:45, lavanya tech wrote:
> >>> I added classname rewrite valeus in contex.xml file .
> >>>
> >>>   
> >>>className="org.apache.catalina.valves.rewrite.RewriteValve"
> >> />
> >>>   
> >>>
> >>> created rewrite.config so both of them is located under  conf under
> >>> apache-tomcat.
> >>>
> >>>
> >>>>>>>>> https://www.example.com:/example [R=301,L]
> >>>
> >>> So according to the documentaion they say context.xml should be placed
> >>> under webapps and rewrite.config file should be put in WEB-INF folder
> of
> >>> apache-tomcat . I placed and restarted tomcat webserver but still it
> >>> doesnot redirect.
> >>
> >> Can you give full paths to both server.xml and rewrite.config, re-post
> >> your current server.xml  element, and the complete contents of
> >> rewrite.config?
> >>
> >> Have you looked at the log files after start?
> >>
> >> -chris
> >>
> >>> On Thu, Apr 18, 2024 at 1:36 PM lavanya tech  >
> >>> wrote:
> >>>
> >>>> Hi Thomas,
> >>>>
> >>>> Thanks for the fast response.
> >>>>
> >>>> I added classname rewrite valeus in contex.xml file .
> >>>>
> >>>>   
> >>>>className="org.apache.catalina.valves.rewrite.RewriteValve"
> >> />
> >>>>   
> >>>>
> >>>> created rewrite.config so both of them is located under  conf under
> >>>> apache-tomcat.
> >>>>
> >>>> So according to the documentaion they say context.xml should be placed
> >>>> under webapps and rewrite.config file should be put in WEB-INF folder
> of

Re: Regarding Tomcat url redirection

2024-04-19 Thread Christopher Schultz

Ammu,

On 4/18/24 09:34, lavanya tech wrote:

I am attaching server.xml and context.xml and rewrite.config files.
The paths are

/git/app/apache-tomcat-10.1.11/webapps/towl/context.xml

 
 



This file ^^^ is in the wrong place. It should be in 
/git/app/apache-tomcat-10.1.11/webapps/towl/META-INF/context.xml



/git/app/apache-tomcat-10.1.11/webapps/towl/WEB-INF/rewrite.config

https://www.example.com:/example [R=301,L]


Why do you have < symbols at the beginning of these lines?


server.xml


> [...]


   
   


It's best not to define any  in server.xml. I would remove this 
 entirely and allow Tomcat to auto-reploy from your 
webapps/towl directory. If you need this application to be deployed as 
the ROOT context (on / and not /towl) then you should re-name 
/git/app/apache-tomcat-10.1.11/webapps/towl to 
/git/app/apache-tomcat-10.1.11/webapps/ROOT


You also don't need a  for example.com as well as adding an 
 for the same domain (though this is probably to anonymize the 
configuration). You can feel free to simply use the "localhost"  
as the default  and deploy everything into it. This makes your 
configuration changes relative to a stock Tomcat less significant and 
easier to apply to new versions if/when necessary.


-chris


On Thu, Apr 18, 2024 at 2:17 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:


Ammu,

On 4/18/24 07:45, lavanya tech wrote:

I added classname rewrite valeus in contex.xml file .

  
  
/>

  

created rewrite.config so both of them is located under  conf under
apache-tomcat.


  https://www.example.com:/example [R=301,L]

So according to the documentaion they say context.xml should be placed
under webapps and rewrite.config file should be put in WEB-INF folder of
apache-tomcat . I placed and restarted tomcat webserver but still it
doesnot redirect.


Can you give full paths to both server.xml and rewrite.config, re-post
your current server.xml  element, and the complete contents of
rewrite.config?

Have you looked at the log files after start?

-chris


On Thu, Apr 18, 2024 at 1:36 PM lavanya tech 
wrote:


Hi Thomas,

Thanks for the fast response.

I added classname rewrite valeus in contex.xml file .

  
  
/>

  

created rewrite.config so both of them is located under  conf under
apache-tomcat.

So according to the documentaion they say context.xml should be placed
under webapps and rewrite.config file should be put in WEB-INF folder of
apache-tomcat

Thnks,
Ammu



On Thu, Apr 18, 2024 at 1:22 PM Mark Thomas  wrote:


On 18/04/2024 12:05, lavanya tech wrote:

Hi Team,

I am using "Tomcat 10.1" in our environment and I wanted to redirect

url

from https://example.com to https://www.servercom: and for this i
modified the server.xml as below in tomcat config, and the below
configuration doesnot seems to work. Does anyone has ideas. Please

suggest.

The url alone https://www.servercom:7777/ already works. But just
redirection from the old to one doesnot.


autoDeploy="true">

   
   example.com
   
   
className="org.apache.catalina.valves.rewrite.RewriteValve"/>

   
   
   
   example.com
   
className="org.apache.catalina.valves.rewrite.RewriteValve"/>

   
   
   
   example.com
   
   https://www.servercom:/example/$1 [R=301,L]


1. That isn't valid XML.

2. Where in the Tomcat docs does it say you can nest re-write rules in

a

Host element (or any other element)?


   
   
   
   



You need to configure the RewriteValve.
https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html

Mark

-
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: Regarding Tomcat url redirection

2024-04-18 Thread lavanya tech
Hi Chris,

Thanks for message,

I am attaching server.xml and context.xml and rewrite.config files.
The paths are

/git/app/apache-tomcat-10.1.11/webapps/towl/context.xml





/git/app/apache-tomcat-10.1.11/webapps/towl/WEB-INF/rewrite.config

https://www.example.com:/example [R=301,L]

server.xml






  
  
  
  
  
  
  
  

  
  


  

  
  



























  
  

  
  


  

  
  
  example.com
  
  







  

  


Thanks
Ammu

On Thu, Apr 18, 2024 at 2:17 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Ammu,
>
> On 4/18/24 07:45, lavanya tech wrote:
> > I added classname rewrite valeus in contex.xml file .
> >
> >  
> >   />
> >  
> >
> > created rewrite.config so both of them is located under  conf under
> > apache-tomcat.
> >
> >
> >   >   > https://www.example.com:/example [R=301,L]
> >
> > So according to the documentaion they say context.xml should be placed
> > under webapps and rewrite.config file should be put in WEB-INF folder of
> > apache-tomcat . I placed and restarted tomcat webserver but still it
> > doesnot redirect.
>
> Can you give full paths to both server.xml and rewrite.config, re-post
> your current server.xml  element, and the complete contents of
> rewrite.config?
>
> Have you looked at the log files after start?
>
> -chris
>
> > On Thu, Apr 18, 2024 at 1:36 PM lavanya tech 
> > wrote:
> >
> >> Hi Thomas,
> >>
> >> Thanks for the fast response.
> >>
> >> I added classname rewrite valeus in contex.xml file .
> >>
> >>  
> >>   />
> >>  
> >>
> >> created rewrite.config so both of them is located under  conf under
> >> apache-tomcat.
> >>
> >> So according to the documentaion they say context.xml should be placed
> >> under webapps and rewrite.config file should be put in WEB-INF folder of
> >> apache-tomcat
> >>
> >> Thnks,
> >> Ammu
> >>
> >>
> >>
> >> On Thu, Apr 18, 2024 at 1:22 PM Mark Thomas  wrote:
> >>
> >>> On 18/04/2024 12:05, lavanya tech wrote:
> >>>> Hi Team,
> >>>>
> >>>> I am using "Tomcat 10.1" in our environment and I wanted to redirect
> url
> >>>> from https://example.com to https://www.servercom: and for this i
> >>>> modified the server.xml as below in tomcat config, and the below
> >>>> configuration doesnot seems to work. Does anyone has ideas. Please
> >>> suggest.
> >>>> The url alone https://www.servercom:/ already works. But just
> >>>> redirection from the old to one doesnot.
> >>>>
> >>>>  >>> autoDeploy="true">
> >>>>   
> >>>>   example.com
> >>>>   
> >>>>>>> className="org.apache.catalina.valves.rewrite.RewriteValve"/>
> >>>>   
> >>>>>>>> autoDeploy="true">
> >>>>   
> >>>>   example.com
> >>>>>>> className="org.apache.catalina.valves.rewrite.RewriteValve"/>
> >>>>   
> >>>>>>>> unpackWARs="true" autoDeploy="true">
> >>>>   
> >>>>   example.com
> >>>>   
> >>>>>>>>>>>> https://www.servercom:/example/$1 [R=301,L]
> >>>
> >>> 1. That isn't valid XML.
> >>>
> >>> 2. Where in the Tomcat docs does it say you can nest re-write rules in
> a
> >>> Host element (or any other element)?
> >>>
> >>>>   
> >>>>   
> >>>>   
> >>>>   
> >>>> 
> >>>
> >>> You need to configure the RewriteValve.
> >>> https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html
> >>>
> >>> Mark
> >>>
> >>> -
> >>> 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: Regarding Tomcat url redirection

2024-04-18 Thread Christopher Schultz

Ammu,

On 4/18/24 07:45, lavanya tech wrote:

I added classname rewrite valeus in contex.xml file .

 
 
 

created rewrite.config so both of them is located under  conf under
apache-tomcat.


 https://www.example.com:/example [R=301,L]

So according to the documentaion they say context.xml should be placed
under webapps and rewrite.config file should be put in WEB-INF folder of
apache-tomcat . I placed and restarted tomcat webserver but still it
doesnot redirect.


Can you give full paths to both server.xml and rewrite.config, re-post 
your current server.xml  element, and the complete contents of 
rewrite.config?


Have you looked at the log files after start?

-chris


On Thu, Apr 18, 2024 at 1:36 PM lavanya tech 
wrote:


Hi Thomas,

Thanks for the fast response.

I added classname rewrite valeus in contex.xml file .

 
 
 

created rewrite.config so both of them is located under  conf under
apache-tomcat.

So according to the documentaion they say context.xml should be placed
under webapps and rewrite.config file should be put in WEB-INF folder of
apache-tomcat

Thnks,
Ammu



On Thu, Apr 18, 2024 at 1:22 PM Mark Thomas  wrote:


On 18/04/2024 12:05, lavanya tech wrote:

Hi Team,

I am using "Tomcat 10.1" in our environment and I wanted to redirect url
from https://example.com to https://www.servercom: and for this i
modified the server.xml as below in tomcat config, and the below
configuration doesnot seems to work. Does anyone has ideas. Please

suggest.

The url alone https://www.servercom:/ already works. But just
redirection from the old to one doesnot.


autoDeploy="true">

  
  example.com
  
  
className="org.apache.catalina.valves.rewrite.RewriteValve"/>

  
  
  
  example.com
  
className="org.apache.catalina.valves.rewrite.RewriteValve"/>

  
  
  
  example.com
  
  https://www.servercom:/example/$1 [R=301,L]


1. That isn't valid XML.

2. Where in the Tomcat docs does it say you can nest re-write rules in a
Host element (or any other element)?


  
  
  
  



You need to configure the RewriteValve.
https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html

Mark

-
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: Regarding Tomcat url redirection

2024-04-18 Thread lavanya tech
Hi Thomas,

Thanks for the fast response.

I added classname rewrite valeus in contex.xml file .





created rewrite.config so both of them is located under  conf under
apache-tomcat.


https://www.example.com:/example [R=301,L]

So according to the documentaion they say context.xml should be placed
under webapps and rewrite.config file should be put in WEB-INF folder of
apache-tomcat . I placed and restarted tomcat webserver but still it
doesnot redirect.


Thnks,
Ammu

On Thu, Apr 18, 2024 at 1:36 PM lavanya tech 
wrote:

> Hi Thomas,
>
> Thanks for the fast response.
>
> I added classname rewrite valeus in contex.xml file .
>
> 
> 
> 
>
> created rewrite.config so both of them is located under  conf under
> apache-tomcat.
>
> So according to the documentaion they say context.xml should be placed
> under webapps and rewrite.config file should be put in WEB-INF folder of
> apache-tomcat
>
> Thnks,
> Ammu
>
>
>
> On Thu, Apr 18, 2024 at 1:22 PM Mark Thomas  wrote:
>
>> On 18/04/2024 12:05, lavanya tech wrote:
>> > Hi Team,
>> >
>> > I am using "Tomcat 10.1" in our environment and I wanted to redirect url
>> > from https://example.com to https://www.servercom: and for this i
>> > modified the server.xml as below in tomcat config, and the below
>> > configuration doesnot seems to work. Does anyone has ideas. Please
>> suggest.
>> > The url alone https://www.servercom:/ already works. But just
>> > redirection from the old to one doesnot.
>> >
>> > > autoDeploy="true">
>> >  
>> >  example.com
>> >  
>> >  > className="org.apache.catalina.valves.rewrite.RewriteValve"/>
>> >  
>> >  > > autoDeploy="true">
>> >  
>> >  example.com
>> >  > className="org.apache.catalina.valves.rewrite.RewriteValve"/>
>> >  
>> >  > > unpackWARs="true" autoDeploy="true">
>> >  
>> >  example.com
>> >  
>> >  > >  > > https://www.servercom:/example/$1 [R=301,L]
>>
>> 1. That isn't valid XML.
>>
>> 2. Where in the Tomcat docs does it say you can nest re-write rules in a
>> Host element (or any other element)?
>>
>> >  
>> >  
>> >  
>> >  
>> > 
>>
>> You need to configure the RewriteValve.
>> https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html
>>
>> Mark
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>


Re: Regarding Tomcat url redirection

2024-04-18 Thread lavanya tech
Hi Thomas,

Thanks for the fast response.

I added classname rewrite valeus in contex.xml file .





created rewrite.config so both of them is located under  conf under
apache-tomcat.

So according to the documentaion they say context.xml should be placed
under webapps and rewrite.config file should be put in WEB-INF folder of
apache-tomcat

Thnks,
Ammu



On Thu, Apr 18, 2024 at 1:22 PM Mark Thomas  wrote:

> On 18/04/2024 12:05, lavanya tech wrote:
> > Hi Team,
> >
> > I am using "Tomcat 10.1" in our environment and I wanted to redirect url
> > from https://example.com to https://www.servercom: and for this i
> > modified the server.xml as below in tomcat config, and the below
> > configuration doesnot seems to work. Does anyone has ideas. Please
> suggest.
> > The url alone https://www.servercom:/ already works. But just
> > redirection from the old to one doesnot.
> >
> >  autoDeploy="true">
> >  
> >  example.com
> >  
> >  
> >  
> >   > autoDeploy="true">
> >  
> >  example.com
> >   className="org.apache.catalina.valves.rewrite.RewriteValve"/>
> >  
> >   > unpackWARs="true" autoDeploy="true">
> >  
> >  example.com
> >  
> >   >   > https://www.servercom:/example/$1 [R=301,L]
>
> 1. That isn't valid XML.
>
> 2. Where in the Tomcat docs does it say you can nest re-write rules in a
> Host element (or any other element)?
>
> >  
> >  
> >  
> >  
> > 
>
> You need to configure the RewriteValve.
> https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Regarding Tomcat url redirection

2024-04-18 Thread Mark Thomas

On 18/04/2024 12:05, lavanya tech wrote:

Hi Team,

I am using "Tomcat 10.1" in our environment and I wanted to redirect url
from https://example.com to https://www.servercom: and for this i
modified the server.xml as below in tomcat config, and the below
configuration doesnot seems to work. Does anyone has ideas. Please suggest.
The url alone https://www.servercom:/ already works. But just
redirection from the old to one doesnot.


 
 example.com
 
 
 
 
 
 example.com
 
 
 
 
 example.com
 
 https://www.servercom:/example/$1 [R=301,L]


1. That isn't valid XML.

2. Where in the Tomcat docs does it say you can nest re-write rules in a 
Host element (or any other element)?



 
 
 
 



You need to configure the RewriteValve.
https://tomcat.apache.org/tomcat-10.1-doc/rewrite.html

Mark

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



Re: Regarding Tomcat url redirection

2024-04-18 Thread lavanya tech
Hi Team,

I am using "Tomcat 10.1" in our environment and I wanted to redirect url
from https://example.com to https://www.servercom: and for this i
modified the server.xml as below in tomcat config, and the below
configuration doesnot seems to work. Does anyone has ideas. Please suggest.
The url alone https://www.servercom:/ already works. But just
redirection from the old to one doesnot.



example.com





example.com




example.com

https://www.servercom:/example/$1 [R=301,L]








Thanks,
Ammu


Re: Which Connector properties will be used in case of redirection?

2018-01-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Suvendu,

On 1/18/18 2:55 AM, Suvendu Sekhar Mondal wrote:
> Hi Christopher,
> 
> On Wed, Jan 17, 2018 at 10:41 PM, Christopher Schultz 
> <ch...@christopherschultz.net> wrote:
>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
>> 
>> Suvendu,
>> 
>> Which version of Tomcat?
>> 
> 
> Tomcat version is 7.0.55
> 
>> On 1/17/18 8:20 AM, Suvendu Sekhar Mondal wrote:
>>> I am seeing one issue. Under high load sporadically one web 
>>> service call fails with: "java.net.SocketTimeoutException:
>>> Read timed out" after 60 Sec mark.
>>> 
>>> In our app, httpd routes requests to  then it get
>>> redirected to 8889.
>> 
>> Can you be very explicit about what you mean by "redirect",
>> here?
> 
> I was talking about auto redirection from  to 8889 by
> Catalina.
> 
>>> Connector which listens on  has connectionTimeout=2 but
>>> the one which listens to 8889 does not have any
>>> connectionTimeout set explicitly. As per doc, default
>>> connectionTimeout value 60 Sec will be set for connector which
>>> listens on 8889 - and that is playing a role here. Do you think
>>> this assumption is correct?
>>> 
>>> Here are the connector properties: >> protocol="HTTP/1.1" connectionTimeout="2"
>>> redirectPort="8889" />
>> 
>> So you are probably expecting that all HTTP traffic to : will
>> be redirected to HTTPS over :8889?
>> 
> 
> Yes.
> 
>> How long does the redirect take?
>> 
> 
> I do not know how to measure redirection time. Please let me know
> if there any mechanism to trace it.
> 
>> Under heavy load, you might be running out of threads depending
>> upon a lot of factors, such as what kind of protocol and endpoint
>> are actually being used. It looks like you are using the APR
>> connector (due to SSLCertificateFile) which has some positive
>> attributes with request to scalability while NIO would probably
>> be the best choice if possible.
>> 
>> It's got terrible performance, though, unless you use the
>> OpenSSL provider (which requires Tomcat 8.5 or later).
>> 
>>> >> SSLCertificateKeyFile="C:\mykey.key" SSLEnabled="true" 
>>> acceptCount="100" clientAuth="false"
>>> disableUploadTimeout="true" enableLookups="false"
>>> keystoreFile="conf/.keystore" maxHttpHeaderSize="8192"
>>> maxSavePostSize="-1" maxThreads="200" minSpareThreads="20"
>>> protocol="HTTP/1.1" scheme="https" secure="true"
>>> sslProtocol="TLS1.2" 
>>> compressableMimeTypes="text/html,text/xml,text/plain,application/jso
n"
>>>
>>>
>>
>>> 
compressionMinSize="2048"
>>> compression="force" threadPriority="6" />
>> 
>> When you say "high load", what kind of load are you talking
>> about, specifically?
>> 
>> You may simply have too much traffic for your existing hardware
>> to handle. No amount of configuration can fix that. - -chris
> 
> We have 9 JVMs. As per current setting, per JVM max concurrency
> can reach up-to 300(maxThreads="200"+acceptCount="100"). Issue was 
> reported when 2300 users on the system.

So that's 2300 users across all 9 JVMs with the same configuration?
Your cluster ought to be able to support 9 * 200 = 1800 simultaneous
active users plus 9 * 100 = 900 queued in the OS's TCP wait queue.
2300 should be within your capabilities, but it might depend heavily
upon how the load-balancer decided to allocate requests. If it sent
all the users to the same node in the cluster, then you'll see bad
performance even if you "should" be able to handle that much load.

Where is the SocketTimeoutException being thrown? On the server, or on
the client? If it's on the server, then it's the client's fault (or
the load-balancer's fault) and it's not a problem at all with your
server capacity.

If it's happening on the client, it makes a lot more sense that the
server might be overloaded. But that 60-second timeout would have to
be on the client, not on the server side. So I'm a little confused as
to what is going on, here.

> So, I think it is not a case of thread exhaustion but something
> else. Most possibly few JVMs were under stress due to uneven load 
> balancing(we have stickysession). This issue just came to me and
> all resource usage data are gone. I have ask

Re: Which Connector properties will be used in case of redirection?

2018-01-17 Thread Suvendu Sekhar Mondal
Hi Christopher,

On Wed, Jan 17, 2018 at 10:41 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Suvendu,
>
> Which version of Tomcat?
>

Tomcat version is 7.0.55

> On 1/17/18 8:20 AM, Suvendu Sekhar Mondal wrote:
>> I am seeing one issue. Under high load sporadically one web
>> service call fails with: "java.net.SocketTimeoutException: Read
>> timed out" after 60 Sec mark.
>>
>> In our app, httpd routes requests to  then it get redirected
>> to 8889.
>
> Can you be very explicit about what you mean by "redirect", here?

I was talking about auto redirection from  to 8889 by Catalina.

>> Connector which listens on  has connectionTimeout=2 but the
>> one which listens to 8889 does not have any connectionTimeout set
>> explicitly. As per doc, default connectionTimeout value 60 Sec will
>> be set for connector which listens on 8889 - and that is playing a
>> role here. Do you think this assumption is correct?
>>
>> Here are the connector properties: > protocol="HTTP/1.1" connectionTimeout="2" redirectPort="8889"
>> />
>
> So you are probably expecting that all HTTP traffic to : will be
> redirected to HTTPS over :8889?
>

Yes.

> How long does the redirect take?
>

I do not know how to measure redirection time. Please let me know if
there any mechanism to trace it.

> Under heavy load, you might be running out of threads depending upon a
> lot of factors, such as what kind of protocol and endpoint are
> actually being used. It looks like you are using the APR connector
> (due to SSLCertificateFile) which has some positive attributes with
> request to scalability while NIO would probably be the best choice if
> possible.
>
> It's got terrible performance, though, unless you use the OpenSSL
> provider (which requires Tomcat 8.5 or later).
>
>> > SSLCertificateKeyFile="C:\mykey.key" SSLEnabled="true"
>> acceptCount="100" clientAuth="false" disableUploadTimeout="true"
>> enableLookups="false" keystoreFile="conf/.keystore"
>> maxHttpHeaderSize="8192" maxSavePostSize="-1" maxThreads="200"
>> minSpareThreads="20" protocol="HTTP/1.1" scheme="https"
>> secure="true" sslProtocol="TLS1.2"
>> compressableMimeTypes="text/html,text/xml,text/plain,application/json"
>>
>>
> compressionMinSize="2048"
>> compression="force" threadPriority="6" />
>
> When you say "high load", what kind of load are you talking about,
> specifically?
>
> You may simply have too much traffic for your existing hardware to
> handle. No amount of configuration can fix that.
> - -chris

We have 9 JVMs. As per current setting, per JVM max concurrency can
reach up-to 300(maxThreads="200"+acceptCount="100"). Issue was
reported when 2300 users on the system. So, I think it is not a case
of thread exhaustion but something else. Most possibly few JVMs were
under stress due to uneven load balancing(we have stickysession). This
issue just came to me and all resource usage data are gone. I have
asked for re-run so that I can analyze it properly. Let's see. :)

Back to my original question, in case of HTTP to HTTPS auto
redirection, Connector properties set for the later will be finally
applied to the request - is that a correct statement?

Thanks!
Suvendu

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



Re: Which Connector properties will be used in case of redirection?

2018-01-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Suvendu,

Which version of Tomcat?

On 1/17/18 8:20 AM, Suvendu Sekhar Mondal wrote:
> I am seeing one issue. Under high load sporadically one web
> service call fails with: "java.net.SocketTimeoutException: Read
> timed out" after 60 Sec mark.
> 
> In our app, httpd routes requests to  then it get redirected
> to 8889.

Can you be very explicit about what you mean by "redirect", here?

> Connector which listens on  has connectionTimeout=2 but the
> one which listens to 8889 does not have any connectionTimeout set 
> explicitly. As per doc, default connectionTimeout value 60 Sec will
> be set for connector which listens on 8889 - and that is playing a
> role here. Do you think this assumption is correct?
> 
> Here are the connector properties:  protocol="HTTP/1.1" connectionTimeout="2" redirectPort="8889"
> />

So you are probably expecting that all HTTP traffic to : will be
redirected to HTTPS over :8889?

How long does the redirect take?

Under heavy load, you might be running out of threads depending upon a
lot of factors, such as what kind of protocol and endpoint are
actually being used. It looks like you are using the APR connector
(due to SSLCertificateFile) which has some positive attributes with
request to scalability while NIO would probably be the best choice if
possible.

It's got terrible performance, though, unless you use the OpenSSL
provider (which requires Tomcat 8.5 or later).

>  SSLCertificateKeyFile="C:\mykey.key" SSLEnabled="true" 
> acceptCount="100" clientAuth="false" disableUploadTimeout="true" 
> enableLookups="false" keystoreFile="conf/.keystore" 
> maxHttpHeaderSize="8192" maxSavePostSize="-1" maxThreads="200" 
> minSpareThreads="20" protocol="HTTP/1.1" scheme="https" 
> secure="true" sslProtocol="TLS1.2" 
> compressableMimeTypes="text/html,text/xml,text/plain,application/json"
>
> 
compressionMinSize="2048"
> compression="force" threadPriority="6" />

When you say "high load", what kind of load are you talking about,
specifically?

You may simply have too much traffic for your existing hardware to
handle. No amount of configuration can fix that.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlpfg7sdHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFj12Q//WlJMd0JpQJVqFt1z
d3aI52pVFQih3Bii8UOAZzZr6omPqqFlkKt2cnAg8lWA3KQaQLJRyzlJKthIzNsB
12nMQlbQzCJZqn1IzggxtEWNL8KDVFY3fo2heJLrEANrIcXx+C6MAb1FLTeZ2/XP
V9R1u5q8mOdVgPyj4vITIsjn0oaa4pZ/ypkYwRATT9BRBy8rxkzVneDKPo8ILfdZ
Cp1Says1JD4uIEJn9VUlITOC1/08XyeHtrZXR3j3w9A07x9mLdHjVi6yxyyGcMoz
u0X/bt1E+Q6LkfTaQ64ubh2dbPXW4JgQy8I43Qzbxytwc2SdB691Un8lAhdnxaIk
zBioeiR4Kp+ATOuwbSPqJZ8n15pJENp95KvtR7B+xKn2klKMhuXHMb98OwdL7XBu
AeoGW1+RNpEwq1A8l4XmrmvFmrkqKTJVM8kxrPM3lTpTuQcvEtKk0OHOqlD10TGm
ldxP61qBLPK1ekjF/8CWxCO011wIvCoWySI8FDLOeXAo8F0ueBA0okajB2+9usqK
KpMckGQuRsoC6yVKMAz+ej3UCMiqQPSuuK06Pv8UrI7qTRGqRkBtVcSOIucXKC0S
6QrB4Mm6HajD7+d2/bOd4lJGRSSx3IoWNRx62Hthu9H2MTpp1/EWTwc5aesq2Zmo
OVsym/pIs8akxDw3Fkux5Imwr40=
=DLo7
-END PGP SIGNATURE-

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



Which Connector properties will be used in case of redirection?

2018-01-17 Thread Suvendu Sekhar Mondal
Hello Everyone,

I am seeing one issue. Under high load sporadically one web service
call fails with: "java.net.SocketTimeoutException: Read timed out"
after 60 Sec mark.

In our app, httpd routes requests to  then it get redirected to
8889. Connector which listens on  has connectionTimeout=2 but
the one which listens to 8889 does not have any connectionTimeout set
explicitly. As per doc, default connectionTimeout value 60 Sec will be
set for connector which listens on 8889 - and that is playing a role
here. Do you think this assumption is correct?

Here are the connector properties:




Thanks!
Suvendu

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



Re: Redirection/URL rewriting Tomcat 8.5.14

2017-05-12 Thread Daniel Savard
Hi Chris,

2017-05-12 13:31 GMT-04:00 Christopher Schultz <ch...@christopherschultz.net
>:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Daniel,
>
> On 5/12/17 10:03 AM, Daniel Savard wrote:
> > Hi everyone,
> >
> > my question is not specific to the Tomcat version specified in the
> > subject line. I am trying to implement a URL rewrite or
> > redirection using Tomcat. What I want to do is the following:
> >
> > In a given instance of Tomcat, I have each application context
> > setup using the xml files in
> > $CATALINA_BASE/conf/[enginename]/[hostname]/, so far so good. Hence
> > for app1 I then have the URL:
> https://myserver:myport/app1, etc.
> >
> > What I need to do, is to have a dummy application which purpose is
> > just to redirect/rewrite the URL from one application to another.
> > So, I need in fact an empty application capturing each request and
> > send back to the browser a rewritten URL to the another
> > application.
> >
> > For example, suppose I want to redirect app1 to app2, I need to
> rewrite all
> > possible URL with query options and so one replacing only app1 by
> > app2 in the URL.
> >
> > https://myserver:myport/app1/something_more_specific?opt1 should be
> >  rewritten as
> > https://myserver:myport/app2/something_more_specific?opt1
> >
> > To do this, I read about the rewrite valve here:
> > http://tomcat.apache.org/tomcat-8.5-doc/rewrite.html
> >
> > So, I created an empty directory $CATALINA_BASE/webapps/app1 with
> > the following file:
> >
> > $CATALINA_BASE/webapps/app1/WEB-INF/rewrite.config
> >
> > And my $CATALINA_BASE/conf/[enginename]/[hostname]/app1.xml has the
> >  following entry within its context:
> >
> >  > className="org.apache.catalina.valves.rewrite.RewriteValve"/>
> >
> > My rewrite.config file is as follow:
> >
> > RewriteCond %{REQUEST_URI} ^/app1/?.* RewriteRule ^/app1(/?.*)$
> > /app2$1 [L]
> >
> > Without anything else, I am getting a HTTP 404 code. With an empty
> >  index.html I am getting a blank page. Within a working application
> > I am getting the application's welcome page. But never the URL is
> rewritten. The
> > rewrite.config file is actually read, I checked by introducing
> > some typo and I am getting an error message at startup.
> >
> > Is there a way to debug this problem? How can I see what is going
> > on with the execution of the rewriting class?
>
> I think everything you have above is correct, except that you want to
> deploy everything in the ROOT application instead of into "app1". With
> "app1", you are re-writing "/app1/app1" to "/app1/app2" when in fact you
> want to rewrite "/app1" to "/app2", correct?
>
> Also, it's important that /app1 not be a deployed application, otherwise
> requests to that context path with be sent to the /app1 application
> instead of to the ROOT webapp.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJZFfGGAAoJEBzwKT+lPKRYlfsQAK9+rFzKtrrPS73Ma9VDclkn
> Lr3oG65TdKPhwVEtQlQoxLggX3GLiepImPzjY52rnMhxCZj+tt5n/fCkqVzEPnIp
> /NNgz/nX/GWqYjU11V58Azh2GRrjBqCJmesawxB/Y5+2NjcW6PrXJNje5PBmkbjs
> QkI5ftAYih7zxWQ4yASJfYwOmmjPpdNfyEM0IR/qkh/VnTz5bVu0/EgeOOK0/Dny
> EsK+3ptm+gdTNVt9jqwEnhWx5tsgpanhTycyyagwROT2A7NaldIi7xARPW3ZlSSF
> 0ncvQ8Z3G0KolBsGsDVyNgNv+bF38sfxOaN7xyp9GXFJVX5hKfRFBphiWPl+jjzz
> mwPcA3MsqDM3fQ4hMTAffmnUAj786pTZ6MCjDnumFjnQZB0zXASEpfI4G9f3+dKM
> fiVdjUQxgrXlUl6wcqBGUidN5PDb+akY8w9xNDl3PvBjrXfFIIfttLgGmxF5cej6
> dkvLqZoitIDzt8dOkWSns3UdK+fq3a1Hjw1BOPlvnvKbnhz2QXrxua6WMDQapohs
> JUUkAR3sujPUs/Tgjq5SiIEBe9sbwQTysNgtw9MzFUmAB7D87cCt0zI8dCbaL54Z
> iYUI0+IDVG7rc7+TwFeRo+ok96qMK1IKCiZt/8pe/097WcWMQq9FeYpGAg4YgZYo
> bwhJFBohEZeuwZCwhN9F
> =J7pC
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
Thanks for the tip. I am almost there. Actually, moving everything in ROOT
solved at least the actual execution of the rewriting. However, it didn't
solve entirely my problem.

If I access the URL: https://myhost/app1 in my browser the URL is actually
rewritten to https://myhost/app2 and access the index.html, etc. This is
fine.

However, if I try to access the URL: https://myhost/app1/ in my browser the
URL is NOT rewritten even if the actual application is properly accessed. I
real

Re: Redirection/URL rewriting Tomcat 8.5.14

2017-05-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Daniel,

On 5/12/17 10:03 AM, Daniel Savard wrote:
> Hi everyone,
> 
> my question is not specific to the Tomcat version specified in the 
> subject line. I am trying to implement a URL rewrite or
> redirection using Tomcat. What I want to do is the following:
> 
> In a given instance of Tomcat, I have each application context
> setup using the xml files in
> $CATALINA_BASE/conf/[enginename]/[hostname]/, so far so good. Hence
> for app1 I then have the URL:
https://myserver:myport/app1, etc.
> 
> What I need to do, is to have a dummy application which purpose is 
> just to redirect/rewrite the URL from one application to another.
> So, I need in fact an empty application capturing each request and
> send back to the browser a rewritten URL to the another
> application.
> 
> For example, suppose I want to redirect app1 to app2, I need to
rewrite all
> possible URL with query options and so one replacing only app1 by 
> app2 in the URL.
> 
> https://myserver:myport/app1/something_more_specific?opt1 should be
>  rewritten as 
> https://myserver:myport/app2/something_more_specific?opt1
> 
> To do this, I read about the rewrite valve here: 
> http://tomcat.apache.org/tomcat-8.5-doc/rewrite.html
> 
> So, I created an empty directory $CATALINA_BASE/webapps/app1 with 
> the following file:
> 
> $CATALINA_BASE/webapps/app1/WEB-INF/rewrite.config
> 
> And my $CATALINA_BASE/conf/[enginename]/[hostname]/app1.xml has the
>  following entry within its context:
> 
>  className="org.apache.catalina.valves.rewrite.RewriteValve"/>
> 
> My rewrite.config file is as follow:
> 
> RewriteCond %{REQUEST_URI} ^/app1/?.* RewriteRule ^/app1(/?.*)$ 
> /app2$1 [L]
> 
> Without anything else, I am getting a HTTP 404 code. With an empty
>  index.html I am getting a blank page. Within a working application
> I am getting the application's welcome page. But never the URL is
rewritten. The
> rewrite.config file is actually read, I checked by introducing
> some typo and I am getting an error message at startup.
> 
> Is there a way to debug this problem? How can I see what is going
> on with the execution of the rewriting class?

I think everything you have above is correct, except that you want to
deploy everything in the ROOT application instead of into "app1". With
"app1", you are re-writing "/app1/app1" to "/app1/app2" when in fact you
want to rewrite "/app1" to "/app2", correct?

Also, it's important that /app1 not be a deployed application, otherwise
requests to that context path with be sent to the /app1 application
instead of to the ROOT webapp.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJZFfGGAAoJEBzwKT+lPKRYlfsQAK9+rFzKtrrPS73Ma9VDclkn
Lr3oG65TdKPhwVEtQlQoxLggX3GLiepImPzjY52rnMhxCZj+tt5n/fCkqVzEPnIp
/NNgz/nX/GWqYjU11V58Azh2GRrjBqCJmesawxB/Y5+2NjcW6PrXJNje5PBmkbjs
QkI5ftAYih7zxWQ4yASJfYwOmmjPpdNfyEM0IR/qkh/VnTz5bVu0/EgeOOK0/Dny
EsK+3ptm+gdTNVt9jqwEnhWx5tsgpanhTycyyagwROT2A7NaldIi7xARPW3ZlSSF
0ncvQ8Z3G0KolBsGsDVyNgNv+bF38sfxOaN7xyp9GXFJVX5hKfRFBphiWPl+jjzz
mwPcA3MsqDM3fQ4hMTAffmnUAj786pTZ6MCjDnumFjnQZB0zXASEpfI4G9f3+dKM
fiVdjUQxgrXlUl6wcqBGUidN5PDb+akY8w9xNDl3PvBjrXfFIIfttLgGmxF5cej6
dkvLqZoitIDzt8dOkWSns3UdK+fq3a1Hjw1BOPlvnvKbnhz2QXrxua6WMDQapohs
JUUkAR3sujPUs/Tgjq5SiIEBe9sbwQTysNgtw9MzFUmAB7D87cCt0zI8dCbaL54Z
iYUI0+IDVG7rc7+TwFeRo+ok96qMK1IKCiZt/8pe/097WcWMQq9FeYpGAg4YgZYo
bwhJFBohEZeuwZCwhN9F
=J7pC
-END PGP SIGNATURE-

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



Redirection/URL rewriting Tomcat 8.5.14

2017-05-12 Thread Daniel Savard
Hi everyone,

my question is not specific to the Tomcat version specified in the subject
line. I am trying to implement a URL rewrite or redirection using Tomcat.
What I want to do is the following:

In a given instance of Tomcat, I have each application context setup using
the xml files in $CATALINA_BASE/conf/[enginename]/[hostname]/, so far so
good. Hence for app1 I then have the URL: https://myserver:myport/app1, etc.

What I need to do, is to have a dummy application which purpose is just to
redirect/rewrite the URL from one application to another. So, I need in
fact an empty application capturing each request and send back to the
browser a rewritten URL to the another application.

For example, suppose I want to redirect app1 to app2, I need to rewrite all
possible URL with query options and so one replacing only app1 by app2 in
the URL.

https://myserver:myport/app1/something_more_specific?opt1 should be
rewritten as https://myserver:myport/app2/something_more_specific?opt1

To do this, I read about the rewrite valve here:
http://tomcat.apache.org/tomcat-8.5-doc/rewrite.html

So, I created an empty directory $CATALINA_BASE/webapps/app1 with the
following file:

$CATALINA_BASE/webapps/app1/WEB-INF/rewrite.config

And my $CATALINA_BASE/conf/[enginename]/[hostname]/app1.xml has the
following entry within its context:



My rewrite.config file is as follow:

RewriteCond %{REQUEST_URI} ^/app1/?.*
RewriteRule ^/app1(/?.*)$ /app2$1 [L]

Without anything else, I am getting a HTTP 404 code. With an empty
index.html I am getting a blank page. Within a working application I am
getting the application's welcome page. But never the URL is rewritten. The
rewrite.config file is actually read, I checked by introducing some typo
and I am getting an error message at startup.

Is there a way to debug this problem? How can I see what is going on with
the execution of the rewriting class?

Regards,
-
Daniel Savard


Re: tomcat 7.0.70 redirection is not working as expected with https

2016-09-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Manish,

On 9/9/16 2:47 AM, Palod, Manish wrote:
> Hi All, Previously I was using apache web server and tomcat for SSL
> redirection and web server, in that case redirection from apache to
> tomcat was working fine.
> 
> Now I have removed the apache web server and using tomcat only for
> ssl settings also [server.xml sslEnabled and other related
> settings], things are in general working fine, in one case
> redirection is not happening properly.
> 
> Following are the details about my server.xml =  port="80" address="" protocol="HTTP/1.1" 
> connectionTimeout="2" maxPostSize="10485760" redirectPort="444"
> URIEncoding="UTF-8"/>
> 
>   SSLEnabled="true" maxThreads="150" scheme="https" secure="true" 
> keystoreFile="conf/my-server.keystore" keystorePass=""
> keystoreType="jks" compression="on"
> compressableMimeType="text/html,text/xml,text/plain,text/javascript,te
xt/css,application/x-javascript,application/javascript"
>
> 
address=""
> ciphers="" clientAuth="false" sslProtocol="TLS" 
> sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" redirectPort="444"
> maxPostSize="10485760"/>
> 
>  maxThreads="150" scheme="https" secure="true" 
> keystoreFile="conf/my-server.keystore" keystorePass=""
> keystoreType="jks" compression="on"
> compressableMimeType="text/html,text/xml,text/plain,text/javascript,te
xt/css,application/x-javascript,application/javascript"
>
> 
address=""
> truststoreFile="conf/ca.keystore" truststorePass=""
> truststoreType="jks" clientAuth="true" sslProtocol="TLS" 
> sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" ciphers="" 
> redirectPort="443"  maxPostSize="10485760"/> =
> 
> When I type, http://<IP-Address<http://%3cIP-Address>>, I am able
> to access the server and able to perform the client-auth and
> server-auth operation
> 
> But when we try, https://<IP-Address<https://%3cIP-Address>>, it
> fails

What version of Tomcat?

Please post the full Tomcat startup log from catalina.out. No
particular applications need to be deployed -- just let Tomcat start
on its own and post the log.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJX0wFfAAoJEBzwKT+lPKRYPXcP/RHRSd9rriZMH835rYYYtQK5
b4Ia+pLzH70YoatDeghwkbZYnVKk18gVq7PBGgID9WnP2aUtM1i1sMG5TpALy4Mz
6wnrwZTxtQgNyBMTe0G3QPc3k9YXmuScldi7LOaIoWVfVRONWJ3jP3LlBmAdaXGL
/QpyQG7CPd9CHiaYcKoh46oWVpknJ42NEFlMcpspD53bTgerTbIt5Q/ps5Y9FW8s
Znwb/zz7OIibzy/8C8hWZ0ycXYQzTNEfXxupI7DFJ5sUe2qLON9heeDKII69MVdi
XBsjhFW6DozN6CYXzSpzir574Us8pWXuMbGtGADIfy+xRpM8ISWqwDYB2XKgUuEc
bf5Mi6chxTGgKXowKdVpQskPOwlWOudDe58B4guYzCCpCGBX0vL4OJgNiDa+OkQk
uIOK8VDWPaWLs/cMjbj3uehr2KXCaH3UVDETILtq3BdMP3Vhvezbpmmyc2ubtyhn
gBr43fY3C7E7nUIlLixgh+yT9z9DUUUz7HKgWs42mTWyW5miH/NrR5S+tP+AQU8Z
EYxFyE8k1i3ccrdUa9cO0j/PJrsXLT7o5dF43CAWmgMgbFy82jdeX/HLvb3hGLmD
lsJdBuZ7g49k2+e/vKRew2kpYquAJ9BOQY4jzRnc0Ki1pxLj/z3DV5rdujNBQV4z
jGNiY+1ZuxTR89sR1zmL
=5rGv
-END PGP SIGNATURE-

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



tomcat 7.0.70 redirection is not working as expected with https

2016-09-09 Thread Palod, Manish
Hi All,
Previously I was using apache web server and tomcat for SSL redirection and web 
server, in that case redirection from apache to tomcat was working fine.

Now I have removed the apache web server and using tomcat only for ssl settings 
also [server.xml sslEnabled and other related settings], things are in general 
working fine, in one case redirection is not happening properly.

Following are the details about my server.xml
=
  

  
  


=

When I type,
http://<IP-Address<http://%3cIP-Address>>, I am able to access the server and 
able to perform the client-auth and server-auth operation

But when we try,
https://<IP-Address<https://%3cIP-Address>>, it fails


please help.


Regards
Manish



Certificate installation for https causing redirection.

2016-04-14 Thread Weare Borg
Hello friends,

Sorry for pushing the question to both Tomcat and Apache, as changes seem
to be required in both Apache and Tomcat, so I did that.

We have one test server with Debian X64 which has one web-project running
in Apache and few webapps running with Apache Tomcat. The Apache web-server
runs mod_proxy and redirecting requests to Tomcat whenever the URL is
correct.

For adding security, I created certificates with LetsEncrypt
 and installed them. Unfortunately, for one of
the webapp which I installed the certificate, it is not opening anymore,
and whenever I try to open that webapp in browser, it redirects to the
web-project running in Apache web server. What am I doing wrong?

Please note, I was provided with .pem files, and had to convert them to .crt
and .key. Unfortunately there are no errors in logs as well. Right now, I
cannot reach the tomcat webapp which I would like with https.

Here is the configuration :

sites-enabled/000-default :

> 
> ServerAdmin webmaster@localhost
> ServerName www.apache_domain.com
> ServerAlias apache_domain.com
> DocumentRoot /var/www
> 
> Options FollowSymLinks
> AllowOverride None
> 
> 
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
>  Order allow,deny
> allow from all
> 
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> 
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> 
>
> ErrorLog ${APACHE_LOG_DIR}/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
> CustomLog ${APACHE_LOG_DIR}/access.log combined
> Listen 443ServerName www.tomcat_domain.deServerAlias 
> tomcat_domain.deSSLEngine onSSLCertificateFile 
> /etc/letsencrypt/live/www.tomcat_domain.de/tool.crtSSLCertificateKeyFile 
> /etc/letsencrypt/live/www.tomcat_domain.de/private.keyProxyRequests 
> offProxyPreserveHost OnOrder deny,allowAllow from 
> all#ProxyPass /maintenance.html !#ProxyPass / 
> http://localhost:8080/#ProxyPassReverse / http://localhost:8080/
> Order allow,denyAllow from all
>
>
Tomcat server.xml :

>  protocol="org.apache.coyote.http11.Http11NioProtocol" compression="force" 
> compressionMinSiz$
>connectionTimeout="2"  maxPostSize="5242880"
>URIEncoding="utf-8"
>  compressableMimeType="text/html,text/xml,text/plain,text/css,text/ 
> javascript,application/x-javascript,application/javascript"/>
>
>
>
>maxPostSize="5242880" SSLEnabled="true" maxThreads=$
>   compressionMinSize="1024" scheme="https" secure="true" 
> clientAuth="false" sslProtocols="TLS"
> sslEnabledProtocols="TLSv1+TLSv1.1+TLSv1.2"
>
> SSLCertificateFile="/etc/letsencrypt/live/www.tool-tank.de/tool.crt"
> 
> SSLCertificateKeyFile="/etc/letsencrypt/live/www.tool-tank.de/privkey.pem"
>  URIEncoding="utf-8"
>  compressableMimeType="text/html,text/xml,text/plain,text/css,text/ 
> javascript,application/x-javascript,application/javascript"/>
>
>   autoDeploy="true"/>
>
>
>
>  appBase="tomcat_domain_webapps">
> www.tomcat_domain.de
> 
> 
>
>  appBase="second_webapps">
> www.second.com
> 
> 
>
>  appBase="third_webapps">
> www.third.de
> 
> 
>
>  appBase="fourth_webapps">
> fourth.de
> 
> 
>
> Any help would be nice.


Re: URL based redirection working partially with Apache tomcat

2015-12-07 Thread Kernel freak
Hi Chris,

I was able to finally resolve it by adding Host elements directly in
server.xml and creating separate webapps folder for each app to hold the
WAR file. I am on to a bigger fish. I will post a question soon in mailing
list. Thank you.

On Thu, Dec 3, 2015 at 6:37 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> To whom it may concern,
>
> On 12/3/15 10:54 AM, Kernel freak wrote:
> > Hello friends,
> >
> > I would like to deploy multiple webapps(as of now 2,waiting for domain
> name
> > for 3rd) on a single Apache Tomcat instance. I have been partially
> > successful as one URL is working properly, other is not.
> >
> > Situation :
> > 1) I have created two folders called domain1_webapps  and domain2_webapps
> > and put the respective webapps named ROOT.war in each of them.
> > 2) Then I configured server.xml as mentioned below.
> >
> >
> >   > autoDeploy="true"/>
> >  unpackWARs="true"
> > appBase="domain1_webapps"/>
> >  unpackWARs="true"
> > appBase="domain2_webapps"/>
> >
> > Right now when I call www.domain-one.com( not domain-one.com), I get the
> > correct site. But for the 2nd one, I have to call
> > www.domain-two.com/app_name.
> >
> > *How can I remove in 2nd domain the app_name context-path which is
> getting
> > appended. Kindly let me know. *
> >
> > The ironical situation is I have not kept the app_name anywhere, guess
> > Tomcat must be retrieving it from POM.xml.
> >
> > Reference question on SO :
> >
> http://stackoverflow.com/questions/34069289/apache-tomcat-url-based-redirection-partially-works
>
> Have you read the documentation for how to deploy a web application in
> Tomcat?
>
>
> http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Defining_a_context
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: URL based redirection working partially with Apache tomcat

2015-12-03 Thread Christopher Schultz
To whom it may concern,

On 12/3/15 10:54 AM, Kernel freak wrote:
> Hello friends,
> 
> I would like to deploy multiple webapps(as of now 2,waiting for domain name
> for 3rd) on a single Apache Tomcat instance. I have been partially
> successful as one URL is working properly, other is not.
> 
> Situation :
> 1) I have created two folders called domain1_webapps  and domain2_webapps
> and put the respective webapps named ROOT.war in each of them.
> 2) Then I configured server.xml as mentioned below.
> 
> 
>   autoDeploy="true"/>
>  appBase="domain1_webapps"/>
>  appBase="domain2_webapps"/>
> 
> Right now when I call www.domain-one.com( not domain-one.com), I get the
> correct site. But for the 2nd one, I have to call
> www.domain-two.com/app_name.
> 
> *How can I remove in 2nd domain the app_name context-path which is getting
> appended. Kindly let me know. *
> 
> The ironical situation is I have not kept the app_name anywhere, guess
> Tomcat must be retrieving it from POM.xml.
> 
> Reference question on SO :
> http://stackoverflow.com/questions/34069289/apache-tomcat-url-based-redirection-partially-works

Have you read the documentation for how to deploy a web application in
Tomcat?

http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Defining_a_context

-chris

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



URL based redirection working partially with Apache tomcat

2015-12-03 Thread Kernel freak
Hello friends,

I would like to deploy multiple webapps(as of now 2,waiting for domain name
for 3rd) on a single Apache Tomcat instance. I have been partially
successful as one URL is working properly, other is not.

Situation :
1) I have created two folders called domain1_webapps  and domain2_webapps
and put the respective webapps named ROOT.war in each of them.
2) Then I configured server.xml as mentioned below.


 



Right now when I call www.domain-one.com( not domain-one.com), I get the
correct site. But for the 2nd one, I have to call
www.domain-two.com/app_name.

*How can I remove in 2nd domain the app_name context-path which is getting
appended. Kindly let me know. *

The ironical situation is I have not kept the app_name anywhere, guess
Tomcat must be retrieving it from POM.xml.

Reference question on SO :
http://stackoverflow.com/questions/34069289/apache-tomcat-url-based-redirection-partially-works

Regards,
Kernel


Multiple tomcat instances and redirection of URLs to different ports.

2014-07-18 Thread Ben Calnan
Hello everybody,

My question is about multiple tomcat instances and redirection of URLs to other 
ports on IIS6 windows server 2003.

I have two Java apps (web archives) GeoServer and GeoNetwork. Because they are 
quite big memory intensive apps, I've heard it's recommended to run two 
instances of Tomcat.

I've downloaded the windows service installer (32bit, tomcat 8.09) and 
installed two copies of Tomcat with separate ports namely:


 *   Instance 1:
*   HTTP 8083, redirect 8100,
*   Shutdown port 8005,
*   AJP 8009, redirect 8100
 *   Instance 2:
*   HTTP 8084, redirect 8101
*   shutdown 8006,
*   AJP 8010, redirect 8101


Everything seems to work correctly if I type in the URL with the port number, 
but site is only available to public users on port 8080.

So my question is how do I redirect users who say type in 
www.example.com/geoserverhttp://www.mysite.com/geoserver to 
www.example.com:8083/geoserverhttp://www.mysite.com:8083/geoserver, or 
www.example.com/geonetworkhttp://www.mysite.com/geonetwork to 
www.example.com:8084/geonetworkhttp://www.example.com:8084/geonetwork without 
them seeing. Do I need some kind of ISAPI filter to do this in IIS6?

Apologies if this is dumb question or the wrong forum, any help though would be 
very much appreciated!

Thanks


Hackney Council may exercise its right to intercept any communication, the only 
exception to this would be confidential survey data, with any employee or agent 
of the Council using its telephony or data networks. 
By using these networks you give your consent to Hackney Council monitoring and 
recording your communication.
If you have received this e-mail in error please delete it immediately and 
contact the sender.
For further information about Hackney Council policies please contact Hackney 
Service Centre on: 020 8356 3000


Re: Multiple tomcat instances and redirection of URLs to different ports.

2014-07-18 Thread Daniel Mikusa
On Fri, Jul 18, 2014 at 5:27 AM, Ben Calnan ben.cal...@hackney.gov.uk
wrote:

 Hello everybody,

 My question is about multiple tomcat instances and redirection of URLs to
 other ports on IIS6 windows server 2003.

 I have two Java apps (web archives) GeoServer and GeoNetwork. Because they
 are quite big memory intensive apps, I've heard it's recommended to run two
 instances of Tomcat.

 I've downloaded the windows service installer (32bit, tomcat 8.09) and
 installed two copies of Tomcat with separate ports namely:


  *   Instance 1:
 *   HTTP 8083, redirect 8100,
 *   Shutdown port 8005,
 *   AJP 8009, redirect 8100
  *   Instance 2:
 *   HTTP 8084, redirect 8101
 *   shutdown 8006,
 *   AJP 8010, redirect 8101


 Everything seems to work correctly if I type in the URL with the port
 number, but site is only available to public users on port 8080.

 So my question is how do I redirect users who say type in
 www.example.com/geoserverhttp://www.mysite.com/geoserver to
 www.example.com:8083/geoserverhttp://www.mysite.com:8083/geoserver, or
 www.example.com/geonetworkhttp://www.mysite.com/geonetwork to
 www.example.com:8084/geonetworkhttp://www.example.com:8084/geonetwork
 without them seeing. Do I need some kind of ISAPI filter to do this in IIS6?

 Apologies if this is dumb question or the wrong forum, any help though
 would be very much appreciated!


One option is to put a reverse proxy in front of your Tomcat instances.
 The reverse proxy, likely IIS in your case, would listen on the standard
ports 80 and 443 taking requests and proxying them to your Tomcat
instances.  Once a request is processed, Tomcat would send the response to
IIS and IIS would return the response to the user.  One of the neat things
about this is that since users only talk to IIS, they don't need to worry
about the port that Tomcat is running on.

There is some documentation on setting this up here:
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html

Dan


Error redirection settings

2014-02-19 Thread Randeep
Hi,

I'm using tomcat apache-tomcat-6.0.37
I have a few web applications in webapps directory.

portal
sms
crm

I'm creating custom error pages.

inside the webapplication portal under WEB-INF in web.xml I have given
the following.

error-page
error-code400/error-code
location/lp/404.html/location
/error-page
error-page
error-code404/error-code
location/lp/404.html/location
/error-page
error-page
error-code500/error-code
location/lp/oops.html/location
/error-page
error-page
exception-typejava.lang.Throwable/exception-type
location/lp/oops.html/location
/error-page

And is working fine for the errors like

domain.com/portal/sdgggdhsh

But for other web applications, obviously it wont work. because I haven't
configured in their web.xml files.

Is there any way I can give common error pages?
I can see that there is a web.xml file under conf directory. And I have
given the settings in it. As below.

error-page
error-code400/error-code
location/404.html/location
/error-page
error-page
error-code404/error-code
location/404.html/location
/error-page
error-page
error-code500/error-code
location/oops.html/location
/error-page
error-page
exception-typejava.lang.Throwable/exception-type
location/oops.html/location
/error-page

Path I changed. starting from / and put the files in webapps directory.
But it is not working.

How can I do this?
-- 
Randeep
Mob: +919447831699[kerala]
Mob: +919880050349[B'lore]
I blog here:
http://www.randeeppr.me/
Follow me Here:
http://twitter.com/Randeeppr
Poke me here!
http://www.facebook.com/Randeeppr
A little Linux Help
http://www.linuxhelp.in/
Work profile:
http://in.linkedin.com/in/randeeppr


Re: Error redirection settings

2014-02-19 Thread André Warnier

Randeep wrote:

Hi,

I'm using tomcat apache-tomcat-6.0.37
I have a few web applications in webapps directory.

portal
sms
crm

I'm creating custom error pages.

inside the webapplication portal under WEB-INF in web.xml I have given
the following.

error-page
error-code400/error-code
location/lp/404.html/location
/error-page
error-page
error-code404/error-code
location/lp/404.html/location
/error-page
error-page
error-code500/error-code
location/lp/oops.html/location
/error-page
error-page
exception-typejava.lang.Throwable/exception-type
location/lp/oops.html/location
/error-page

And is working fine for the errors like

domain.com/portal/sdgggdhsh

But for other web applications, obviously it wont work. because I haven't
configured in their web.xml files.

Is there any way I can give common error pages?
I can see that there is a web.xml file under conf directory. And I have
given the settings in it. As below.

error-page
error-code400/error-code
location/404.html/location
/error-page
error-page
error-code404/error-code
location/404.html/location
/error-page
error-page
error-code500/error-code
location/oops.html/location
/error-page
error-page
exception-typejava.lang.Throwable/exception-type
location/oops.html/location
/error-page

Path I changed. starting from / and put the files in webapps directory.
But it is not working.

How can I do this?


After a search in Google for tomcat error-page location, I found this :
http://stackoverflow.com/questions/3856145/empty-page-instead-of-custom-tomcat-error-page

which seems to say that Tomcat will always prefix the given location with the
context path of the application where the error happens.
(For example, if you have location/oops.html/location, and if the error happens in your 
app /MyApp, then Tomcat will be looking for the file ...webapps/MyApp/oops.html).


So you cannot have one generic location for these error pages, and share them for all 
applications. You have to add the error page to each deployed application, separately.


More precisely : you can *define* the error pages, as you have done, in the generic 
conf/web.xml.  But you still have to put a copy of the pages themselves in each 
application separately.
I suppose that this obeys the general principle according to which each application should 
be self-contained.


Maybe in later Tomcat versions, there would be a way around this via aliases or the likes, 
but it is probably still not recommended.



Note also, separately : the URL path / resolves to .../webapps/ROOT/, not to 
.../webapps/.


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



Re: Error redirection settings

2014-02-19 Thread Randeep
On Wed, Feb 19, 2014 at 7:37 PM, André Warnier a...@ice-sa.com wrote:

 Randeep wrote:

 Hi,

 I'm using tomcat apache-tomcat-6.0.37
 I have a few web applications in webapps directory.

 portal
 sms
 crm

 I'm creating custom error pages.

 inside the webapplication portal under WEB-INF in web.xml I have given
 the following.

 error-page
 error-code400/error-code
 location/lp/404.html/location
 /error-page
 error-page
 error-code404/error-code
 location/lp/404.html/location
 /error-page
 error-page
 error-code500/error-code
 location/lp/oops.html/location
 /error-page
 error-page
 exception-typejava.lang.Throwable/exception-type
 location/lp/oops.html/location
 /error-page

 And is working fine for the errors like

 domain.com/portal/sdgggdhsh

 But for other web applications, obviously it wont work. because I haven't
 configured in their web.xml files.

 Is there any way I can give common error pages?
 I can see that there is a web.xml file under conf directory. And I have
 given the settings in it. As below.

 error-page
 error-code400/error-code
 location/404.html/location
 /error-page
 error-page
 error-code404/error-code
 location/404.html/location
 /error-page
 error-page
 error-code500/error-code
 location/oops.html/location
 /error-page
 error-page
 exception-typejava.lang.Throwable/exception-type
 location/oops.html/location
 /error-page

 Path I changed. starting from / and put the files in webapps directory.
 But it is not working.

 How can I do this?


 After a search in Google for tomcat error-page location, I found this :
 http://stackoverflow.com/questions/3856145/empty-page-
 instead-of-custom-tomcat-error-page

 which seems to say that Tomcat will always prefix the given location
 with the
 context path of the application where the error happens.
 (For example, if you have location/oops.html/location, and if the
 error happens in your app /MyApp, then Tomcat will be looking for the
 file ...webapps/MyApp/oops.html).

 So you cannot have one generic location for these error pages, and share
 them for all applications. You have to add the error page to each deployed
 application, separately.

 More precisely : you can *define* the error pages, as you have done, in
 the generic conf/web.xml.  But you still have to put a copy of the pages
 themselves in each application separately.
 I suppose that this obeys the general principle according to which each
 application should be self-contained.

 Maybe in later Tomcat versions, there would be a way around this via
 aliases or the likes, but it is probably still not recommended.


 Note also, separately : the URL path / resolves to .../webapps/ROOT/,
 not to .../webapps/.

 Thank you for the reply Andre. I'll add in all the webapps separately.

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




-- 
Randeep
Mob: +919447831699[kerala]
Mob: +919880050349[B'lore]
I blog here:
http://www.randeeppr.me/
Follow me Here:
http://twitter.com/Randeeppr
Poke me here!
http://www.facebook.com/Randeeppr
A little Linux Help
http://www.linuxhelp.in/
Work profile:
http://in.linkedin.com/in/randeeppr


RE: Redirection of mycompany.com to www.mycompany.com

2013-12-18 Thread pierre posset
Hi,

I have found what was happening, it was one of my colleagues who has put a 
filter and didin't remember doing that.

Thank you.

 Date: Tue, 17 Dec 2013 00:30:04 +0400
 Subject: Re: Redirection of mycompany.com to www.mycompany.com
 From: knst.koli...@gmail.com
 To: users@tomcat.apache.org
 
 2013/12/16 James H. H. Lampert jam...@touchtonecorp.com:
  On 12/16/13 9:37 AM, pierre posset wrote:
 
  My problem is that when in a browser I am writing mycompany.com I am
  redirected with to www.mycompany.com.
 
 
  I could be way off-base here (it wouldn't be the first time!), but:
 
  It could also be that your browser thinks it's smarter than you are. I've
  seen browsers apparently redirect themselves (without any redirect having
  been set up) to variations on a URL, and/or to whatever is set as their
  default search engine, but so far as I know, that usually only happens if
  the browser can't resolve the URL as entered, or if the user didn't
  explicitly type the protocol prefix on the URL.
 
 By the way, the setting name in Mozilla Firefox is
 browser.fixup.alternate.enabled
 I usually explicitly change this and keyword.enabled settings to the
 value of false.
 
 http://www.mozilla.org/docs/end-user/domain-guessing.html
 http://kb.mozillazine.org/Keyword.enabled
 
 
  Does it happen with other browsers? Does it happen if you try it from
  someplace with a completely different web connection? Have you tried
  explicitly typing the http:// or the https:// at the beginning of the URL?
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  

Redirection of mycompany.com to www.mycompany.com

2013-12-16 Thread pierre posset
Hello,

I have a strange behavior and I do not know where to watch.

I am using tomcat7 on a debian.

My problem is that when in a browser I am writing mycompany.com I am redirected 
with to www.mycompany.com.

I am using the node host with some nodes alias.

I have searched in many configuration file and also on google but I do not find 
any answer to my behavior, isthere someone who can help me?

Thank you.

Best Regards,

Pierre Posset.
  

Re: Redirection of mycompany.com to www.mycompany.com

2013-12-16 Thread Reinhardt Christiansen

On 2013-12-16 12:23 PM, pierre posset wrote:

Hello,

I have a strange behavior and I do not know where to watch.

I am using tomcat7 on a debian.

My problem is that when in a browser I am writing mycompany.com I am redirected 
with to www.mycompany.com.

I am using the node host with some nodes alias.

I have searched in many configuration file and also on google but I do not find 
any answer to my behavior, isthere someone who can help me?

Thank you.

Best Regards,

Pierre Posset.


I use a service called ZoneEdit (zoneedit.com) which lets you create 
records that cause similar redirections. For example, I can point a 
domain name, like mydomain.com to xyz.techstuff.net with their records. 
Perhaps something like that is causing the redirection, rather than any 
entries on the server itself?


I expect other companies provide the same services as ZoneEdit

--
Reinhardt

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


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



RE: Redirection of mycompany.com to www.mycompany.com

2013-12-16 Thread pierre posset
Thank you for your answer I will try to see if it is something like that which 
is happening.

 Date: Mon, 16 Dec 2013 12:34:19 -0500
 From: rhi...@sympatico.ca
 To: users@tomcat.apache.org
 Subject: Re: Redirection of mycompany.com to www.mycompany.com
 
 On 2013-12-16 12:23 PM, pierre posset wrote:
  Hello,
 
  I have a strange behavior and I do not know where to watch.
 
  I am using tomcat7 on a debian.
 
  My problem is that when in a browser I am writing mycompany.com I am 
  redirected with to www.mycompany.com.
 
  I am using the node host with some nodes alias.
 
  I have searched in many configuration file and also on google but I do not 
  find any answer to my behavior, isthere someone who can help me?
 
  Thank you.
 
  Best Regards,
 
  Pierre Posset.
  
 
 I use a service called ZoneEdit (zoneedit.com) which lets you create 
 records that cause similar redirections. For example, I can point a 
 domain name, like mydomain.com to xyz.techstuff.net with their records. 
 Perhaps something like that is causing the redirection, rather than any 
 entries on the server itself?
 
 I expect other companies provide the same services as ZoneEdit
 
 -- 
 Reinhardt
 
 ---
 This email is free from viruses and malware because avast! Antivirus 
 protection is active.
 http://www.avast.com
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  

Re: Redirection of mycompany.com to www.mycompany.com

2013-12-16 Thread James H. H. Lampert

On 12/16/13 9:37 AM, pierre posset wrote:

My problem is that when in a browser I am writing mycompany.com I am redirected 
with to www.mycompany.com.


I could be way off-base here (it wouldn't be the first time!), but:

It could also be that your browser thinks it's smarter than you are. 
I've seen browsers apparently redirect themselves (without any redirect 
having been set up) to variations on a URL, and/or to whatever is set as 
their default search engine, but so far as I know, that usually only 
happens if the browser can't resolve the URL as entered, or if the user 
didn't explicitly type the protocol prefix on the URL.


Does it happen with other browsers? Does it happen if you try it from 
someplace with a completely different web connection? Have you tried 
explicitly typing the http:// or the https:// at the beginning of the URL?


--
JHHL

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



Re: Redirection of mycompany.com to www.mycompany.com

2013-12-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Pierre,

On 12/16/13, 12:23 PM, pierre posset wrote:
 I am using tomcat7 on a debian.
 
 My problem is that when in a browser I am writing mycompany.com I
 am redirected with to www.mycompany.com.
 
 I am using the node host with some nodes alias.
 
 I have searched in many configuration file and also on google but
 I do not find any answer to my behavior, is there someone who can
 help me?

What is your setup and configuration?

Have you used an HTTP protocol analyzer to see if the server is in
fact redirecting the client?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSr1P0AAoJEBzwKT+lPKRY4KIP/1IlGMF3NCKIYqoHIchoeM+c
4gn4BSyaQj/hStYmf9T9l/ZIZMbjpcwZj79UHZry32IDO1E4VqiBRJ1MIB45SZg3
hYmzsXY7ULt3cRpCOu00uRArjT5LjTFkaLXTjzSBaCVODdElkFsJ4KS+B0S17ONq
yUTs0ONbqFgIeVSGAZcHDErM/7OCIRo4Gg6YlUnfKU6JU+TXREXLuyih4vQpgZ2f
GpDAw98h6C6Bzfs6NpE/5Zt6akRoNI5GhvwAw4/cCpfpTe6pijCeAkP3knt6M9yN
u+DlKoPKRpM6Ezxe83OeW2D9mqcOo21+xyv0k9Nu8eevKw7YSNqF7VqWC01hflvA
ERnTaQ+6NwIBcr2ZmfPtA37J1113YgF9IU5HIvlFyKF3x8MF/D80Pdhm9Ri4fZCq
tflITS9JlVUa1G7vgyj9+auLRiikqdwHF4fRNkc9cwr6ipucWEYa8Mw+OYcOGxlB
85KZChesp5sX5ggHWOV7jSSA4kiIj7Cp1QB0ypXTc2MlpVWqWiDjvNpkln6nCN8P
XL/Pasyi39auxRiZU1KwW5Db1SRgmNjY60bjoq5vpdxDpuIdhmkZp6USAEwg5P8Z
RZQpaYKDXNiywsWDX9FoyES11KJKHGX3v3XEfxX3p4RYg/xsVpFYKaNR4ZoOsaom
UbJutrtROwVEXNaODWl0
=jciL
-END PGP SIGNATURE-

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



Re: Redirection of mycompany.com to www.mycompany.com

2013-12-16 Thread Konstantin Kolinko
2013/12/16 James H. H. Lampert jam...@touchtonecorp.com:
 On 12/16/13 9:37 AM, pierre posset wrote:

 My problem is that when in a browser I am writing mycompany.com I am
 redirected with to www.mycompany.com.


 I could be way off-base here (it wouldn't be the first time!), but:

 It could also be that your browser thinks it's smarter than you are. I've
 seen browsers apparently redirect themselves (without any redirect having
 been set up) to variations on a URL, and/or to whatever is set as their
 default search engine, but so far as I know, that usually only happens if
 the browser can't resolve the URL as entered, or if the user didn't
 explicitly type the protocol prefix on the URL.

By the way, the setting name in Mozilla Firefox is
browser.fixup.alternate.enabled
I usually explicitly change this and keyword.enabled settings to the
value of false.

http://www.mozilla.org/docs/end-user/domain-guessing.html
http://kb.mozillazine.org/Keyword.enabled


 Does it happen with other browsers? Does it happen if you try it from
 someplace with a completely different web connection? Have you tried
 explicitly typing the http:// or the https:// at the beginning of the URL?


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



redirection of www.xyz.com/xyz to https://xyz.com/xyz.html is not happening in httpd.conf

2012-12-27 Thread Dhaval Jaiswal
i have tried through Redirect option to redirect specific page to one *.html

it is not redirecting. Still it is redirecting to old values only.

Even i have tried through Rewriterule.

Any other efficient way will be helpful to me.


--


RE: redirection of www.xyz.com/xyz to https://xyz.com/xyz.html is not happening in httpd.conf

2012-12-27 Thread Caldarale, Charles R
 From: Dhaval Jaiswal [mailto:dhaval.jais...@via.com] 
 Subject: redirection of www.xyz.com/xyz to https://xyz.com/xyz.html is not 
 happening in httpd.conf

 i have tried through Redirect option to redirect specific page to one *.html

 it is not redirecting. Still it is redirecting to old values only.

 Even i have tried through Rewriterule.

This is the Tomcat mailing list; perhaps you want the one for httpd.  Before 
posting on that list, you might want to read this first:

http://www.catb.org/~esr/faqs/smart-questions.html

and then provide specifics rather than vague ramblings.

 - 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



tomcat redirection

2012-08-06 Thread Finkeldei, Brad
We want to do a redirect based on context of the URL. We don't use apache and

For example say https://anydomain.com/orders/*
To
https://anydomain/mtcepage

I know how to do in apache but not tomcat...

Thanks,

Brad



Re: tomcat redirection

2012-08-06 Thread Mark Eggers

On 8/6/2012 9:02 AM, Finkeldei, Brad wrote:

We want to do a redirect based on context of the URL. We don't use apache and

For example say https://anydomain.com/orders/*
To
https://anydomain/mtcepage

I know how to do in apache but not tomcat...

Thanks,

Brad




This comes up quite a bit in the mailing list. Archives are searchable 
and online.


http://tuckey.org/urlrewrite/

. . . . 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: tomcat redirection

2012-08-06 Thread Finkeldei, Brad
Thanks I am seeing that in a lot of threads I've been researching.

Have  a good one!!

Brad 

-Original Message-
From: Mark Eggers [mailto:its_toas...@yahoo.com] 
Sent: Monday, August 06, 2012 11:06 AM
To: users@tomcat.apache.org
Subject: Re: tomcat redirection

On 8/6/2012 9:02 AM, Finkeldei, Brad wrote:
 We want to do a redirect based on context of the URL. We don't use 
 apache and

 For example say https://anydomain.com/orders/* To 
 https://anydomain/mtcepage

 I know how to do in apache but not tomcat...

 Thanks,

 Brad



This comes up quite a bit in the mailing list. Archives are searchable and 
online.

http://tuckey.org/urlrewrite/

. . . . just my two cents
/mde/

-
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



xinetd port redirection for Tomcat

2011-11-26 Thread Pierre Goupil
Good evening,

I use xinetd in order to bind my Tomcat 7.0.22 instance to port 80 without
any Unix privileges, on a Debian 6.0 box. Here's the (slightly obfuscated)
configuration file:

service www
{
socket_type = stream
protocol= tcp
user= root
wait= no
bind= my IP
port= 80
redirect= localhost 8080
disable = no
flags   = REUSE
log_type= FILEmy.log
log_on_success  -= PID HOST DURATION EXIT

per_source  = UNLIMITED
instances   = UNLIMITED
}

It works generally great but there's one problem: in my logs, only the
localhost IP appears! I mean, in PsiProbe for instance, when I try and see
the IPs of my visitors, I can only find localhost. Which is bad, regarding
traffic statistics...

Does any one have a clue? Shall I use another way of binding Tomcat to port
80? Which one? This way looked good as it's really simple to set up, but if
I must use something else, I don't care. Please note, I'd prefer stick to
xinetd, though.

Regards,

Pierre


RE: xinetd port redirection for Tomcat

2011-11-26 Thread Caldarale, Charles R
 From: Pierre Goupil [mailto:goupilpie...@gmail.com] 
 Subject: xinetd port redirection for Tomcat

 Shall I use another way of binding Tomcat to port 80?

Try iptables - it's even simpler.  Something like the following should work:

/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

Set your Tomcat Connector port to 8080; external requests coming into port 80 
will be automatically redirected to 8080.  Make sure your Linux firewall has 
8080 open.

 - 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.



Re: xinetd port redirection for Tomcat

2011-11-26 Thread Pierre Goupil
Thanks Chuck! I'll try it tomorrow.



On Sat, Nov 26, 2011 at 9:40 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Pierre Goupil [mailto:goupilpie...@gmail.com]
  Subject: xinetd port redirection for Tomcat

  Shall I use another way of binding Tomcat to port 80?

 Try iptables - it's even simpler.  Something like the following should
 work:

 /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT
 --to-port 8080

 Set your Tomcat Connector port to 8080; external requests coming into
 port 80 will be automatically redirected to 8080.  Make sure your Linux
 firewall has 8080 open.

  - 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.




-- 
Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
assez fort.


Re: xinetd port redirection for Tomcat

2011-11-26 Thread Pierre Goupil
Chuck,

I managed to give it a try and it works perfectly. Thanks!

Pierre



On Sat, Nov 26, 2011 at 9:55 PM, Pierre Goupil goupilpie...@gmail.comwrote:

 Thanks Chuck! I'll try it tomorrow.




 On Sat, Nov 26, 2011 at 9:40 PM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

  From: Pierre Goupil [mailto:goupilpie...@gmail.com]
  Subject: xinetd port redirection for Tomcat

  Shall I use another way of binding Tomcat to port 80?

 Try iptables - it's even simpler.  Something like the following should
 work:

 /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT
 --to-port 8080

 Set your Tomcat Connector port to 8080; external requests coming into
 port 80 will be automatically redirected to 8080.  Make sure your Linux
 firewall has 8080 open.

  - 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.




 --
 Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
 assez fort.




-- 
Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
assez fort.


Re: redirection error due to context path after JAAS authentication with mod_proxy

2011-10-14 Thread Woonsan Ko






From: André Warnier a...@ice-sa.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, October 12, 2011 11:52 AM
Subject: Re: redirection error due to context path after JAAS authentication 
with mod_proxy

Woonsan Ko wrote:
 Hi,
 
 I have a reverse proxy configuration like this:
 
 VirtualHost *:80   ServerName localhost   ProxyPreserveHost On   ProxyPass 
 / http://localhost:8080/app1/   ProxyPassReverse / 
 http://localhost:8080/app1/   ProxyPassReverseCookiePath /app1 / 
 /VirtualHost

If it is really like above, then why are you using an Apache httpd front-end 
at all?
Would it not be easier (+ simpler, + more efficient) to just get Tomcat to 
listen on port 80 and whatever IP address Apache httpd is listening to right 
now ?

(To get exactly the same behaviour as above, you would also have to make 
app1 be the Tomcat ROOT application.)

Note: I also use a lot of setups with Apache httpd as front-end, and Tomcat as 
a back-end, and sometimes this is very practical.  At least, when the Apache 
httpd front-end is actually doing something other than forwarding the 
requests to Tomcat.
But here, it does not seem to be doing anything at all.

Yeah, actually I gave a simplified example configuration in order to show proxy 
mappings.
We have many other reasons to keep apache httpd as front-end here.
I've suggested a system administrator about deploying app to ROOT as a 
workaround, but they are not willing to do that for some reasons.

Anyway, if there's no way to customize redirection behavior after JAAS login, 
then I probably need to find a more controllable solution instead of using 
Tomcat's JAAS login feature. (Spring Security seems a good alternative which is 
filter based.)

Thanks anyway,

Woonsan








-
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



redirection error due to context path after JAAS authentication with mod_proxy

2011-10-12 Thread Woonsan Ko
Hi,

I have a reverse proxy configuration like this:

VirtualHost *:80 
  ServerName localhost 
  ProxyPreserveHost On 
  ProxyPass / http://localhost:8080/app1/ 
  ProxyPassReverse / http://localhost:8080/app1/ 
  ProxyPassReverseCookiePath /app1 / 
/VirtualHost

And, I have a form-based login configuration for JAAS authentication.
When I try log on, the redirect location (the secured resource path) after 
/j_security_check seems to be prepended by the context path, '/app1'. (e.g. 
Location: http://localhost/app1/login/resource, instead of 
http://localhost/login/resource)
I guess there will be other solutions with more sophisticated configuration for 
mod_proxy by adding more external server addresses. 
However, I'd like to avoid that if possible because the external addresses can 
be changed/added at any time.

Is there any way to customize the redirection after authentication (e.g. by 
using absolute url generation with a custom component) ?

Regards,

Woonsan

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



Re: redirection error due to context path after JAAS authentication with mod_proxy

2011-10-12 Thread André Warnier

Woonsan Ko wrote:

Hi,

I have a reverse proxy configuration like this:

VirtualHost *:80 
  ServerName localhost 
  ProxyPreserveHost On 
  ProxyPass / http://localhost:8080/app1/ 
  ProxyPassReverse / http://localhost:8080/app1/ 
  ProxyPassReverseCookiePath /app1 / 
/VirtualHost


If it is really like above, then why are you using an Apache httpd front-end at 
all?
Would it not be easier (+ simpler, + more efficient) to just get Tomcat to listen on port 
80 and whatever IP address Apache httpd is listening to right now ?


(To get exactly the same behaviour as above, you would also have to make app1 be the 
Tomcat ROOT application.)


Note: I also use a lot of setups with Apache httpd as front-end, and Tomcat as a back-end, 
and sometimes this is very practical.  At least, when the Apache httpd front-end is 
actually doing something other than forwarding the requests to Tomcat.

But here, it does not seem to be doing anything at all.


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



Re: redirection error due to context path after JAAS authentication with mod_proxy

2011-10-12 Thread Woonsan Ko




- Original Message -
 From: André Warnier a...@ice-sa.com
 To: Tomcat Users List users@tomcat.apache.org
 Cc: 
 Sent: Wednesday, October 12, 2011 11:52 AM
 Subject: Re: redirection error due to context path after JAAS authentication 
 with mod_proxy
 
 Woonsan Ko wrote:
  Hi,
 
  I have a reverse proxy configuration like this:
 
  VirtualHost *:80   ServerName localhost   ProxyPreserveHost On  
 ProxyPass / http://localhost:8080/app1/   ProxyPassReverse / 
 http://localhost:8080/app1/   ProxyPassReverseCookiePath /app1 / 
 /VirtualHost
 
 If it is really like above, then why are you using an Apache httpd front-end 
 at 
 all?
 Would it not be easier (+ simpler, + more efficient) to just get Tomcat to 
 listen on port 80 and whatever IP address Apache httpd is listening to right 
 now 
 ?

One simple strong reason is that I don't want to run tomcat by root.

Thanks,

Woonsan

 
 (To get exactly the same behaviour as above, you would also have to make 
 app1 be the Tomcat ROOT application.)
 
 Note: I also use a lot of setups with Apache httpd as front-end, and Tomcat 
 as a 
 back-end, and sometimes this is very practical.  At least, when the Apache 
 httpd 
 front-end is actually doing something other than forwarding the 
 requests to Tomcat.
 But here, it does not seem to be doing anything at all.
 
 
 -
 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: redirection error due to context path after JAAS authentication with mod_proxy

2011-10-12 Thread Pid
On 12/10/2011 17:51, Woonsan Ko wrote:
 
 - Original Message -
 From: André Warnier a...@ice-sa.com
 To: Tomcat Users List users@tomcat.apache.org
 Cc: 
 Sent: Wednesday, October 12, 2011 11:52 AM
 Subject: Re: redirection error due to context path after JAAS authentication 
 with mod_proxy

 Woonsan Ko wrote:
  Hi,

  I have a reverse proxy configuration like this:

  VirtualHost *:80   ServerName localhost   ProxyPreserveHost On  
 ProxyPass / http://localhost:8080/app1/   ProxyPassReverse / 
 http://localhost:8080/app1/   ProxyPassReverseCookiePath /app1 / 
 /VirtualHost

 If it is really like above, then why are you using an Apache httpd front-end 
 at 
 all?
 Would it not be easier (+ simpler, + more efficient) to just get Tomcat to 
 listen on port 80 and whatever IP address Apache httpd is listening to right 
 now 
 ?
 
 One simple strong reason is that I don't want to run tomcat by root.

JSVC, iptables, Tanuki - bunch of different way to handle that.


p


 (To get exactly the same behaviour as above, you would also have to make 
 app1 be the Tomcat ROOT application.)

 Note: I also use a lot of setups with Apache httpd as front-end, and Tomcat 
 as a 
 back-end, and sometimes this is very practical.  At least, when the Apache 
 httpd 
 front-end is actually doing something other than forwarding the 
 requests to Tomcat.
 But here, it does not seem to be doing anything at all.


 -
 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: redirection error due to context path after JAAS authentication with mod_proxy

2011-10-12 Thread Brian Burch

On 12/10/11 17:51, Woonsan Ko wrote:

One simple strong reason is that I don't want to run tomcat by root.


The debian/ubuntu deb package installs tomcat6 so that it uses authbind 
to listen on ports  1024, and it runs under its own non-root uid/gid. I 
was very impressed when I converted from tomcat5 as a vanilla install to 
tomcat6 as a deb.


Even if you are not on debian, perhaps looking at the installation 
script and file structure will help you set up something similar.


Regards,

Brian

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



how to set auto redirection in tomcat

2011-02-23 Thread James Godrej
I have a site http://social.openitup.in
right now what you are seeing is a default Tomcat6 page.
I am using mod_ajp as a front end and Apache vhost configuration for same is 

VirtualHost *:80 

ServerName social.openitup.in
ServerAdmin webmaster@localhost

ProxyRequests off
Proxy *
Order deny,allow
Allow from all
/Proxy
ProxyPreserveHost On

ProxyPass / ajp://192.168.1.19:8009/
ProxyPassReverse / ajp://192.168.1.19:8009/


/VirtualHost




How ever I have an application running on it 
http://social.openitup.in/olat
what I want to do is when some one opens 
http://social.openitup.in
then rather than seeing Tomcat6 home page from
/var/lib/tomcat6/webapps/ROOT/index.html
the person is  redirected to olat application which is in 
/var/lib/tomcat6/webapps/olat
how can this be achived?



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



RE: how to set auto redirection in tomcat

2011-02-23 Thread Caldarale, Charles R
 From: James Godrej [mailto:jamesgod...@yahoo.in] 
 Subject: how to set auto redirection in tomcat

 I am using mod_ajp as a front end 

Why?  What purpose is it serving?  If it's not doing anything useful (e.g., 
handling PHP), you should simplify your life and remove it.

 How ever I have an application running on it 
 http://social.openitup.in/olat
 what I want to do is when some one opens 
 http://social.openitup.in

Remove the existing ROOT application, and rename yours to ROOT.

 - 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.



Re: how to set auto redirection in tomcat

2011-02-23 Thread James Godrej




- Original Message 
From: Caldarale, Charles R chuck.caldar...@unisys.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Thu, 24 February, 2011 3:01:01 AM
Subject: RE: how to set auto redirection in tomcat

 From: James Godrej [mailto:jamesgod...@yahoo.in] 
 Subject: how to set auto redirection in tomcat

 I am using mod_ajp as a front end 

Why?  What purpose is it serving?  
If it's not doing anything useful (e.g., handling PHP), you should simplify 
your 
life and remove it.

I am running at least 20 other websites and 2 of them use mod_proxy_ajp
each of these is hosted on some machine internally on lan.

 How ever I have an application running on it 
 http://social.openitup.in/olat 
 what I want to do is when some one opens 
 http://social.openitup.in 

Remove the existing ROOT application, and rename yours to ROOT.


No this did not worked I tried.



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



Re: how to set auto redirection in tomcat

2011-02-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

James,

On 2/23/2011 5:16 PM, James Godrej wrote:
 - Original Message 
 From: Caldarale, Charles R chuck.caldar...@unisys.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Thu, 24 February, 2011 3:01:01 AM
 Subject: RE: how to set auto redirection in tomcat
 
 From: James Godrej [mailto:jamesgod...@yahoo.in] 
 Subject: how to set auto redirection in tomcat
 
 I am using mod_ajp as a front end 
 
 Why?  What purpose is it serving?  
 If it's not doing anything useful (e.g., handling PHP), you should simplify 
 your 
 life and remove it.
 
 I am running at least 20 other websites and 2 of them use mod_proxy_ajp
 each of these is hosted on some machine internally on lan.
 
 How ever I have an application running on it 
 http://social.openitup.in/olat 
 what I want to do is when some one opens 
 http://social.openitup.in 
 
 Remove the existing ROOT application, and rename yours to ROOT.
 
 No this did not worked I tried.

Did you name it ROOT, or did you name it root (or Root or rOOt
or rooT)? Case matters, even on win32.

You might have to restart Tomcat after doing that.

Using ROOT as the webapp name definitely works. People do it all the
time...

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1llD8ACgkQ9CaO5/Lv0PD0twCeK84xRWWUFC92plxV18I45ICe
e7AAoI7AezKBuR47d2J3TuhLL0u/JgZ5
=CM7H
-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 set auto redirection in tomcat

2011-02-23 Thread James Godrej



On Thu, Feb 24, 2011 at 4:41 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 James,

 On 2/23/2011 5:16 PM, James Godrej wrote:
 - Original Message 
 From: Caldarale, Charles R chuck.caldar...@unisys.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Thu, 24 February, 2011 3:01:01 AM
 Subject: RE: how to set auto redirection in tomcat

 From: James Godrej [mailto:jamesgod...@yahoo.in]
 Subject: how to set auto redirection in tomcat

 I am using mod_ajp as a front end

 Why?  What purpose is it serving?
 If it's not doing anything useful (e.g., handling PHP), you should simplify 
your
 life and remove it.

 I am running at least 20 other websites and 2 of them use mod_proxy_ajp
 each of these is hosted on some machine internally on lan.

 How ever I have an application running on it
 http://social.openitup.in/olat
 what I want to do is when some one opens
 http://social.openitup.in

 Remove the existing ROOT application, and rename yours to ROOT.

 No this did not worked I tried.

 Did you name it ROOT, or did you name it root (or Root or rOOt
 or rooT)? Case matters, even on win32.

 You might have to restart Tomcat after doing that.

 Using ROOT as the webapp name definitely works. People do it all the
 time...

Yes renaming to ROOT worked.Thanks 
Christopher.



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



Tomcat url redirection

2010-09-21 Thread rujin raj
*Support team,
*
*
*
*
I'm working with an application that uses apache tomcat 6 to serve the
website. I've installed the application and tomcat on a Windows 2003
server and everything is working fine.For instance I want
http://events.mydomain.xxx/ to
go to http://events.mydomain.xxx/myapp.Moreover whenever i type the Public
IP address (http://xxx.yyy.zzz.aaa) instead of
events.mydomain.xxx should also redirect to
  http://events.mydomain.xxx/myapp.

Any ideas how I might do this with apache tomcat would be very helpful
and appreciated.

Thank you in advance.

Regards
rujinraj
*


Re: Tomcat url redirection

2010-09-21 Thread michel

http://tuckey.org



- Original Message - 
From: rujin raj rujin...@gmail.com

To: users@tomcat.apache.org
Sent: Tuesday, September 21, 2010 2:22 PM
Subject: Tomcat url redirection



*Support team,
*
*
*
*
I'm working with an application that uses apache tomcat 6 to serve the
website. I've installed the application and tomcat on a Windows 2003
server and everything is working fine.For instance I want
http://events.mydomain.xxx/ to
go to http://events.mydomain.xxx/myapp.Moreover whenever i type the Public
IP address (http://xxx.yyy.zzz.aaa) instead of
events.mydomain.xxx should also redirect to
 http://events.mydomain.xxx/myapp.

Any ideas how I might do this with apache tomcat would be very helpful
and appreciated.

Thank you in advance.

Regards
rujinraj
*




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



Re: Tomcat url redirection

2010-09-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rujin,

On 9/21/2010 2:22 PM, rujin raj wrote:
 Moreover whenever i type the Public
 IP address (http://xxx.yyy.zzz.aaa) instead of
 events.mydomain.xxx should also redirect to
   http://events.mydomain.xxx/myapp.

See Michel's response for redirection. If you want IP - hostname
switching, set up a rule that looks for a non-preferred Host header
and issues a redirect.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyZBE4ACgkQ9CaO5/Lv0PBNsQCeLQH8l961InR8mM0Z7vzp/LtV
GJEAoIrYnOoVKegQqMgOYEvHoIQa4oal
=52TO
-END PGP SIGNATURE-

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



RE: Tomcat url redirection

2010-09-21 Thread Caldarale, Charles R
 From: rujin raj [mailto:rujin...@gmail.com] 
 Subject: Tomcat url redirection

 I want http://events.mydomain.xxx/ to
 go to http://events.mydomain.xxx/myapp.

Then name your webapp ROOT (case sensitive, even on Windows), not myapp, just 
as the Tomcat doc says to do.

 Moreover whenever i type the Public
 IP address (http://xxx.yyy.zzz.aaa) instead of
 events.mydomain.xxx should also redirect to
 http://events.mydomain.xxx/myapp.

That will happen automatically if events.mydomain.xxx and xxx.yyy.zzz.aaa both 
map to an IP address on the server on which Tomcat runs, *and* you have Tomcat 
listening on address 0.0.0.0 (the default), *and* you rename your app to ROOT, 
as noted above.

No rewrite filters are required if you set things up properly.

 - 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: the welcome file index.jsp returns an 302 redirection

2010-07-08 Thread Bill Barker



lei jiang jianglei...@gmail.com wrote in message 
news:aanlktin0dhodp9brzlx589xkvuz4dar0dnklry637...@mail.gmail.com...

Hi, guys:

I am using the Tomcat 5.0.28.0, and I put the my website into webapps 
directory.


The welcome-file-list section likes this:

welcome-file-list
   welcome-fileindex.jsp/welcome-file
/welcome-file-list

In the index.jsp, I use the jsp:forward tag to forward the request to
a struts action:
jsp:forward page=welcome.do/

When I input http://localhost:8080/mysite; into the address bar of
firefox and hit go button, the browser shows the correct page but the
url in address bar changed to
http://localhost:8080/mysite/welcome.do;

I find that the tomcat returns a 302 redirection and then the tomcat
returns the page generated by welcome.do action

So what can we do to aviod the 302 redirection and let the address bar
just show http://localhost:8080/mysite;.



What Pid said:  Later versions than 5.0.x do an internal forward to the 
welcome-file, so the browser doesn't get to see the actual path to the 
welcome-file.  There are a couple of other sordid hacks using 
servlet-mapping that I'll admit to using on currently unsupported versions 
of Tomcat.



Thanks
Regards
--
Lei Jiang
Member of SeedClass in the Department of Electronics and Information 
Engineering

Member of Overseas group in Dian team
Room 507, Building D7,1037 Luoyu Road, Wuhan 430074,P.R.China
Mobile:+86-15926351274
Email: jianglei...@gmail.com 




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



the welcome file index.jsp returns an 302 redirection

2010-07-07 Thread lei jiang
Hi, guys:

I am using the Tomcat 5.0.28.0, and I put the my website into webapps directory.

The welcome-file-list section likes this:

welcome-file-list
welcome-fileindex.jsp/welcome-file
/welcome-file-list

In the index.jsp, I use the jsp:forward tag to forward the request to
a struts action:
jsp:forward page=welcome.do/

When I input http://localhost:8080/mysite; into the address bar of
firefox and hit go button, the browser shows the correct page but the
url in address bar changed to
http://localhost:8080/mysite/welcome.do;

I find that the tomcat returns a 302 redirection and then the tomcat
returns the page generated by welcome.do action

So what can we do to aviod the 302 redirection and let the address bar
just show http://localhost:8080/mysite;.

Thanks
Regards
-- 
Lei Jiang
Member of SeedClass in the Department of Electronics and Information Engineering
Member of Overseas group in Dian team
Room 507, Building D7,1037 Luoyu Road, Wuhan 430074,P.R.China
Mobile:+86-15926351274
Email: jianglei...@gmail.com

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



Re: the welcome file index.jsp returns an 302 redirection

2010-07-07 Thread André Warnier

lei jiang wrote:

Hi, guys:

I am using the Tomcat 5.0.28.0, and I put the my website into webapps directory.

The welcome-file-list section likes this:

welcome-file-list
welcome-fileindex.jsp/welcome-file
/welcome-file-list

In the index.jsp, I use the jsp:forward tag to forward the request to
a struts action:
jsp:forward page=welcome.do/

When I input http://localhost:8080/mysite; into the address bar of
firefox and hit go button, the browser shows the correct page but the
url in address bar changed to
http://localhost:8080/mysite/welcome.do;

I find that the tomcat returns a 302 redirection and then the tomcat
returns the page generated by welcome.do action

So what can we do to aviod the 302 redirection and let the address bar
just show http://localhost:8080/mysite;.


Naive suggestions :

1)
 welcome-file-list
 welcome-filewelcome.do/welcome-file
 /welcome-file-list

2) delete index.jsp and rename welcome.do to index.jsp

?


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



Re: the welcome file index.jsp returns an 302 redirection

2010-07-07 Thread Pid
On 07/07/2010 11:25, André Warnier wrote:
 lei jiang wrote:
 Hi, guys:

 I am using the Tomcat 5.0.28.0, and I put the my website into webapps
 directory.

 The welcome-file-list section likes this:

 welcome-file-list
 welcome-fileindex.jsp/welcome-file
 /welcome-file-list

 In the index.jsp, I use the jsp:forward tag to forward the request to
 a struts action:
 jsp:forward page=welcome.do/

 When I input http://localhost:8080/mysite; into the address bar of
 firefox and hit go button, the browser shows the correct page but the
 url in address bar changed to
 http://localhost:8080/mysite/welcome.do;

 I find that the tomcat returns a 302 redirection and then the tomcat
 returns the page generated by welcome.do action

 So what can we do to aviod the 302 redirection and let the address bar
 just show http://localhost:8080/mysite;.

 Naive suggestions :
 
 1)
  welcome-file-list
  welcome-filewelcome.do/welcome-file
  /welcome-file-list
 
 2) delete index.jsp and rename welcome.do to index.jsp

3) Upgrade your Tomcat, 5.0.x isn't supported anymore and it's REALLY OLD.


p


 ?
 
 
 -
 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: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection

2010-06-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bulkan,

On 6/21/2010 12:46 AM, Bulkan wrote:
 I am not running tomcat as a service. I directly start tomcat.exe

Tomcat.exe does not run Tomcat. So, how are you really starting Tomcat?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwfgr0ACgkQ9CaO5/Lv0PAnhgCfQufqvCMz72ZE9nzBgyIwYMlG
GgwAn0EhuQ9KtFFbEl4S3yiA2xeETMHA
=5lXq
-END PGP SIGNATURE-

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



RE: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection

2010-06-21 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection
 
 Tomcat.exe does not run Tomcat.

Well actually, tomcat6.exe does - it's just another JVM launcher.  You can use 
that in lieu of the scripts.  Running the .exe directly does require that the 
service be previously installed.

 - 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.



tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection

2010-06-20 Thread Bulkan
Hi All,

Before we upgraded from Tomcat 6.0.18 to 6.0.26 I was able to redirect
stdout/stderr of tomcat.exe using the following Python code;

 from subprocess import Popen
 logfile = open('tomcat.log', 'w')
 p = Popen(r'C:\Program Files\Apache Software Foundation\Tomcat
6.0\bin\tomcat6.exe', shell=True, stdout=logfile, stderr=logfile)

but with 6.0.26, the above code fails to redirect the output to tomcat.log,
all of the output goes to the console (cmd.exe).

Has something changed in 6.0.26 (Windows) that would effect this behaviour ?

Cheers
---
Bulkan Evcimen


Re: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection

2010-06-20 Thread Mark Eggers
If you're running as a service, why don't you make use of --StdOutput and 
--StdError as documented here:

http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html

Also, if you're running as a service, the Tomcat Monitor allows you to change 
this at any point. There's a tab called Logging that allows you to set a bunch 
of parameters.

/mde/

--- On Sun, 6/20/10, Bulkan bul...@gmail.com wrote:

 From: Bulkan bul...@gmail.com
 Subject: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection
 To: users@tomcat.apache.org
 Date: Sunday, June 20, 2010, 6:06 PM
 Hi All,
 
 Before we upgraded from Tomcat 6.0.18 to 6.0.26 I was able
 to redirect
 stdout/stderr of tomcat.exe using the following Python
 code;
 
  from subprocess import Popen
  logfile = open('tomcat.log', 'w')
  p = Popen(r'C:\Program Files\Apache Software
 Foundation\Tomcat
 6.0\bin\tomcat6.exe', shell=True, stdout=logfile,
 stderr=logfile)
 
 but with 6.0.26, the above code fails to redirect the
 output to tomcat.log,
 all of the output goes to the console (cmd.exe).
 
 Has something changed in 6.0.26 (Windows) that would effect
 this behaviour ?
 
 Cheers
 ---
 Bulkan Evcimen
 


  


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



Re: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection

2010-06-20 Thread Bulkan
Hi Mark,

I am not running tomcat as a service. I directly start tomcat.exe

Cheers



On Mon, Jun 21, 2010 at 1:41 PM, Mark Eggers its_toas...@yahoo.com wrote:

 If you're running as a service, why don't you make use of --StdOutput and
 --StdError as documented here:

 http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html

 Also, if you're running as a service, the Tomcat Monitor allows you to
 change this at any point. There's a tab called Logging that allows you to
 set a bunch of parameters.

 /mde/

 --- On Sun, 6/20/10, Bulkan bul...@gmail.com wrote:

  From: Bulkan bul...@gmail.com
  Subject: tomcat.exe 6.0.18 to 6.0.26 stdout/stderr redirection
  To: users@tomcat.apache.org
  Date: Sunday, June 20, 2010, 6:06 PM
  Hi All,
 
  Before we upgraded from Tomcat 6.0.18 to 6.0.26 I was able
  to redirect
  stdout/stderr of tomcat.exe using the following Python
  code;
 
   from subprocess import Popen
   logfile = open('tomcat.log', 'w')
   p = Popen(r'C:\Program Files\Apache Software
  Foundation\Tomcat
  6.0\bin\tomcat6.exe', shell=True, stdout=logfile,
  stderr=logfile)
 
  but with 6.0.26, the above code fails to redirect the
  output to tomcat.log,
  all of the output goes to the console (cmd.exe).
 
  Has something changed in 6.0.26 (Windows) that would effect
  this behaviour ?
 
  Cheers
  ---
  Bulkan Evcimen
 





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




Re: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-15 Thread André Warnier

Melanie wrote:

Thanks Cyrille for the information. This looks like it's a quick fix but
there is still another issue.

The Tomcat Startup Page is now being served, but not the actual springapp
J2EE web application that is located in the Tomcat directory ---
/usr/java/tomcat-5.5/webapps/springapp

Do you know the way to bring up the actual J2EE webpage instead of the
Tomcat Startup Page when the URL
http://www.robotronics.org is served by Apache and Tomcat?


Melanie,

backing up a little bit..

According to your various posts, originally, you have, on the same host :

- an Apache httpd, answering on http://www.robotronics.org (port 80), 
which serves html and javascript documents
- a Tomcat engine and an application in it, answering on 
http://www.robotronics.org:9080/Robotronics (thus port 9080, and a URI 
/Robotronics), but this application is located in the directory 
/usr/java/tomcat-5.5/webapps/springapp.


and you would apparently like that everything would answer to the URL
http://www.robotronics.org (port 80).

That is feasible, but the above is composed of several parts, and there 
are several ways to configure the individual parts.
So you have to be a bit systematic in the approach, and do one thing at 
a time.


A couple of questions to answer first are :
1) do you want to leave the html and javascript part under the Apache 
httpd server, or not ?
2) do you need this Apache httpd server for other things, apart from 
this specific case ?


The reason for these questions is that the easiest and simplest setup 
would be

- to move the html and javascript part onto the Tomcat server
- to eliminate the Apache httpd server
- to change the Tomcat server so that it responds to port 80 instead of 
port 9080
- to change the Tomcat configuration so that your webapp application 
becomes the default application of Tomcat, and thus answers to the URL

http://www.robotronics.org, without the /Robotronics prefix.

But, this simple setup would not be the right one if you want to keep 
the front-end Apache httpd, because for example you need it for other 
things (other virtual sites, other applications, etc..).
In that case, we would then recommend some form of proxying between 
Apache httpd and Tomcat.  And there are several possibilities there too.

Which is why I mention the need to take this one bit at a time..


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



Re: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-15 Thread Cyrille Le Clerc
   Hello Melanie,

   I share André's vision :

#1 To get the root context http://www.robotronics.org/ forwarded to
Tomcat, the easiest way is to declare your java application as the
root context of your Tomcat (either naming it ROOT.war or declaring it
with path= in server.xml according to your deployment method).

#1.1 If you cannot rename your tomcat app to serve Tomcat's root
context, look at context rewriting ; it would look like :

ProxyPass / http://my-tomcat:9080/Robotronics
ProxyPassReverse /Robotronics http://www.robotronics.org/


#2 You can mix the approach #1 to serve most of the
http://www.robotronics.org/ content including the root context with
Tomcat with serving sub parts of the web site directly from Apache
Httpd or from other servers.

ProxyPreserveHost On
ProxyPass /handle/in/httpd/rather/than/in/tomcat !
ProxyPass / http://my-tomcat:9080/

#3 Some people are afraid about performance cost of serving static
content from Tomcat rather than from Apache Httpd. For such problems,
I feel the solution resides more in the usage of standard HTTP caching
header Expires and Cache-Control combined with mod_expires and
mod_disk_cache rather than in copying static resources on Apache
Httpd.

#4 I slightly disagree with André on asking Tomcat to listen on port
80 ; I am very reluctant to this approach as it requires to run the
JVM as root ; I prefer the iptables approach (well described in the in
the rimuhosting doc you referred - 1).

Hope this helps,

Cyrille

1) http://rimuhosting.com/mod_jk2_and_mod_proxy_ajp.jsp#iptables
--
clecl...@xebia.fr
http://blog.xebia.fr


On Mon, Mar 15, 2010 at 11:37 AM, André Warnier a...@ice-sa.com wrote:

 Melanie wrote:

 Thanks Cyrille for the information. This looks like it's a quick fix but
 there is still another issue.

 The Tomcat Startup Page is now being served, but not the actual springapp
 J2EE web application that is located in the Tomcat directory ---
 /usr/java/tomcat-5.5/webapps/springapp

 Do you know the way to bring up the actual J2EE webpage instead of the
 Tomcat Startup Page when the URL
 http://www.robotronics.org is served by Apache and Tomcat?

 Melanie,

 backing up a little bit..

 According to your various posts, originally, you have, on the same host :

 - an Apache httpd, answering on http://www.robotronics.org (port 80), which 
 serves html and javascript documents
 - a Tomcat engine and an application in it, answering on 
 http://www.robotronics.org:9080/Robotronics (thus port 9080, and a URI 
 /Robotronics), but this application is located in the directory 
 /usr/java/tomcat-5.5/webapps/springapp.

 and you would apparently like that everything would answer to the URL
 http://www.robotronics.org (port 80).

 That is feasible, but the above is composed of several parts, and there are 
 several ways to configure the individual parts.
 So you have to be a bit systematic in the approach, and do one thing at a 
 time.

 A couple of questions to answer first are :
 1) do you want to leave the html and javascript part under the Apache httpd 
 server, or not ?
 2) do you need this Apache httpd server for other things, apart from this 
 specific case ?

 The reason for these questions is that the easiest and simplest setup would be
 - to move the html and javascript part onto the Tomcat server
 - to eliminate the Apache httpd server
 - to change the Tomcat server so that it responds to port 80 instead of port 
 9080
 - to change the Tomcat configuration so that your webapp application becomes 
 the default application of Tomcat, and thus answers to the URL
 http://www.robotronics.org, without the /Robotronics prefix.

 But, this simple setup would not be the right one if you want to keep the 
 front-end Apache httpd, because for example you need it for other things 
 (other virtual sites, other applications, etc..).
 In that case, we would then recommend some form of proxying between Apache 
 httpd and Tomcat.  And there are several possibilities there too.
 Which is why I mention the need to take this one bit at a time..


 -
 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: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-15 Thread André Warnier

Cyrille Le Clerc wrote:


#4 I slightly disagree with André on asking Tomcat to listen on port
80 ; I am very reluctant to this approach as it requires to run the
JVM as root ;


No, it does not, if you run the JVM under jsvc (commons-daemon).
This is how most Linux packages nowadays set it up by default.

But of course, you cannot run 2 servers at the same time listening on 
the same port. So if you want to have Tomcat handle port 80, then you 
cannot have Apache httpd listening to that same port at the same time.



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



Re: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-15 Thread Cyrille Le Clerc
My mistake on port 80 without being root, I never used jsvc ; I relied
on startup.sh.

Cyrille

On Mon, Mar 15, 2010 at 1:53 PM, André Warnier a...@ice-sa.com wrote:
 Cyrille Le Clerc wrote:

 #4 I slightly disagree with André on asking Tomcat to listen on port
 80 ; I am very reluctant to this approach as it requires to run the
 JVM as root ;

 No, it does not, if you run the JVM under jsvc (commons-daemon).
 This is how most Linux packages nowadays set it up by default.

 But of course, you cannot run 2 servers at the same time listening on the
 same port. So if you want to have Tomcat handle port 80, then you cannot
 have Apache httpd listening to that same port at the same time.


 -
 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



Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-14 Thread Melanie
 Hello,

 This question requires knowledge of Linux Apache Tomcat Server.

 I have a website with domain name for instance: www.robotronics.org
 However this site is only for HTML and Javascript.

 I have a Java J2EE site on the same domain name but you can't get to it
 unless you type the port:
 http://www.robotronics.org:9080/Robotronics

 How can I get the domain name www.robotronics.org to point to the Java
 J2EE site without having to type in the port 9080 and the directory
 Robotronics?

 I found one site that gives some ideas on how to do it --
 http://rimuhosting.com/mod_jk2_and_mod_proxy_ajp.jsp#mod_proxy

 I tried to follow the instructions and could not get this to work.

 Thank you,



RE: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-14 Thread Caldarale, Charles R
 From: Melanie [mailto:melanie.v...@gmail.com]
 Subject: Question on Linux Tomcat Apache Server and Port Redirection
 for a robotics site

You don't bother to mention what your current port 80 web server is, not what 
version of Tomcat you're using.  The links below presume you're using httpd and 
the current version of Tomcat.

 I found one site that gives some ideas on how to do it --
 http://rimuhosting.com/mod_jk2_and_mod_proxy_ajp.jsp#mod_proxy

mod_jk2 hasn't been supported in several years; don't even think about using it.

For proper instructions, read this first:
http://wiki.apache.org/tomcat/FAQ/Connectors

If you need it, the full doc is here:
http://tomcat.apache.org/connectors-doc/

 - 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.



RE: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-14 Thread Todd Hicks
Melanie, 

I would recommend using the Apache Tomcat Connector mod_jk. Documentation can 
be found here: 
http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html  
See what you can make of it.

-Original Message-
From: Melanie [mailto:melanie.v...@gmail.com] 
Sent: Sunday, March 14, 2010 6:47 PM
To: users@tomcat.apache.org
Subject: Question on Linux Tomcat Apache Server and Port Redirection for a 
robotics site

 Hello,

 This question requires knowledge of Linux Apache Tomcat Server.

 I have a website with domain name for instance: www.robotronics.org
 However this site is only for HTML and Javascript.

 I have a Java J2EE site on the same domain name but you can't get to it
 unless you type the port:
 http://www.robotronics.org:9080/Robotronics

 How can I get the domain name www.robotronics.org to point to the Java
 J2EE site without having to type in the port 9080 and the directory
 Robotronics?

 I found one site that gives some ideas on how to do it --
 http://rimuhosting.com/mod_jk2_and_mod_proxy_ajp.jsp#mod_proxy

 I tried to follow the instructions and could not get this to work.

 Thank you,



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



Re: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-14 Thread Melanie
Hi,

The version of Tomcat is 5.5.

As far as the other question on what is my current port 80 web server is? I
don't understand the question exactly.

It is a virtual dedicated server.

-Melanie

On Sun, Mar 14, 2010 at 6:56 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Melanie [mailto:melanie.v...@gmail.com]
  Subject: Question on Linux Tomcat Apache Server and Port Redirection
  for a robotics site

 You don't bother to mention what your current port 80 web server is, not
 what version of Tomcat you're using.  The links below presume you're using
 httpd and the current version of Tomcat.

  I found one site that gives some ideas on how to do it --
  http://rimuhosting.com/mod_jk2_and_mod_proxy_ajp.jsp#mod_proxy

 mod_jk2 hasn't been supported in several years; don't even think about
 using it.

 For proper instructions, read this first:
 http://wiki.apache.org/tomcat/FAQ/Connectors

 If you need it, the full doc is here:
 http://tomcat.apache.org/connectors-doc/

  - 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.




RE: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-14 Thread Caldarale, Charles R
 From: Melanie [mailto:melanie.v...@gmail.com]
 Subject: Re: Question on Linux Tomcat Apache Server and Port
 Redirection for a robotics site
 
 As far as the other question on what is my current port 80 web server
 is? I don't understand the question exactly.

You previously stated:

  I have a website with domain name for instance: www.robotronics.org
  However this site is only for HTML and Javascript.

Something has to be listening on port 80, in order to respond to browser 
requests for your existing HTML and Javascript; what is it?  (From the headers 
in the responses from your website, it appears to be httpd 2.2.8 - which is a 
couple of years old and could stand updating.)

 - 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.



Re: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-14 Thread Melanie
The Apache server appears to be:
Apache HTTP Server Version 2.2
On Sun, Mar 14, 2010 at 7:25 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Melanie [mailto:melanie.v...@gmail.com]
  Subject: Re: Question on Linux Tomcat Apache Server and Port
  Redirection for a robotics site
 
  As far as the other question on what is my current port 80 web server
  is? I don't understand the question exactly.

 You previously stated:

   I have a website with domain name for instance: www.robotronics.org
   However this site is only for HTML and Javascript.

 Something has to be listening on port 80, in order to respond to browser
 requests for your existing HTML and Javascript; what is it?  (From the
 headers in the responses from your website, it appears to be httpd 2.2.8 -
 which is a couple of years old and could stand updating.)

  - 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.




RE: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-14 Thread Todd Hicks
That's why I suggested mod_jk.


-Original Message-
From: Melanie [mailto:melanie.v...@gmail.com] 
Sent: Sunday, March 14, 2010 7:35 PM
To: Tomcat Users List
Subject: Re: Question on Linux Tomcat Apache Server and Port Redirection for a 
robotics site

The Apache server appears to be:
Apache HTTP Server Version 2.2
On Sun, Mar 14, 2010 at 7:25 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Melanie [mailto:melanie.v...@gmail.com]
  Subject: Re: Question on Linux Tomcat Apache Server and Port
  Redirection for a robotics site
 
  As far as the other question on what is my current port 80 web server
  is? I don't understand the question exactly.

 You previously stated:

   I have a website with domain name for instance: www.robotronics.org
   However this site is only for HTML and Javascript.

 Something has to be listening on port 80, in order to respond to browser
 requests for your existing HTML and Javascript; what is it?  (From the
 headers in the responses from your website, it appears to be httpd 2.2.8 -
 which is a couple of years old and could stand updating.)

  - 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: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-14 Thread Melanie
I am compiling mod_jk source code on the server. The command to compile is
./configure --with-apxs=/usr/sbin/apxs (or where ever the apxs/apxs2 is)

I did a quick linux find. -name apxs under the usr directory and nothing
turned up for apxs.

I don't think the mod_jk can be built without it. Is it because Apache Http
server is only 2.2 version?




On Sun, Mar 14, 2010 at 7:38 PM, Todd Hicks electronjoc...@hotmail.comwrote:

 That's why I suggested mod_jk.


 -Original Message-
 From: Melanie [mailto:melanie.v...@gmail.com]
 Sent: Sunday, March 14, 2010 7:35 PM
 To: Tomcat Users List
 Subject: Re: Question on Linux Tomcat Apache Server and Port Redirection
 for a robotics site

 The Apache server appears to be:
 Apache HTTP Server Version 2.2
 On Sun, Mar 14, 2010 at 7:25 PM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

   From: Melanie [mailto:melanie.v...@gmail.com]
   Subject: Re: Question on Linux Tomcat Apache Server and Port
   Redirection for a robotics site
  
   As far as the other question on what is my current port 80 web server
   is? I don't understand the question exactly.
 
  You previously stated:
 
I have a website with domain name for instance: www.robotronics.org
However this site is only for HTML and Javascript.
 
  Something has to be listening on port 80, in order to respond to browser
  requests for your existing HTML and Javascript; what is it?  (From the
  headers in the responses from your website, it appears to be httpd 2.2.8
 -
  which is a couple of years old and could stand updating.)
 
   - 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: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-14 Thread Todd Hicks
Melanie,
Try a precompiled binary: 
http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.28/

-Original Message-
From: Melanie [mailto:melanie.v...@gmail.com] 
Sent: Sunday, March 14, 2010 7:47 PM
To: Tomcat Users List
Subject: Re: Question on Linux Tomcat Apache Server and Port Redirection for a 
robotics site

I am compiling mod_jk source code on the server. The command to compile is
./configure --with-apxs=/usr/sbin/apxs (or where ever the apxs/apxs2 is)

I did a quick linux find. -name apxs under the usr directory and nothing
turned up for apxs.

I don't think the mod_jk can be built without it. Is it because Apache Http
server is only 2.2 version?




On Sun, Mar 14, 2010 at 7:38 PM, Todd Hicks electronjoc...@hotmail.comwrote:

 That's why I suggested mod_jk.


 -Original Message-
 From: Melanie [mailto:melanie.v...@gmail.com]
 Sent: Sunday, March 14, 2010 7:35 PM
 To: Tomcat Users List
 Subject: Re: Question on Linux Tomcat Apache Server and Port Redirection
 for a robotics site

 The Apache server appears to be:
 Apache HTTP Server Version 2.2
 On Sun, Mar 14, 2010 at 7:25 PM, Caldarale, Charles R 
 chuck.caldar...@unisys.com wrote:

   From: Melanie [mailto:melanie.v...@gmail.com]
   Subject: Re: Question on Linux Tomcat Apache Server and Port
   Redirection for a robotics site
  
   As far as the other question on what is my current port 80 web server
   is? I don't understand the question exactly.
 
  You previously stated:
 
I have a website with domain name for instance: www.robotronics.org
However this site is only for HTML and Javascript.
 
  Something has to be listening on port 80, in order to respond to browser
  requests for your existing HTML and Javascript; what is it?  (From the
  headers in the responses from your website, it appears to be httpd 2.2.8
 -
  which is a couple of years old and could stand updating.)
 
   - 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: Question on Linux Tomcat Apache Server and Port Redirection for a robotics site

2010-03-14 Thread Melanie
Thanks Cyrille for the information. This looks like it's a quick fix but
there is still another issue.

The Tomcat Startup Page is now being served, but not the actual springapp
J2EE web application that is located in the Tomcat directory ---
/usr/java/tomcat-5.5/webapps/springapp

Do you know the way to bring up the actual J2EE webpage instead of the
Tomcat Startup Page when the URL
http://www.robotronics.org is served by Apache and Tomcat?

No, I'm not French. The Google translations is rough.

Thank you,

-Melanie


On Sun, Mar 14, 2010 at 8:00 PM, Cyrille Le Clerc clecl...@apache.orgwrote:

 Hello Melanie,

 I personally prefer to use HTTP between Apache and Tomcat rather than
 the proprietary AJP protocol.

 According to your description, I feel you can simply achive your need
 with the following httpd.conf configuration (no other binaries than
 out-of-the-box Apache Httpd needed) :

 -- begin httpd.conf sample fragment --

 # load proxy and proxy_http modules
 LoadModule proxy_module libexec/apache2/mod_proxy.so
 LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so
 ...

 # route all traffic to Tomcat
 ProxyPreserveHost On
 ProxyPass / http://my-tomcat-server:9080/

 -- end httpd.conf sample fragment --

 I blogged in French about Tomcat-Apache configuration. Hopefully, as
 your name sounds french :-) you can understand them ; otherwise, they
 are google-translate friendly :


 http://blog.xebia.fr/2010/02/03/tomcat-load-balancing-mod_proxy-vs-mod_jk-le-match/

 http://blog.xebia.fr/2009/05/05/tomcat-adresse-ip-de-linternaute-load-balancer-reverse-proxy-et-header-http-x-forwarded-for/

 http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/


 Hope this helps, good luck

 Cyrille

 --
 Cyrille Le Clerc
 clecl...@xebia.fr
 http://blog.xebia.fr

 On Sun, Mar 14, 2010 at 11:47 PM, Melanie melanie.v...@gmail.com wrote:
  Hello,
 
  This question requires knowledge of Linux Apache Tomcat Server.
 
  I have a website with domain name for instance: www.robotronics.org
  However this site is only for HTML and Javascript.
 
  I have a Java J2EE site on the same domain name but you can't get to it
  unless you type the port:
  http://www.robotronics.org:9080/Robotronics
 
  How can I get the domain name www.robotronics.org to point to the Java
  J2EE site without having to type in the port 9080 and the directory
  Robotronics?
 
  I found one site that gives some ideas on how to do it --
  http://rimuhosting.com/mod_jk2_and_mod_proxy_ajp.jsp#mod_proxy
 
  I tried to follow the instructions and could not get this to work.
 
  Thank you,
 
 

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




Re: help on tomcat 5.0 log (stdout) setup or redirection

2009-05-01 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Xie,

On 4/30/2009 4:07 PM, Xie Xiaodong wrote:
 You can find log file in the directory: tomcat_installation_folder/logs,
 and you could have your own log4j.xml file (if you use log4j do your logging
 job) specifying the location you want your log find at.

It's more complicated than that if you want to use log4j with Tomcat 5.0.

Hao, can you be more specific about how you are starting Tomcat? Are you
using startup.bat? If so, the console is the only place most of that
stuff will be logged.

If, instead, you use Tomcat as a service on your Windows machine, the
console will be redirected to logs/catalina.out so you can review it later.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkn7UsUACgkQ9CaO5/Lv0PBVMwCgrcghmMVS/qe/wuEZuBsbdISH
TYUAoIiAdpm4PsAdeBi+Z0tCcg+UsmFC
=v4no
-END PGP SIGNATURE-

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



help on tomcat 5.0 log (stdout) setup or redirection

2009-04-30 Thread Xiaohao Jiang
Hi there,

I am really new to tomcat basic configuration. I am using a tomcat 5.0,
coming with a digital object repository. It uses the command line to start
the server (tomcat and the application). Anyway, my problem is that I can
only see the tomcat log on the console, but i don't have it in any file.
However, sometimes the application throws a serial of exceptions and I
cannot get those scrolled away in the console.

What I want is to have the log information stored in a file. I tried
something like startup.bat  C:\log.txt, but the tomcat window just pops up
and output logs in console.

anybody can help?

Many thanks,
Hao


Re: help on tomcat 5.0 log (stdout) setup or redirection

2009-04-30 Thread Xie Xiaodong
Hello,

You can find log file in the directory: tomcat_installation_folder/logs,
and you could have your own log4j.xml file (if you use log4j do your logging
job) specifying the location you want your log find at.





2009/4/30 Xiaohao Jiang jiang.xiao...@gmail.com

 Hi there,

 I am really new to tomcat basic configuration. I am using a tomcat 5.0,
 coming with a digital object repository. It uses the command line to start
 the server (tomcat and the application). Anyway, my problem is that I can
 only see the tomcat log on the console, but i don't have it in any file.
 However, sometimes the application throws a serial of exceptions and I
 cannot get those scrolled away in the console.

 What I want is to have the log information stored in a file. I tried
 something like startup.bat  C:\log.txt, but the tomcat window just pops up
 and output logs in console.

 anybody can help?

 Many thanks,
 Hao




-- 
Sincerely yours and Best Regards,
Xie Xiaodong


HTTP 500 Error in redirection

2009-04-14 Thread MMcElroy
-inf directory
[debug] jk_isapi_plugin.c (1938): [/examples/helloworld.jsp] is a servlet
url - should redirect to testworker
[debug] jk_isapi_plugin.c (1978): fowarding escaped URI
[/examples/helloworld.jsp]

I use Tomcat 5.5, IIS 5.1 and isapi_redirect.dll 1.2.28.  My ISAPI Filter in
IIS has the green arrow.  I'm pretty stumped at this point, being very rusty
on my JSP and Tomcat skills.  Thanks in advance!

-- 
View this message in context: 
http://www.nabble.com/HTTP-500-Error-in-redirection-tp2305p2305.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: redirection

2009-04-01 Thread mateo-jl

Hi,

i think, the best way is to use the mod_jk module. So, in a firewall 
environment, you can have your web server (Apache) in the non-protected area 
and apache will redirect all requests (http:// :80 or nothing) at your 
Tomcat server (http:// :8080) within the protected one. 
Take a look at the connectors documentation
http://tomcat.apache.org/connectors-doc/

JL

 Message du 31/03/09 18:59
 De : Melanie Pfefer 
 A : users@tomcat.apache.org
 Copie à : 
 Objet : redirection
 
 
 
 Hello
 
 I have a tomcat server running on port 8080.
 
 users need to create a dns alias which is on port 80. redirection cannot be 
 done on DNS level of course.
 
 do you have any idea how to achieve this in tomcat. For example:
 
 http://siroe redirects to http://machineX:8080 that is a tomcat application?
 
 thank you 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 


RE: redirection

2009-04-01 Thread Caldarale, Charles R
 From: mateo-jl [mailto:mateo...@orange.fr]
 Subject: re: redirection
 
 i think, the best way is to use the mod_jk module. So, in a firewall
 environment, you can have your web server (Apache) in the non-protected
 area and apache will redirect all requests (http:// :80 or nothing)
 at your Tomcat server (http:// :8080) within the protected one.

In what way would that improve security?  Since all requests would be forwarded 
to Tomcat, adding httpd accomplishes nothing except additional overhead and 
complexity.  It's silly to place *anything* in a completely unprotected area; 
you would still have a firewall in place restricting access to just ports 80 
and 443, even if httpd were handling those ports.  Might as well have Tomcat 
handle those ports directly.

 - 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.



RE: redirection

2009-04-01 Thread fredk2

I would be better...The apache httpd web server is more versatile and its
vulnerabilities are better researched. You can also add mod_security and
other modules to further protect the Tomcat against common attacks (assuming
you do not use a WAF firewall).  Furthermore you can add more Tomcats and
balance when needed... also on unix if you do not use jsvc or iptable you
need to run tomcat as root for port 80 which is not a good idea...etc...

Rgds - Fred

Caldarale, Charles R wrote:
 
 From: mateo-jl [mailto:mateo...@orange.fr]
 Subject: re: redirection
 
 i think, the best way is to use the mod_jk module. So, in a firewall
 environment, you can have your web server (Apache) in the non-protected
 area and apache will redirect all requests (http:// :80 or nothing)
 at your Tomcat server (http:// :8080) within the protected one.
 
 In what way would that improve security?  Since all requests would be
 forwarded to Tomcat, adding httpd accomplishes nothing except additional
 overhead and complexity.  It's silly to place *anything* in a completely
 unprotected area; you would still have a firewall in place restricting
 access to just ports 80 and 443, even if httpd were handling those ports. 
 Might as well have Tomcat handle those ports directly.
 
  - 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.
 
 
 

-- 
View this message in context: 
http://www.nabble.com/redirection-tp22809932p22827189.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: redirection

2009-04-01 Thread Caldarale, Charles R
 From: fredk2 [mailto:fre...@gmail.com]
 Subject: RE: redirection
 
 The apache httpd web server is more versatile 

Additional versatility is worthless if not needed; from a security perspective 
it merely provides more opportunities for abuse.

 its vulnerabilities are better researched

Evidence, please?  Just because httpd has been around longer does not 
necessarily mean it is more secure.  Besides, since the previously suggested 
arrangement was to forward all requests to Tomcat, httpd security is of no 
interest.

 (assuming you do not use a WAF firewall)

If you're not using a firewall, you're simply asking for trouble.

 Furthermore you can add more Tomcats and balance when needed

Performance was not a topic of discussion; even if it were, there are much 
superior load balancers available (although they do have a cost).

 on unix if you do not use jsvc or iptable you need to run 
 tomcat as root for port 80 which is not a good idea

No one ever suggested running Tomcat as root.

 - 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: redirection

2009-04-01 Thread Peter Crowther
 From: fredk2 [mailto:fre...@gmail.com]
 I would be better...The apache httpd web server is more
 versatile

Irrelevant to this problem.

 and its vulnerabilities are better researched.

References for that assertion?  I'm not disagreeing, I'd just be interested in 
the hard data.

 You can also add
 mod_security and
 other modules to further protect the Tomcat against common
 attacks (assuming you do not use a WAF firewall).

And, indeed, that Apache + mod_security + mod_jk + Tomcat has fewer 
vulnerabilities than just Tomcat.

 Furthermore you can add more Tomcats and
 balance when needed...

Irrelevant to this problem, though I agree with you in the general case.

 also on unix if you do not use jsvc or
 iptable you
 need to run tomcat as root for port 80 which is not a good
 idea...etc...

True, but that's like saying if you do not have a lock on your front door, 
your front door will not be locked which is not a good idea.  Why would anyone 
*not* run using jsvc or iptables?

- Peter

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



RE: redirection

2009-04-01 Thread mateo-jl

Indeed the topic of this discussion is not to have 8080 as the main port of 
Tomcat.
I've just emitted one solution among many others: mod_jk. 
Some of my customers have opted for this one because of the simplicity of 
writing url, of performance (load-balancing), 
of security too (No-using 80 port for Tomcat was a security directive in some 
cases)



 Message du 01/04/09 15:47
 De : Caldarale, Charles R 
 A : Tomcat Users List 
 Copie à : 
 Objet : RE: redirection
 
  From: mateo-jl [mailto:mateo...@orange.fr]
  Subject: re: redirection
  
  i think, the best way is to use the mod_jk module. So, in a firewall
  environment, you can have your web server (Apache) in the non-protected
  area and apache will redirect all requests (http:// :80 or nothing)
  at your Tomcat server (http:// :8080) within the protected one.
 
 In what way would that improve security? Since all requests would be 
 forwarded to Tomcat, adding httpd accomplishes nothing except additional 
 overhead and complexity. It's silly to place *anything* in a completely 
 unprotected area; you would still have a firewall in place restricting access 
 to just ports 80 and 443, even if httpd were handling those ports. Might as 
 well have Tomcat handle those ports directly.
 
 - 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.
 
 


Re: redirection

2009-04-01 Thread Gregor Schneider
On Wed, Apr 1, 2009 at 4:22 PM, Peter Crowther
peter.crowt...@melandra.com wrote:

 And, indeed, that Apache + mod_security + mod_jk + Tomcat has fewer 
 vulnerabilities than just Tomcat.


Since I'm interested on hard data, too, hand over the facts, please.

It's just that I'm curious...

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/

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



RE: redirection

2009-04-01 Thread Peter Crowther
 From: Gregor Schneider [mailto:rc4...@googlemail.com]
 On Wed, Apr 1, 2009 at 4:22 PM, Peter Crowther
 peter.crowt...@melandra.com wrote:
 
  And, indeed, that Apache + mod_security + mod_jk + Tomcat
 has fewer vulnerabilities than just Tomcat.
 

 Since I'm interested on hard data, too, hand over the facts, please.

Quite.  If you look at the full original quote...

-- snip --
 From: fredk2 [mailto:fre...@gmail.com]
[...]
 (assuming you do not use a WAF firewall).

And, indeed, that Apache + mod_security + mod_jk + Tomcat has fewer 
vulnerabilities than just Tomcat.
-- snip --

... I was re-using the assuming from the previous poster's brackets.  Sorry - 
I should have made that more explicit.  Here's the re-stated version:

And, indeed, *assuming* that Apache + mod_security + mod_jk + Tomcat has fewer 
vulnerabilities than just Tomcat.

I'd also be very interested to see the evidence (either way) on that.

- Peter

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



Re: redirection

2009-04-01 Thread André Warnier

Melanie Pfefer wrote:

Hello

I have a tomcat server running on port 8080.

users need to create a dns alias which is on port 80. redirection cannot be 
done on DNS level of course.

do you have any idea how to achieve this in tomcat. For example:

http://siroe redirects to http://machineX:8080 that is a tomcat application?


Hi Melanie.
Since by now, after all these ponderous answers, you might be pretty 
confused as to what to do, let me restart from the beginning.


First, you can configure Tomcat to accept requests on port 80, instead 
of, or in addition to, port 8080.
That is easy, and you would do it in principle by changing in the 
server.xml file, the existing Connector ... port=8080 to Connector 
... port=80.  That's almost it.
The only catch is that in order for this to work, this Tomcat would need 
to run as user root, because only user root can run a process that opens 
a listening port = 1024.


If this Tomcat cannot run as root, then there is a workaround : you can 
use something called jsvc, which is like a wrapper process which 
starts as root, opens port 80 for Tomcat, then runs Tomcat as a non-root 
user.  That allows Tomcat to run as a non-root user, and to still listen 
on port 80.


If none of the above is possible, then you could indeed run an Apache 
httpd in front of your Tomcat.  The Apache httpd (maybe one that is 
there already), can accept requests on port 80, look at the request, 
determine that it is one that Tomcat should handle, and pass it to the 
back-end Tomcat on another port.  This can be done in several ways :


1) the front-end Apache httpd, which listens on port 80, can just act as 
a HTTP proxy, and pass the appropriate requests to the back-end Tomcat 
on the Tomcat HTTP port 8080.
2) the front-end Apache can act as an AJP proxy, and pass requests to 
Tomcat using the AJP protocol.  This requires adding another Connector 
to Tomcat, to listen for requests that use that protocol.

There are 2 sub-cases of this :
2a) using (at the Apache httpd level), a module called mod_proxy_ajp
2b) using (at the Apache httpd level), a module called mod_jk
(In both cases, you can choose the port Tomcat uses to listen for that)

If none of the above is possible or practical, then there are still 
other solutions, using other methods in software/hardware.


Roughly, the above is in order of increasing complexity.

The issue here is not to find a solution (there are many), but to find 
the solution that is the easiest and best-adapted to your problem.


Your initial post above is not very clear as to why you need this.
Tell us a bit more about your real problem and we could probably do 
better at recommending an appropriate solution to you.



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



Re: redirection

2009-04-01 Thread Gregor Schneider
Peter,

On Wed, Apr 1, 2009 at 4:58 PM, Peter Crowther
peter.crowt...@melandra.com wrote:

 And, indeed, *assuming* that Apache + mod_security + mod_jk + Tomcat has 
 fewer vulnerabilities than just Tomcat.

 I'd also be very interested to see the evidence (either way) on that.

See, I believe in the statement that the more components you're adding
to an environment, the more possibilities there are for a
security-hole. However, to believe is not to know...

However, when I check full-disclosure and other security-lists, I see
few issues referring to Tomcat, but I see quite some issues referring
to HTTPD and it's modules.

I guess if you're once able to break HTTPD and found your way into the
box, harm is on it's way. I further /believe/ that from this point it
makes sense to use as few components as possible.

Anyhow, that's what I believe, not what I know.

Cheers

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/

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



  1   2   3   >