Re: non www to www URL Rewrite

2017-11-11 Thread RAVIRAJ SHAH
Thanks shiv,

But no luck it is not working
I did configuration as below

Created rewrite.config file in
../conf/Catalina/example.com

RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{HTTPS} ^on$
RewriteRule ^(.*)$ https://www.example.com/$[R=permanent,L,NE]

And added valve as below in server.xml



Do guide if anything to correct or any other solution

On Fri, Nov 10, 2017, 14:43 shivashankar manukondu <
sivasankar.m...@gmail.com> wrote:

> Hi,
>
> If you want both should be accessible then try to use "ServerAlias" option
>
> If you want redirect all requests then try
>
> RewriteCond %{HTTP_HOST} ^example\.com [NC]
> RewriteCond %{HTTPS} ^on$#if you don't want https then make off
> RewriteRule ^(.*)$ https://www.example.com/$ [R=permanent,L,NE]  #
> flags based on your requirement
>
> Please remember the above rules will be work based on all your existing
> rewrite rules.
>
>
> Regards,
> Siva
>
>
>
> On Thu, Nov 9, 2017 at 10:58 AM, RAVIRAJ SHAH 
> wrote:
>
> > Hi Andre,
> >
> > Thanks for quick reply
> > yes it is pointing to same public IP
> >
> > Thanks,
> > Raviraj
> >
> >
> >
> > Thanks & Regards,
> > Raviraj Shah
> >
> >
> > On 8 November 2017 at 22:50, André Warnier (tomcat) 
> wrote:
> >
> > > On 08.11.2017 17:35, RAVIRAJ SHAH wrote:
> > >
> > >> Sorry for my language
> > >> my query with example
> > >>
> > >> Let's say my website domain is "example.com"
> > >> Now I want to redirect "example.com" to "www.example.com"
> > >> Kindly share how I can achieve it
> > >>
> > >
> > > Well first, you need the 2 entries in the DNS server for "example.com
> ".
> > > You need :
> > > example.com --> public Internet IP address of your server (A)
> > > www.example.com --> public  Internet IP address of your server (B)
> > >
> > > and A == B
> > >
> > > otherwise it will never work.
> > > Do you have that ?
> > >
> > > You can check this by getting a command-line window somewhere and
> > entering
> > > :
> > > nslookup example.com
> > > nslookup www.example.com
> > > and both should give the same IP address.
> > >
> > >
> > >
> > >
> > >
> > >> On Wed, Nov 8, 2017, 19:08 André Warnier (tomcat) 
> > wrote:
> > >>
> > >> On 08.11.2017 14:30, RAVIRAJ SHAH wrote:
> > >>>
> >  Anybody please help
> > 
> > >>>
> > >>> I think that you first try to communicate more clearly what you want
> to
> > >>> achieve.
> > >>> "redirect non-www URL to www URL only"
> > >>> does not appear to make much sense.
> > >>>
> > >>> Also please send your message to the list as *plain text*, not html.
> > >>> It will make it easier to read configuration lines below which look
> > like
> > >>> URL's.
> > >>>
> > >>>
> > >>>
> >  On Tue, Nov 7, 2017, 12:00 RAVIRAJ SHAH 
> >  wrote:
> > 
> >  Dear All,
> > >
> > > Kindly request you to help to resolve this issue
> > >
> > > Problem Statement :
> > > we want to redirect non-www URL to www URL only
> > >
> > > Current setup :
> > >
> > > Defined rewrite valve in server.xml as below
> > >
> > >
> > >  > > autoDeploy=
> > > "true">
> > >
> > >
> > >
> > >> >
> >  />
> > >>>
> > 
> > >
> > >
> > > 
> > >
> > > Created rewrite.config file in ../conf/Catalina//
> > >
> > >
> > > *RewriteCond %{HTTP_HOST} !^(.*)\.yourdomain\.com$ [NC] RewriteRule
> > >
> >  ^(.*)$
> > >>>
> >  http://www.yourdomain.com /$1 [R=301,L]*
> > >
> > > *kindly do needful*
> > >
> > > Thanks & Regards,
> > > Raviraj Shah
> > >
> > >
> > >
> > 
> > >>>
> > >>> -
> > >>> 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
> > >
> > >
> >
>
>
>
> --
>
> Regards
> Siva
> #068860592040
>


Re: Service killed by signal 9

2017-11-11 Thread Greg Huber
Coty,

I will try and set it back to 256k, I am using centos 7 on the latest
kernel.

It is an older PC and has 4gb of memory but only reports 3gb.

I can see from top that the memory is not good (gkreallm reports 800mb free)

top - 08:35:40 up  2:25,  1 user,  load average: 0.50, 0.18, 0.14
Tasks: 258 total,   1 running, 257 sleeping,   0 stopped,   0 zombie
%Cpu(s): 13.4 us,  2.2 sy,  0.0 ni, 84.1 id,  0.2 wa,  0.0 hi,  0.2 si,
0.0 st
KiB Mem :  3036956 total,   236104 free,  2216104 used,   584748 buff/cache
KiB Swap:  2113532 total,  1912644 free,   200888 used.   516460 avail Mem

 PID  USER  PR  NI  VIRT   RES   SHR S  %CPU %MEM  TIME+   COMMAND
 1292 user20   03435632 476088   6560 S   0.3 15.7
4:43.96  jsvc

Cheers Greg


On 10 November 2017 at 15:06, Coty Sutherland  wrote:

> On Fri, Nov 10, 2017 at 4:31 AM, Greg Huber  wrote:
> > Since switching to jsvc, randomly I am getting tomcat restarting, looking
> > at the logs I see that the jsvc is using alot of memory total-vm:  and
> > being killed by the system.
> >
> > Nov  9 13:11:11 prodbox kernel: Out of memory: Kill process 1287 (jsvc)
> > score 121 or sacrifice child
> > Nov  9 13:11:11 prodbox kernel: Killed process 1287 (jsvc)
> > total-vm:3453120kB, anon-rss:378280kB, file-rss:0kB, shmem-rss:0kB
> >
> > I am using the below on properties on the startup (from previous version
> > statup scripts):
> >
> > -Xms256M -Xmx768m -Xss1280k -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500
> > -XX:GCTimeRatio=9 -server -XX:+DisableExplicitGC
> >
> > (I replaced -Xss256k with -Xss1280k to stop crashing see
> > https://issues.apache.org/jira/browse/DAEMON-365)
>
> The root cause for that broke a lot of things, so I imagine your OS
> has fixed the kernel problem by now. If you tell me which OS I can try
> and see if it's fixed for you. I'd suggest that you try reducing your
> Xss back to 256k and see if that shrinks your process size enough to
> keep it off of oom-killer's radar.
>
> > Is there a way to limit the total-vm or find out why its got so big?
> > -XX:+DisableExplicitGC ??
> >
> > Standard tomcat install with apache/modjk.
> >
> > Cheers Greg
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>