Re: Debugging Nginx Cache Misses: Hitting high number of MISS despite high proxy valid

2018-05-14 Thread Friscia, Michael
gs and realized the large number of MISSes. > > > > Can someone please help? > > > - Cherian > > On Sat, May 12, 2018 at 12:01 PM, Friscia, Michael > <michael.fris...@yale.edu<mailto:michael.fris...@yale.edu> > > wrote: > > > I'm not sure if this

Custom error_page

2018-05-14 Thread Friscia, Michael
I’m not sure if I’m using error_page correctly. I’m trying to set this up so that if the upstream server returns a 500, then I show a custom error page. Is this possible? I have a custom error setup that works just fine using the instructions from this site:

Re: Custom error_page

2018-05-14 Thread Friscia, Michael
Ok, I kind of found the answer here http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors then I realized my problem is that I only want to do this for 500,502,503 and 504, I want the upstream server to handle 404 errors on its own. So is there a way to only intercept

duplicate MIME type "text/html"

2018-04-27 Thread Friscia, Michael
Just curious, I have a config file that has this sub_filter_types: sub_filter_types text/html application/json application/javascript text/javascript; But in the error logs I have this repeating quite a bit: duplicate MIME type "text/html" in /etc/nginx/conf.d/main-settings.conf Does this mean

Load balancing

2018-05-10 Thread Friscia, Michael
I’m working on a project to perform A/B testing with the web hosting platform. The simple version is that we are hosted everything on Azure and want to compare using their Web Apps versus running a VM with IIS. My question is about load balancing since there seems to be two ways to go about

Re: Debugging Nginx Cache Misses: Hitting high number of MISS despite high proxy valid

2018-05-12 Thread Friscia, Michael
I'm not sure if this will help, but I ignore/hide a lot, this is in my config proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie; proxy_hide_header X-Accel-Expires; proxy_hide_header Pragma; proxy_hide_header Server; proxy_hide_header Request-Context; proxy_hide_header

Re: Nginx only serves 1 App

2018-05-15 Thread Friscia, Michael
What happens if you only use one config file and put all of that in it? Nothing really stands out to me in your config. I run about 600 domain names through one Nginx server with many sub-domains in separate server blocks. I've had issues where a subdomain was not served correctly before. I

Re: Blank Pages

2018-05-15 Thread Friscia, Michael
On Tue, May 15, 2018 at 12:12:10PM +, Friscia, Michael wrote: > I’m wondering if there’s a simple way to solve this problem. > > The upstream application sometimes returns a blank 500 error > which Nginx then serves as the blank page. This is working as &

Re: Nginx Directory Listing - Restrict by IP Address

2018-05-18 Thread Friscia, Michael
I think you need to change this a little map $remote_addr $allowed { default “off”; 1.1.1.1 “on”; 2.2.2.2 “on:; } and then in in the download location block autoindex $allowed; I use similar logic on different variables and try at all costs to avoid IF

Blank Pages

2018-05-15 Thread Friscia, Michael
I’m wondering if there’s a simple way to solve this problem. The upstream application sometimes returns a blank 500 error which Nginx then serves as the blank page. This is working as intended. But what I’d like Nginx to do is display a custom error page if the upstream 500 error is blank, but

"This page isn't working" error

2018-05-23 Thread Friscia, Michael
I wonder if anyone knows how to debug this. I have two URLs: Working https://www.yalemedicine.org/doctors/marcus_bosenberg/ not working https://www.yalemedicine.org/doctors/antonio_subtil/ From the Nginx configuration side, these go through the same identical configuration. If I go to the

Re: "This page isn't working" error

2018-05-23 Thread Friscia, Michael
Never mind, I had an error in a config file that was forcing a 444 response based on a regex that accidentally matched the second URL… ___ Michael Friscia Office of Communications Yale School of Medicine (203) 737-7932 - office (203) 931-5381 - mobile

