Great, thank you for that explanation, I do happen to have hundreds. ___________________________________________ Michael Friscia Office of Communications Yale School of Medicine (203) 737-7932 - office (203) 931-5381 - mobile http://web.yale.edu http://web.yale.edu/ On 3/23/18, 11:37 AM, "nginx on behalf of Igor Sysoev" <nginx-bounces@nginx.org on behalf of igor@sysoev.by wickedhangover - Nginx Mailing List - English
Ok, that worked out really well. For anyone following I had to go here https://forum.nginx.org/read.php?2,279172,279176#msg-279176 because our exchange server destroyed the sample URLs. But I’m not sure how the location order is mitigated. Is this because the first location match is a regex instead of just a string match? ___________________________________________ Michael Frisciaby wickedhangover - Nginx Mailing List - English
I’m wondering how to achieve this in the config I have a url like this http://example.com/people/mike and I want to redirect to https://www.othersite.com/users/mike the problem at hand is switching “/people/” to “/users/” but keep everything else so if I was to have http://example.com/people/mike/education?page=1 I would still get redirected to https://www.othersite.com/useby wickedhangover - Nginx Mailing List - English
The question is if these are cached as different files http://myurl.html http://MyUrl.html I’m assuming that both would be different cache locations since the md5 would be different on each but ideally these would be the same cached file to prevent dupes. My question is about the proxy_cache_key, when that is generated, is it case sensitive? We ran a quick test and it seemed to be true tby wickedhangover - Nginx Mailing List - English
This is great, thank you again, this is a huge jumpstart! ___________________________________________ Michael Friscia Office of Communications Yale School of Medicine (203) 737-7932 - office (203) 931-5381 - mobile http://web.yale.edu http://web.yale.edu/ On 3/19/18, 1:43 PM, "nginx on behalf of lists@lazygranch.com" <nginx-bounces@nginx.org on behalf of lists@lazygrancby wickedhangover - Nginx Mailing List - English
Thank you Gary, I really appreciate you moving me in the right direction. Sent from my iPhone with all its odd spell checks On Mar 19, 2018, at 9:36 AM, Gary <lists@lazygranch.com<mailto:lists@lazygranch.com>> wrote: Your basic idea is right, but what you want to do is use a "map." I will follow up with more details when I can pull the code off my server. I 444 aby wickedhangover - Nginx Mailing List - English
Just a thought before I start crafting one. I am creating a location{} block with the intention of populating it with a ton of requests I want to terminate immediately with a 444 response. Before I start, I thought I’d ask to see if anyone has a really good one I can use as a base. For example, we don’t serve PHP so I’m starting with Location ~* .php { Return 444; } Then I can justby wickedhangover - Nginx Mailing List - English
First of all, your response caused me to review everything and I was able to solve it with you kicking me in the right direction. Yes, both the 403 and 200 requests are from the same location block. Yes, I’m well aware of the header inheritance but made a fatal mistake. I thought this only applied to add_header and not proxy_set_header so an old test configuration was getting in the way.by wickedhangover - Nginx Mailing List - English
Even though it seems wrong, I’m still going to try adding “always” to that just to test. But I agree that it is not likely going to make a difference since my goal is to send a value upstream and not apply it to the return from upstream. To answer the other, if I inspect the page that comes back with the 403 error, none of the headers I listed below appear. But if I inspect a page that coby wickedhangover - Nginx Mailing List - English
I hope I can explain this well enough to understand what I’m doing wrong. The problem I am trying to solve is that I am making proxy requests to a site that has IP restrictions. Nginx is making a request to another Proxy URL rewrite server we use which then makes the request to the web application. So what happens without any work is that the second proxy server is making the request with theby wickedhangover - Nginx Mailing List - English
Excellent, thank you so much! I had a feeling it was there and I was just missing it. ___________________________________________ Michael Friscia Office of Communications Yale School of Medicine (203) 737-7932 - office (203) 931-5381 - mobile http://web.yale.edu http://web.yale.edu/ On 3/14/18, 12:34 PM, "nginx on behalf of Francis Daly" <nginx-bounces@nginx.org on behaby wickedhangover - Nginx Mailing List - English
I read this in the documentation $upstream_cache_status keeps the status of accessing a response cache (0.8.3). The status can be either “MISS”, “BYPASS”, “EXPIRED”, “STALE”, “UPDATING”, “REVALIDATED”, or “HIT”. But I’m sort of at a loss as to what the meanings are, specifically what is Hit and Miss? The only two I really understand are Stale and Bypass. Does Hby wickedhangover - Nginx Mailing List - English
Thank you, this was incredibly useful and helped me think this through in Nginx terms and I have everything working now. Thank you again! Minor side question, is there a variable I can use to post to a debug header to indicate if a page was newly written to the cache versus a page that was read from cache? If I had this information, then from a tier2/3 support side it could speed up debugging. _by wickedhangover - Nginx Mailing List - English
To add one more thing. I mentioned that my testing failed. Exactly what was failing is that the map{} block that worked and then stopped working was the problem, the $nocache variable would always return the default value no matter what I did. So in a previous post the suggested code was proxy_no_cache $nocache; I also included a add_header X-NoCacheValue $nocache; My initial tests workeby wickedhangover - Nginx Mailing List - English
Yes, I should have explained the problem up front. I made the wrong assumption I was asking a simple question and quickly realized I was getting good answers but my approach was likely flawed from the start. We are using Nginx just as a cache mechanism across many custom DNS names. As a result we have many server {} blocks handling a variety of different DNS names, vanity URLs and in a few caseby wickedhangover - Nginx Mailing List - English
Maybe that’s the problem, I want to disable cache if the response header is true but not do anything if it is false. I can change my logic in creating this header to only have it on pages where cache should be disabled if it is not possible to use an IF statement around it. I will post my config here once I get rid of the sensitive things, but the confusing thing is that it worked, then it stoppby wickedhangover - Nginx Mailing List - English
Ok, so I did this and it worked and then it stopped working, then it worked again and then stopped working. I literally used the code below, the map appears right above my server {} block. When it worked I was passing a header with the $nocache value set and it was consistently returning the correct value. What I don’t understand is that I did not change the code that runs this, I made some othby wickedhangover - Nginx Mailing List - English
Ok, I think this sends me into the correct direction. Thanks for posting the links and explaining the _bypass, I was setting both _bypass and _no_cache because I wasn’t sure. ___________________________________________ Michael Friscia Office of Communications Yale School of Medicine (203) 737-7932 - office (203) 931-5381 - mobile http://web.yale.edu http://web.yale.edu/ On 2/14/18by wickedhangover - Nginx Mailing List - English
Thank you Roman, but this raises a different question, if I want to base this on the value and not the existence, is that still possible? ___________________________________________ Michael Friscia Office of Communications Yale School of Medicine (203) 737-7932 - office (203) 931-5381 - mobile http://web.yale.edu http://web.yale.edu/ On 2/14/18, 10:00 AM, "nginx on behalf of Roby wickedhangover - Nginx Mailing List - English
I’m at a loss on this. I am working on a cache problem where some pages need to be bypassed and others will be cached. So the web server is adding a response header (X-Secured-Page). I’ve tried multiple combinations of $http_x_secured_page and $sent_http_x_secured_page and even though I see the header when I inspect the page, the IF statements inside the location block are not getting fired oby wickedhangover - Nginx Mailing List - English
I’m interested in this answer as well but will offer what I’ve done so far. In your example, the only thing I’ve added are these three lines in the location block: proxy_cache_valid 200 1y; proxy_cache_bypass 1; proxy_no_cache 1; But I am not sure I am doing this correctly because I am running into a situation where I don’t think the original request is staying intact. Other seby wickedhangover - Nginx Mailing List - English