Re: Nginx 1.18 - sub_filter + if statement

2020-09-10 Thread J.R.
Check the 'context' for the sub_filter directives you are trying to use. They do not say they can be used with 'if'. http://nginx.org/en/docs/http/ngx_http_sub_module.html Also worth reading about using 'if': https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/ _

large number of cache files

2020-09-10 Thread Roger Fischer
Hello, from a practical perspective, what would be considered an unreasonable large number of cache files (unique cache keys) in a single nginx server? 1M, 10M, 100M? With a large cache, would there be any significant benefit in using multiple caches (multiple key_zones) in a single nginx serv

Nginx 1.18 - sub_filter + if statement

2020-09-10 Thread Ahmed Sajid
Hi All, Not sure if this question has been answered before. The only evidence I could find was a StackExchange question https://serverfault.com/questions/774750/use-of-sub-filter-in-if-block-under-nginx-config with no answer. Here's what I'm trying to accomplish: * If the request is comin

Re: RE: RE: RE: Redirect Question for Directory Structure Change

2020-09-10 Thread figshta
Reinis, Thank you so much for all your help! I have succeeded in getting things set up for now. I couldn't have done it with out you guys. I have learned a lot form you and Francis and I am very grateful. Thank you for being patient with my ignorance. Sorry to both of you for wasting your time

Re: RE: proxy_pass Not Working on Port 80

2020-09-10 Thread figshta
Francis, Thank you very much for the detailed reply and being patient with me. I have learned a lot from you and Reinis and I am truly grateful. My sites are now working with TLS/SSL... I couldn't have done it with out you guys!! >curl -v http://www.example.com/one/two.html I see the value in

Re: Redirect Question for Directory Structure Change

2020-09-10 Thread J.R.
You really should use a custom named capture group as the default "$1" (and $2, $3, $4...) can cause erroneous output if there is any other capturing going on in your configuration files... i.e. location ~ ^/e/(?.*) { return 301 /$x1$is_args$args; } As someone else mentioned, be

Re: RE: RE: RE: Redirect Question for Directory Structure Change

2020-09-10 Thread figshta
>You should clean cache (or set to never cache) for each testing session/config change as browsers tend to cache the redirects very heavily (especially for static content). >A better way as Francis suggested is to use a curl or other tools (like wget -S ..) which don't cache anything and you'll al

RE: RE: RE: Redirect Question for Directory Structure Change

2020-09-10 Thread Reinis Rozitis
> Please bear with me... > It seems that I'm getting different results than I described earlier... > > In fact it is now working for the most part... > The errors are limited to certain files in Chrome on the Mac, but not in > Safari > or Firefox. You should clean cache (or set to never cache) f

Re: RE: RE: Redirect Question for Directory Structure Change

2020-09-10 Thread figshta
Thank you Reinis! Please bear with me... It seems that I'm getting different results than I described earlier... In fact it is now working for the most part... The errors are limited to certain files in Chrome on the Mac, but not in Safari or Firefox. >What do you mean by "got deeper" can you g

Re: RE: proxy_pass Not Working on Port 80

2020-09-10 Thread Francis Daly
On Thu, Sep 10, 2020 at 01:31:48AM -0400, figshta wrote: Hi there, > I realize that some of these are probably rhetorical questions, but in the > interest of learning, I will try to answer them anyway. No, not rhetorical. Also, not general. I mean: when you reply with "does not work", what was

RE: RE: Redirect Question for Directory Structure Change

2020-09-10 Thread Reinis Rozitis
> I was wrong... > > >This seems to work: > >>rewrite ^/e/(.*) /$1 permanent; > > It only works for the first level... > 'threedaystubble.com/Gallery.html' works but other links from that page that > got deeper into the file structure do not! What do you mean by "got deeper" can you give a sampl