Handling 404 errors

2018-05-24 Thread Friscia, Michael
I need some thoughts on this problem. I am load balancing upstream servers, two are IIS servers on VMs and one is an Azure App Service (PaaS) web app. During deployment the apps are shut down and reloaded. The problem is that the Azure web app returns a 403 when it is shut down, so Nginx

Re: duplicate MIME type "text/html"

2018-04-29 Thread Friscia, Michael
/web.yale.edu/> From: nginx <nginx-boun...@nginx.org> on behalf of Francis Daly <fran...@daoine.org> Sent: Sunday, April 29, 2018 4:40 AM To: nginx@nginx.org Subject: Re: duplicate MIME type "text/html" On Fri, Apr 27, 2018 at 06:04:4

Re: Operation not permitted) while reading upstream - error log is filled with tons of these

2018-01-20 Thread Friscia, Michael
.@daoine.org> wrote: On Sat, Jan 20, 2018 at 12:47:29PM +, Friscia, Michael wrote: Hi there, > 2018/01/20 07:37:44 [crit] 122598#122598: *91 chmod() "/etc/nginx/cache/nginx2/main/a5/d8/e0/72677057b97aef4eee8e619c49e0d8a5.13" failed (1: Operation not permit

Re: N00b: Forwarding the full request to upstream server

2018-02-04 Thread Friscia, Michael
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

Response Header IF statement problem

2018-02-14 Thread Friscia, Michael
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

Re: Response Header IF statement problem

2018-02-14 Thread Friscia, Michael
http://web.yale.edu <http://web.yale.edu/> On 2/14/18, 10:00 AM, "nginx on behalf of Roman Arutyunyan" <nginx-boun...@nginx.org on behalf of a...@nginx.com> wrote: Hi Michael, On Wed, Feb 14, 2018 at 02:09:57PM +, Friscia, Michael wrote: > I’m at a l

Re: Response Header IF statement problem

2018-02-14 Thread Friscia, Michael
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)

Re: Response Header IF statement problem

2018-02-14 Thread Friscia, Michael
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

Re: Response Header IF statement problem

2018-02-14 Thread Friscia, Michael
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

Re: Response Header IF statement problem

2018-02-15 Thread Friscia, Michael
) 737-7932 - office (203) 931-5381 - mobile http://web.yale.edu <http://web.yale.edu/> On 2/15/18, 8:03 AM, "nginx on behalf of Friscia, Michael" <nginx-boun...@nginx.org on behalf of michael.fris...@yale.edu> wrote: Yes, I should have explained the problem up f

Re: Response Header IF statement problem

2018-02-15 Thread Friscia, Michael
m that you are wanting to use to solve your problem, for example, “Don’t cache personalized pages” or “don’t cache pages where the user is outside the US” or “don’t cache pages if the user has logged in” or ... > On Feb 14, 2018, at 4:44 PM, Friscia, Michael <mich

Re: Response Header IF statement problem

2018-02-16 Thread Friscia, Michael
ttp://web.yale.edu/> On 2/16/18, 7:35 AM, "nginx on behalf of Francis Daly" <nginx-boun...@nginx.org on behalf of fran...@daoine.org> wrote: On Thu, Feb 15, 2018 at 01:22:04PM +, Friscia, Michael wrote: Hi there, > To add one more thing. I mentioned that m

sub_filter not working on JSON file

2018-08-02 Thread Friscia, Michael
I’m trying to figure out why my sub_filter is not working on a JSON file. I do have application/json and text/json listed in the sub_filter_types but the simple string replace is not happening. It causes me to think that for whatever reason, Nginx is not seeing this file as JSON. Is there a way

Re: sub_filter not working on JSON file

2018-08-02 Thread Friscia, Michael
y Volyntsev" wrote: On 02.08.2018 16:46, Friscia, Michael wrote: > I’m trying to figure out why my sub_filter is not working on a JSON > file. I do have application/json and text/json listed in the > sub_filter_types but the simple string replace is not ha

