Re: Set browser cache to current month!

2019-01-13 Thread shahzaib mushtaq
Hi Peter, Thanks for help, can you direct me to some tutorial to help me do that ? I am new to Lua . On Mon, Jan 14, 2019 at 3:21 AM Peter Booth via nginx wrote: > If you use the openresty nginx distribution then you can write a few lines > of Lua to implement your custom logic. > > Sent from m

Re: How to avoid nginx failure in case of bad certificate ?

2019-01-13 Thread Pierre Couderc
Thank you very much... So simple solution ! On 1/13/19 2:20 PM, Anoop Alias wrote: You can reload instead of restart and nginx would continue working on old config if the new one is invalid On Sun, Jan 13, 2019 at 2:31 PM Pierre Couderc > wrote: In case of bad c

Re: Use sub-url to identify the different server

2019-01-13 Thread nevereturn01
Hi Francis, Thanks for your reply. Since I'm not in the website develop team, I cannot let them change the url structure:( Now, I'm tring to use URL rewrite. I've tried the following: == location /site1 { rewrite ^/site1/(.*) /$1 break; proxy

Re: Set browser cache to current month!

2019-01-13 Thread Peter Booth via nginx
If you use the openresty nginx distribution then you can write a few lines of Lua to implement your custom logic. Sent from my iPhone > On Jan 13, 2019, at 9:13 AM, shahzaib mushtaq wrote: > > Hi, > > We've a location like /school for which we want to set browser cache lifetime > as 'current

Re: Set browser cache to current month!

2019-01-13 Thread shahzaib mushtaq
Currently I'm using these lines to configure http caching within my Nginx: location /schools { expires 2d; add_header Cache-Control public; ... } On Sun, Jan 13, 2019 at 7:57 PM Richard Demeny wrote: > browser cache = client-side cache. > > nginx cache = server-side cache. > > Set cache expiry f

Re: Set browser cache to current month!

2019-01-13 Thread Richard Demeny
browser cache = client-side cache. nginx cache = server-side cache. Set cache expiry flag ? On Sunday, January 13, 2019, shahzaib mushtaq wrote: > Hi, > > We've a location like /school for which we want to set browser cache > lifetime as 'current month'. Suppose /school is accessed on 10th Jan

Set browser cache to current month!

2019-01-13 Thread shahzaib mushtaq
Hi, We've a location like /school for which we want to set browser cache lifetime as 'current month'. Suppose /school is accessed on 10th January, its cache should be valid until end of January not 10th February and if accessed on 25th February its validity must be until the end of February month.

Re: How to avoid nginx failure in case of bad certificate ?

2019-01-13 Thread Anoop Alias
You can reload instead of restart and nginx would continue working on old config if the new one is invalid On Sun, Jan 13, 2019 at 2:31 PM Pierre Couderc wrote: > In case of bad certificate (certificate file missing for exemple), nginx > fails to restart. > > Is there a way to avoid that ? > > T

How to avoid nginx failure in case of bad certificate ?

2019-01-13 Thread Pierre Couderc
In case of bad certificate (certificate file missing for exemple), nginx fails to restart. Is there a way to avoid that ? There may be an error on one site without stopping all other correct sites. This occurs particularly in case we remove an old site, and make an error in configuration file