Handling upstream response 401

2018-07-25 Thread Friscia, Michael
I have a problem that I thought I knew how to solve but must be just having a mind blank moment. If the upstream server returns a 401 response I want to make sure Nginx serves the response. Right now it is serving the stale version. What happened is that the upstream page was public but then

Re: Handling upstream response 401

2018-07-25 Thread Friscia, Michael
ttp://web.yale.edu/> On 7/25/18, 9:44 AM, "nginx on behalf of Maxim Dounin" wrote: Hello! On Wed, Jul 25, 2018 at 01:14:29PM +, Friscia, Michael wrote: > If the upstream server returns a 401 response I want to make > sure Nginx serves t

gzip_types

2018-08-23 Thread Friscia, Michael
What would be the reason that setting Gzip_types *; Is bad? I’m running into a compression problem and if I set it to * everything gzips just fine but if I list them out explicitly the type image/jpeg is not being gzip’d via proxy request but all others are gzip’d by proxy. Gzip_proxied is set

Re: gzip_types

2018-08-24 Thread Friscia, Michael
) 737-7932 - office (203) 931-5381 - mobile http://web.yale.edu <http://web.yale.edu/> On 8/23/18, 2:00 PM, "nginx on behalf of Maxim Dounin" wrote: Hello! On Thu, Aug 23, 2018 at 11:21:02AM +, Friscia, Michael wrote: > What would be the

Need help with regex

2018-07-20 Thread Friscia, Michael
I have a regex that works in an online tool but when I put this into my configuration file it is not working. The problem is that I want all URLs that start with /info to be redirected with the exception of one unfortunately named PDF file. This regex tests perfectly in an online tool

Re: Need help with regex

2018-07-20 Thread Friscia, Michael
Ok, never mind. It was working all along. My HOSTS file was screwing me up and pointing to a local instance that did not have this config. ___ Michael Friscia Office of Communications Yale School of Medicine (203) 737-7932 - office (203) 931-5381 - mobile

Re: How are you managing CI/CD for your nginx configs?

2018-07-17 Thread Friscia, Michael
I prefer simple setups that start with the question, "What is the least I can do to manage this new thing?" I've worked with all the various things mentioned below like Chef, Puppet, Ansible and many more but scaled everything back to keep it really simple this time. I have 6 Nginx servers

Re: Redirect without and SSL certificate

2018-07-18 Thread Friscia, Michael
e3e87abeb5c%7C0%7C1%7C636675247868657631=tR58%2BgB0inO4qZGFCdlELdxkAfo8BchQPz9DTyV40yw%3D=0> On 18/07/18 17:10, Friscia, Michael wrote: We have a problem where we have a large number of vanity domain names that are redirected. For example we have surgery.yale.edu which redirects to medicine.yale.edu/su

Redirect without and SSL certificate

2018-07-18 Thread Friscia, Michael
We have a problem where we have a large number of vanity domain names that are redirected. For example we have surgery.yale.edu which redirects to medicine.yale.edu/surgery. This works fine until someone tries to request https://surgery.yale.edu. For administrative reasons, I cannot get a

Proxy requests that return a 403 error - issue with sending headers

2018-03-15 Thread Friscia, Michael
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

Re: Proxy requests that return a 403 error - issue with sending headers

2018-03-15 Thread Friscia, Michael
Jason From: nginx [mailto:nginx-boun...@nginx.org] On Behalf Of Friscia, Michael Sent: Thursday, March 15, 2018 3:04 PM To: nginx@nginx.org Subject: [IE] Proxy requests that return a 403 error - issue with sending headers I hope I can explain this well enough to understand what I’m doing wrong. Th

Re: $upstream_cache_status output definitions

2018-03-14 Thread Friscia, Michael
n 3/14/18, 12:34 PM, "nginx on behalf of Francis Daly" <nginx-boun...@nginx.org on behalf of fran...@daoine.org> wrote: On Wed, Mar 14, 2018 at 04:07:22PM +, Friscia, Michael wrote: Hi there, > $upstream_cache_status > keeps the status of acces

$upstream_cache_status output definitions

2018-03-14 Thread Friscia, Michael
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

Aborting malicious requests

2018-03-19 Thread Friscia, Michael
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

Re: Aborting malicious requests

2018-03-19 Thread Friscia, Michael
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 > wrote: Your basic idea is right, but what you want to do is use a "map." I will

Re: Aborting malicious requests

2018-03-20 Thread Friscia, Michael
"nginx on behalf of li...@lazygranch.com" <nginx-boun...@nginx.org on behalf of li...@lazygranch.com> wrote: On Mon, 19 Mar 2018 12:31:20 + "Friscia, Michael" <michael.fris...@yale.edu> wrote: > Just a thought before I start crafting on

proxy_cache_key case sensitivity question

2018-03-23 Thread Friscia, Michael
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

Redirect question

2018-03-23 Thread Friscia, Michael
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

Re: Proxy requests that return a 403 error - issue with sending headers

2018-03-16 Thread Friscia, Michael
<http://web.yale.edu/> On 3/16/18, 4:24 AM, "nginx on behalf of Francis Daly" <nginx-boun...@nginx.org on behalf of fran...@daoine.org> wrote: On Thu, Mar 15, 2018 at 08:04:13PM +, Friscia, Michael wrote: Hi there, > I have a block in my gl

Re: Redirect question

2018-03-23 Thread Friscia, Michael
oev" <nginx-boun...@nginx.org on behalf of i...@sysoev.ru> wrote: > On 23 Mar 2018, at 16:14, Friscia, Michael <michael.fris...@yale.edu> wrote: > > I’m wondering how to achieve this in the config > > I have a url like this > h

Re: Redirect question

2018-03-23 Thread Friscia, Michael
:37 AM, "nginx on behalf of Igor Sysoev" <nginx-boun...@nginx.org on behalf of i...@sysoev.ru> wrote: > On 23 Mar 2018, at 18:22, Friscia, Michael <michael.fris...@yale.edu> wrote: > > Ok, that worked out really well. > > For any

Re: NGINX closes the upstream connection in 60 seconds

2018-04-26 Thread Friscia, Michael
I have the same problem and used this to extent it to 2 minutes proxy_read_timeout 120s; ___ Michael Friscia Office of Communications Yale School of Medicine (203) 737-7932 - office (203) 931-5381 - mobile http://web.yale.edu From:

Re: Cache question

2018-06-28 Thread Friscia, Michael
vent of an error? Or is there more to it than that? Sometimes people build sites that are “more dynamic” than they need to because they didn't consider a static site that gets frequently periodically regenerated. Peter On 28 Jun 2018, at 9:27 AM, Friscia, Michael mailto:michael.fris...@yale.edu>> wrote

Cache question

2018-06-28 Thread Friscia, Michael
I’m working through use cases for cache in a presentation and had a thought jump into my head. We have a server block where most things are cached, but a few locations are set not to use the cache. But the thought is that even thought we don’t want to use a local cache and always fetch from

Nginx Plus Dashboard - memory pages

2018-10-24 Thread Friscia, Michael
I’m not really sure I understand what memory pages are in the Nginx Plus dashboard. I’ve been poking around the documentation and must be missing it. But it seems like every zone is using 5090 and then there is just one zone that is using 2544. My questions: 1. What are “Memory Pages”?

Solr and Nginx

2018-11-02 Thread Friscia, Michael
I’m wondering if anyone has put SOLR behind Nginx or if there might be good reasons not to put it behind Nginx. The obvious part works fine, the admin interface uses all POST which are not cached and I get all the GET requests cached which seems ok. But I’m wondering if I’m missing something