Re: Allow/Deny rules in Location block

2023-01-27 Thread sandeep dubey
single C subnet 10.48.0.1-254). > > Then again, your whole configuration would be simpler with just a single > location block (since it doesn't seem you have an application which uses > /auth without a trailing slash): > > location /auth/ { > allow 172.20.0.

RE: Allow/Deny rules in Location block

2023-01-25 Thread Reinis Rozitis
sure how to organise or set the right sequence here. Just from the log it seems correct - you have a rule to allow 10.48.0.0/24; but the ip 10.48.11.9 doesn't go within that subnet (/24 subnet mask is just a single C subnet 10.48.0.1-254). Then again, your whole configuration would be simpler

Re: Allow/Deny rules in Location block

2023-01-24 Thread sandeep dubey
Thanks Daniel for the reply. I have attached my config file for reference in a previous reply. On Wed, Jan 25, 2023 at 10:58 AM nanaya wrote: > Just adding, if it's `location /auth {}`, it'll also match /autha, /authb, > /authsomething/something, not just limited to /auth/*. > > On Wed, Jan 25,

Re: Allow/Deny rules in Location block

2023-01-24 Thread sandeep dubey
I have attached my config file which may help to understand it better. With this change, I am getting "404 - Not Found" error and in log it says [error] 11#11: *49 access forbidden by rule, client: 10.48.11.9, server: _, request: "GET /auth/ HTTP/1.1", host: "my.domain.info", referrer: " https://

Re: Allow/Deny rules in Location block

2023-01-24 Thread nanaya
Just adding, if it's `location /auth {}`, it'll also match /autha, /authb, /authsomething/something, not just limited to /auth/*. On Wed, Jan 25, 2023, at 01:56, Reinis Rozitis wrote: >> There are other locations like /auth, /auth/, /auth/admin, /auth/admin/ and >> few more which have the same r

RE: Allow/Deny rules in Location block

2023-01-24 Thread Reinis Rozitis
> There are other locations like /auth, /auth/, /auth/admin, /auth/admin/ and > few more which have the same rules. I am trying to restrict access to /auth > and /auth/admin which are sensitive for public access. Do you think removing > "=" can help in this case? '=' in location definition me

Re: Allow/Deny rules in Location block

2023-01-23 Thread sandeep dubey
n Mon, Jan 23, 2023 at 6:08 PM Reinis Rozitis wrote: > > I am trying to restrict some Location block in my Nginx configuration to > > specific IPs. Below are the changes I made - > > > >location = /auth { > > } > > > > Here, the deny

Re: Allow/Deny rules in Location block

2023-01-23 Thread sandeep dubey
> > Hope this helps. > > Ian > > On 23/01/2023 16:34, sandeep dubey wrote: > > Hello, > > > > I am trying to restrict some Location block in my Nginx configuration to > > specific IPs. Below are the changes I made - >

RE: Allow/Deny rules in Location block

2023-01-23 Thread Reinis Rozitis
> I am trying to restrict some Location block in my Nginx configuration to > specific IPs. Below are the changes I made - > >location = /auth { > } > > Here, the deny rule is not working. Users are still able to access the > page publicly. Am I mis

Re: Allow/Deny rules in Location block

2023-01-23 Thread Ian Hobson
think you need 1.2.3.4/24 which allows all of the format 1.2.3.* Hope this helps. Ian On 23/01/2023 16:34, sandeep dubey wrote: Hello, I am trying to restrict some Location block in my Nginx configuration to specific IPs. Below are the changes I made - Version: nginx:1.21.0 location

Allow/Deny rules in Location block

2023-01-23 Thread sandeep dubey
Hello, I am trying to restrict some Location block in my Nginx configuration to specific IPs. Below are the changes I made - Version: nginx:1.21.0 location / { > proxy_pass http://127.0.0.1:8080; > } > location = /auth { > proxy_pass http://12

Re: If statement with $limit_req_status under location block with proxy_pass not working

2022-08-09 Thread acidiclight
This worked great. Thank you for your help! Posted at Nginx Forum: https://forum.nginx.org/read.php?2,294407,294929#msg-294929 ___ nginx mailing list -- nginx@nginx.org To unsubscribe send an email to nginx-le...@nginx.org

Re: If statement with $limit_req_status under location block with proxy_pass not working

2022-06-03 Thread Maxim Dounin
Hello! On Thu, Jun 02, 2022 at 05:44:26PM -0400, acidiclight wrote: > I'm trying to customize my response to rate-limited requests by keeping > limit_req_dry_run on, and using an if statement depending on the value of > $limit_req_status: > > This works as expected: > > limit_req_zone $binary_r

If statement with $limit_req_status under location block with proxy_pass not working

2022-06-02 Thread acidiclight
Hello, I'm trying to customize my response to rate-limited requests by keeping limit_req_dry_run on, and using an if statement depending on the value of $limit_req_status: This works as expected: limit_req_zone $binary_remote_addr zone=one:1m rate=2r/m; server { listen 80; se

Re: Block extension for specified IP address

2021-01-06 Thread Dr_tux
Thanks for your help. I solved it as follows. location ~* \.(exe)$ { proxy_pass http://127.0.0.1:4545; allow 192.168.1.1/32; deny all; } Best. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,290354,290412#msg-290412 _

Re: Block extension for specified IP address

2021-01-05 Thread Francis Daly
On Fri, Jan 01, 2021 at 02:54:21AM -0500, Dr_tux wrote: Hi there, > I'm stuck in this. I am open to your suggestions. Thank you. Untested by me, but... > I have a reverse proxy configuration as follows, I want to block exe > extensions for requests from here. But it doesn't

Block extension for specified IP address

2020-12-31 Thread Dr_tux
Hi Guys, I'm stuck in this. I am open to your suggestions. Thank you. I have a reverse proxy configuration as follows, I want to block exe extensions for requests from here. But it doesn't work. How can I do that ? Example Config: location / {

Re: Multiple server_name directives in same server block?

2019-12-21 Thread Francis Daly
On Fri, Dec 20, 2019 at 05:25:05PM -0800, Roger Fischer wrote: Hi there, > is it possible to have multiple server_name directives in the same server > block? A quick test shows that "nginx -t" does not object; and that the server_name values are matched with the Host: header

Multiple server_name directives in same server block?

2019-12-20 Thread Roger Fischer
Hello, is it possible to have multiple server_name directives in the same server block? I.e. is the following possible? server { listen 1.2.3.4:443 ssl; server_name *.site1.org *.site2.org; server_name ~^app1.*\.site3\.org$; …. Or do I need to create a second server block

Re: Block spefic URL

2019-11-04 Thread Aleksandar Lazic
Hi. Am 04.11.2019 um 12:07 schrieb Proline29: Hello, I'm trying to block such kind of URL https://mysite.com/#id=826c99368cc93a894267703e0fc2ed46 Tried if ( $request_uri = https://mysite.com/#id=826c99368cc93a894267703e0fc2ed46) { return444; } location ~* https://mysite.co

Block spefic URL

2019-11-04 Thread Proline29
Hello, I'm trying to block such kind of URL https://mysite.com/#id=826c99368cc93a894267703e0fc2ed46 Tried if ( $request_uri = https://mysite.com/#id=826c99368cc93a894267703e0fc2ed46) { return444; } location ~* https://mysite.com/#id=826c99368cc93a894267703e0fc2ed46 { deny all; }

Re: limit_rate_after does not work inside location block

2019-10-16 Thread sachin.she...@gmail.com
Got it. You are right, response is returned by another block via X-Accel-Redirect. Thankyou! Posted at Nginx Forum: https://forum.nginx.org/read.php?2,285895,285901#msg-285901 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman

Re: limit_rate_after does not work inside location block

2019-10-16 Thread Maxim Dounin
Hello! On Wed, Oct 16, 2019 at 05:21:41AM -0400, sachin.she...@gmail.com wrote: > I have a location block > > location ~ /get_file$ { > limit_rate_after 500m; > limit_rate 1m; > ... > ... > } > > The limit_rate_after does not work when put

limit_rate_after does not work inside location block

2019-10-16 Thread sachin.she...@gmail.com
Hi, I have a location block location ~ /get_file$ { limit_rate_after 500m; limit_rate 1m; ... ... } The limit_rate_after does not work when put inside the location block, if I move it right above the location line i.e. inside server block, it works. Any idea on how to

Re: Max_fails for proxy_pass without an upstream block

2019-05-24 Thread Sergey Kandaurov
> On 3 May 2019, at 02:12, jarstewa wrote: > > Is there an equivalent of max_fails > (http://nginx.org/en/docs/http/ngx_http_upstream_module.html#max_fails) if > I'm using proxy_pass without an upstream block? > Not that I'm awa

Re: Max_fails for proxy_pass without an upstream block

2019-05-17 Thread jarstewa
Bumping this thread in the hopes that someone knows the answer. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,284004,284208#msg-284208 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Max_fails for proxy_pass without an upstream block

2019-05-02 Thread jarstewa
Is there an equivalent of max_fails (http://nginx.org/en/docs/http/ngx_http_upstream_module.html#max_fails) if I'm using proxy_pass without an upstream block? E.g. http { server { resolver 10.0.0.2 valid=5s; set $upstream_server http://foo.bar:80; location ~* \.

Re: I need my “bad user agent” map not to block my rss xml file

2019-01-10 Thread li...@lazygranch.com
On Thu, 10 Jan 2019 08:50:33 + Francis Daly wrote: > On Wed, Jan 09, 2019 at 06:14:04PM -0800, li...@lazygranch.com wrote: > > Hi there, > > > location / { > > if ($badagent) { return 403; } > > } > > location = /feeds { > > try_files $uri $uri.xml $uri/ ; > >

Re: I need my “bad user agent” map not to block my rss xml file

2019-01-10 Thread Francis Daly
On Wed, Jan 09, 2019 at 06:14:04PM -0800, li...@lazygranch.com wrote: Hi there, > location / { > if ($badagent) { return 403; } > } > location = /feeds { > try_files $uri $uri.xml $uri/ ; > } > The "=" should force an exact match, but the badagent map is > chec

Re: I need my “bad user agent” map not to block my rss xml file

2019-01-09 Thread li...@lazygranch.com
> > What file on your filesystem is your rss xml file? > > Is it something other than /usr/local/nginx/html/feeds or > /usr/local/nginx/html/feeds.xml? > > And what request do you make to fetch your rss xml file? > > Do things change if you move the "root&quo

Re: I need my “bad user agent” map not to block my rss xml file

2019-01-09 Thread Francis Daly
what request do you make to fetch your rss xml file? Do things change if you move the "root" directive out of the "location" block so that it is directly in the "server" block? f -- Francis Dalyfran...@daoine.org ___

I need my “bad user agent” map not to block my rss xml file

2019-01-08 Thread li...@lazygranch.com
Stripping down the nginx.conf file: server{ location / { root /usr/share/nginx/html/mydomain/public_html; if ($badagent) { return 403; } } location = /feeds { try_files $uri $uri.xml $uri/ ; } } The "=" should force an exact match, but the badagent map is checked. ___

Re: help needed : catch a url and use in a location block

2019-01-08 Thread Francis Daly
ause this page gets high traffic. How can I achieve that? What will be > the right regex to catch this URL as a location block? A "location" match does not involve the query string -- that is, it stops looking before the ?. So no "location" block can match adv_id in the

help needed : catch a url and use in a location block

2019-01-08 Thread ender ulusoy
t use cache on other pages. And I don't want to use an if condition because this page gets high traffic. How can I achieve that? What will be the right regex to catch this URL as a location block? I've tried some regex but can not catch the URL contains adv_id with the given URL format

Re: logical or in location directive with regex (multiple location using same block)

2018-11-24 Thread Francis Daly
On Fri, Nov 23, 2018 at 03:38:27PM -0800, Roger Fischer wrote: Hi there, > how do I best handle multiple locations that use the same code block? Repeat the {} part with all of the config. Nginx cares what is in the config file; it does not care how the config file is created. Use y

logical or in location directive with regex (multiple location using same block)

2018-11-23 Thread Roger Fischer
Hello, how do I best handle multiple locations that use the same code block? I do not want to repeat the { … } part. Is there a way to do this with logical or between regular expressions? The first variation is that sometimes there are query parameters, and sometimes there are not. The second

Re: upgrade to 1-9.15 caused block requests

2018-11-22 Thread Maxim Dounin
Hello! On Thu, Nov 22, 2018 at 07:15:41AM -0500, Ortal wrote: > This is a small example of my code, I changed the code and in the current > version on post/put request trying to read the buffer and print it, on any > other requests just send response (I tried to minimal it as much as I > could) >

Re: upgrade to 1-9.15 caused block requests

2018-11-22 Thread Ortal
This is a small example of my code, I changed the code and in the current version on post/put request trying to read the buffer and print it, on any other requests just send response (I tried to minimal it as much as I could) On the current flow when running a post request with 1MB data the ngx_ht

Re: upgrade to 1-9.15 caused block requests

2018-11-21 Thread Maxim Dounin
Hello! On Wed, Nov 21, 2018 at 01:47:40PM -0500, Ortal wrote: > Hi, > I am developing my own nginx module, I am getting a post requests, parse the > data and send 204. > I worked with nginx version release-1.9.15, and I am trying to upgrade to > version release-1.15.5. > After the upgrade post r

upgrade to 1-9.15 caused block requests

2018-11-21 Thread Ortal
Hi, I am developing my own nginx module, I am getting a post requests, parse the data and send 204. I worked with nginx version release-1.9.15, and I am trying to upgrade to version release-1.15.5. After the upgrade post requests with payload larger then 1M are getting blocked. >From the nginx lo

Re: Bouncing to Default Server Block

2018-09-28 Thread Bee.Lists
It’s fixed. Thank you > On Sep 28, 2018, at 11:48 AM, Bee.Lists wrote: > > I often clear the cache and restart nginx. Cheers, Bee ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Bouncing to Default Server Block

2018-09-28 Thread Bee.Lists
I often clear the cache and restart nginx. > On Sep 28, 2018, at 11:19 AM, Reinis Rozitis wrote: > > If you are testing just with a browser make sure you've cleaned the cache (or > disable it, or use some other tools which don't have cache (like wget for > example)). > > If by chance you op

RE: Bouncing to Default Server Block

2018-09-28 Thread Reinis Rozitis
> First domain redirects port 80 to ssl 443. > Second domain is just port 80. > Third domain is just port 80. > > Second domain isn’t showing up, pointing to first domain. Third domain is > working. Why would this happen? If you are testing just with a browser make sure you've cleaned the cache

Bouncing to Default Server Block

2018-09-28 Thread Bee.Lists
I have a test server up with 3 domains. First domain redirects port 80 to ssl 443. Second domain is just port 80. Third domain is just port 80. Second domain isn’t showing up, pointing to first domain. Third domain is working. Why would this happen? nginx.conf: # user

Block a css file thru NGINX rule

2018-07-10 Thread Hamidul Islam
Hi I would like a css file (named theme.css) to be blocked when loading a page thru nginx. This css file is dynamically created everytime a new page is loaded. Wondering is that is possible to block thru nginx rule? If so please give an example. Thanks Hamidul

Re: Block countries - Nginx

2018-05-24 Thread Peter Booth
. > On 24 May 2018, at 9:57 AM, Sathish Kumar wrote: > > Hi, > The client is already sending the X-Forwarded-For but when it received on > server it has multiple ips, how we can filter only the 1st IP and pass it to > geo ip module to block the IP based on Country. > >

Re: Block countries - Nginx

2018-05-24 Thread Francis Daly
On Thu, May 24, 2018 at 09:57:24PM +0800, Sathish Kumar wrote: Hi there, > The client is already sending the X-Forwarded-For but when it received on > server it has multiple ips, how we can filter only the 1st IP and pass it > to geo ip module to block the IP based on Country.

Re: Block countries - Nginx

2018-05-24 Thread Sathish Kumar
Hi, The client is already sending the X-Forwarded-For but when it received on server it has multiple ips, how we can filter only the 1st IP and pass it to geo ip module to block the IP based on Country. On Thu, May 24, 2018, 11:25 AM Frank Liu wrote: > Since only load balancer sees the cli

Re: Block countries - Nginx

2018-05-23 Thread Peter Booth
> blocking. > >> On Wed, May 23, 2018 at 6:51 PM, Sathish Kumar wrote: >> How can I get the client IP address if the request is coming through load >> balancer or Proxy and pass it to default nginx geoip module to block it >> based on the Country. >> >>&

Re: Block countries - Nginx

2018-05-23 Thread Frank Liu
the geoip2 module to do the lookup and create country code for you to use for blocking. On Wed, May 23, 2018 at 6:51 PM, Sathish Kumar wrote: > How can I get the client IP address if the request is coming through load > balancer or Proxy and pass it to default nginx geoip module to bl

Re: Block countries - Nginx

2018-05-23 Thread Sathish Kumar
How can I get the client IP address if the request is coming through load balancer or Proxy and pass it to default nginx geoip module to block it based on the Country. On Tue, May 22, 2018, 4:45 PM Frank Liu wrote: > Instead of the default nginx geoip module , I suggest you switch to th

Re: Block countries - Nginx

2018-05-22 Thread Frank Liu
:37 PM Sathish Kumar wrote: > Hi All, > > Is there a way, I can block the clients which is coming through load > balancer using http geo ip module nginx. > > > Currently, I can block the clients which is not coming through load > balancer or api gateway by geo ip module.

Re: Block countries - Nginx

2018-05-22 Thread Aleksandar Lazic
On 21/05/2018 11:49, Sathish Kumar wrote: > Hi All, > > I have a requirement to block certain countries coming to our website. I > managed to achieved it using the ngx_http_geoip_module. I have a problem > now, if the request comes through Amazon API Gateway, how can I read the &g

Re: Block countries - Nginx

2018-05-22 Thread basti
Hello, if you have access to this load balancer, the best way would be to block it there. This also drop down the system load on your load balancer. Am 22.05.2018 um 03:37 schrieb Sathish Kumar: > Hi All, > > Is there a way, I can block the clients which is coming through load > ba

Re: Block countries - Nginx

2018-05-21 Thread Sathish Kumar
Hi All, Is there a way, I can block the clients which is coming through load balancer using http geo ip module nginx. Currently, I can block the clients which is not coming through load balancer or api gateway by geo ip module. On Mon, May 21, 2018, 2:02 PM basti wrote: > hello, > t

Re: Block countries - Nginx

2018-05-20 Thread basti
hello, the way to block ip's can also be used for PTR records, I think. Also as wildcard. On 21.05.2018 05:49, Sathish Kumar wrote: > Hi All, > > I have a requirement to block certain countries coming to our website.  > I managed to achieved it using the ngx_http_geoip_module. I

Block countries - Nginx

2018-05-20 Thread Sathish Kumar
Hi All, I have a requirement to block certain countries coming to our website. I managed to achieved it using the ngx_http_geoip_module. I have a problem now, if the request comes through Amazon API Gateway, how can I read the X-forwarded-for header or block these request too. nginx.conf map

Re: custom log_format not inherited by server block

2018-05-18 Thread Maxim Dounin
, yet my server block throws an error > about an unknown log format. > > If my `log_format` directive appears after the `access_log` > directive in nginx.conf, it will not validate, stating: > > nginx: [emerg] unknown log format "ipscrubbed" in > /etc/nginx/ng

custom log_format not inherited by server block

2018-05-17 Thread Pete Cooper
Hello. I am compiling Nginx 1.14.0 from source on Ubuntu 18.04 LTS with a view to compiling ipscrub as a dynamic module. My compile completes without error, my nginx.conf validates, Nginx runs as expected, yet my server block throws an error about an unknown log format. If my `log_format

Re: RE: Track egress bandwidth for a server block

2017-11-13 Thread justink101
Thanks for linking, but nginx-module-vts seems over-kill and I'm concerned about performance. Essentially we are building a product that charges by egress bandwidth and looking for a way to track it at the NGINX level. I was digging a bit further and it seems like using https://www.nginx.com/blog/l

RE: Track egress bandwidth for a server block

2017-11-13 Thread Reinis Rozitis
> Is there a way to measure and store the amount of egress bandwidth in GB a > given server{} block uses in a certain amount of days? Needs to be somewhat > performant. Using NGINX Unit or Lua are both possible, just no idea how to > implement it. Take a look at https://github.com

Track egress bandwidth for a server block

2017-11-13 Thread justink101
Is there a way to measure and store the amount of egress bandwidth in GB a given server{} block uses in a certain amount of days? Needs to be somewhat performant. Using NGINX Unit or Lua are both possible, just no idea how to implement it. Posted at Nginx Forum: https://forum.nginx.org/read.php

Re: Block specific request pattern !!

2017-10-07 Thread shahzaib mushtaq
files/videos/2017/10/04/15071356364fc6b-720.mp4?h=n_ > Saa78MV6BJTcoRHwHelA&ttl=1507303734& > > ?*/WhileYouWereSleeping56.mp4* > > > https://domain.com/files/videos/2017/10/04/15071356364fc6b-720.mp4?h=n_ > Saa78MV6BJTcoRHwHelA&ttl=1507303734& > > ? > >

Re: Block specific request pattern !!

2017-10-06 Thread Francis Daly
RHwHelA&ttl=1507303734&; > ?*/WhileYouWereSleeping56.mp4* > https://domain.com/files/videos/2017/10/04/15071356364fc6b-720.mp4?h=n_Saa78MV6BJTcoRHwHelA&ttl=1507303734&; > ? The two question marks in the url looks odd to me; but it is in both your "bad" and "good" ones, so

Block specific request pattern !!

2017-10-06 Thread shahzaib mushtaq
/videos/2017/10/04/15071356364fc6b-720.mp4?h=n_Saa78MV6BJTcoRHwHelA&ttl=1507303734&; ? Is there a way we can block the requests not ending up on ttl value ? Thanks. Shahzaib ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Multiple certificates in one server block?

2017-08-07 Thread B.R. via nginx
Jim already replied with his ECDSA+RSA example in a single server block. You can also serve several names from a single server block. However, I never tested serving a certificate for several domains all served by the same virtual server block. I *suppose* nginx might be clever enough to select

Re: Multiple certificates in one server block?

2017-08-04 Thread Olaf van der Spek
Jim Ohlstein Wrote: > Letsencrypt allows multiple domain names in the same certificate. I know, just wondering if nginx supported multiple certs per server. My problem: I've got multiple servers and I'd like the servers to be accessible via the common name (ex.com) and via their dedicated name (a

Re: Multiple certificates in one server block?

2017-08-04 Thread Jeff Dyke
Jim is correct, letsencrypt supports that wow, sorry for trying to help, that was a bit caustic, that information would be helpful in the original question. Enjoy the weekend. On Fri, Aug 4, 2017 at 9:40 AM, Jim Ohlstein wrote: > Hello, > > On 08/04/2017 09:36 AM, Olaf van der Spek wrote: >

Re: Multiple certificates in one server block?

2017-08-04 Thread Jim Ohlstein
Hello, On 08/04/2017 09:36 AM, Olaf van der Spek wrote: > I'm using letsencrypt and have multiple certs with a single name in them.. > If I had one cert with multiple names we'd not be having this problem. > Letsencrypt allows multiple domain names in the same certificate. As for nginx, it allo

Re: Multiple certificates in one server block?

2017-08-04 Thread Olaf van der Spek
I'm using letsencrypt and have multiple certs with a single name in them.. If I had one cert with multiple names we'd not be having this problem. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275855,275858#msg-275858 ___ nginx mailing list

Re: Multiple certificates in one server block?

2017-08-04 Thread Jeff Dyke
i assume you have some sort of UCC certificate, if so you should be able to use it with multiple server_names, but have multiple ssl_certificates in a single server block is a limitation of nginx from what i understand. Most relavant information is here: https://nginx.org/en/docs/http

Multiple certificates in one server block?

2017-08-04 Thread Olaf van der Spek
How do I set multiple certificates (for different names) in a single server block? I can easily set multiple server_names but there seems no way to set multiple certificates.. Is the only way to have all names in a single certificate? If so, is this an nginx, an openssl or a TLS limitation

Re: block google app

2017-06-22 Thread lists
Ah but I want Google to look, but just return links to pages, not images. There all those ‎hits that pretend to be Google, because hey, why not. ;-) I block a large number of bots simply by the firewall. I

Re: block google app

2017-06-22 Thread Peter Booth
U-27, which is a plane recently in the > news. You get a lot of SU-35s. Is this really rocket science? I assume Google > has no trust in image tags. But many images have SU-35 in text, which could > be read using openCV, as is done with openALPR. But I'm rambling. > >

Re: block google app

2017-06-22 Thread lists
From: Richard StanwaySent: Thursday, June 22, 2017 8:03 AMTo: nginx@nginx.orgReply To: nginx@nginx.orgSubject: Re: block google appThat user agent doesn't belong to

Re: block google app

2017-06-22 Thread Jeff Dyke
li...@lazygranch.com> wrote: >> >>> I'm sending 403 responses now, so I screwed up by mistaking the fields >>> in the logs. I'm going back to lurking mode again with my tail >>> shamefully between my legs. >>> >>> This code in the image

Re: block google app

2017-06-22 Thread Richard Stanway
;> I'm sending 403 responses now, so I screwed up by mistaking the fields >> in the logs. I'm going back to lurking mode again with my tail >> shamefully between my legs. >> >> This code in the image location section will block the google app: >> -

Re: block google app

2017-06-22 Thread Jeff Dyke
27;m going back to lurking mode again with my tail > shamefully between my legs. > > This code in the image location section will block the google app: > > if ($http_user_agent ~* (com.google.GoogleMobile)) { >return 403; > } > - &

Re: how nginx decide which server block to use

2017-06-21 Thread Francis Daly
On Wed, Jun 21, 2017 at 03:26:10PM +0800, George / wrote: Hi there, For the question in the Subject: line, see http://nginx.org/en/docs/http/request_processing.html#mixed_name_ip_based_servers > i am running nginx version: nginx/1.12.0.i got following server block > config as belo

Re: block google app

2017-06-21 Thread li...@lazygranch.com
I'm sending 403 responses now, so I screwed up by mistaking the fields in the logs. I'm going back to lurking mode again with my tail shamefully between my legs. This code in the image location section will block the google app: if ($http_

how nginx decide which server block to use

2017-06-21 Thread George /
Hi all, i am running nginx version: nginx/1.12.0.i got following server block config as below, all request match regular expression work well,but request to server s01.example.com return 404.what's wrong? i googled for a while,most of the article said,it first try to match literal s

Re: block google app

2017-06-21 Thread li...@lazygranch.com
Actually I think I was mistaken and the field is the user agent. I will change the variable and see what happens. I did some experiments to show the pattern match works. On Tue, 20 Jun 2017 20:56:46 -0700 li...@lazygranch.com wrote: > I want to block by referrer. I provided a more &quo

Re: block google app

2017-06-20 Thread lists
I want to block by referrer. I provided a more "normal" record so that the user agent and referrer location was obvious by context.  My problem is I'm not creating the match expression correctly. I've tried spaces, parens. I haven't tried quotes. ‎    Original Messag

Re: block google app

2017-06-20 Thread Robert Paprocki
Well what is your log format then? We can't possibly help you if we don't have the necessary info ;) Do you want to block based on http referer? Or user agent string? Or something else entirely? The config snippet you posted indicates you are trying to block by referer. If you want

Re: block google app

2017-06-20 Thread li...@lazygranch.com
format. On Tue, 20 Jun 2017 17:49:14 -0700 Robert Paprocki wrote: > Do you mean $http_user_agent? > > > On Jun 20, 2017, at 17:36, "li...@lazygranch.com" > > wrote: > > > > I would like to block the google app from directly downloading > &g

Re: block google app

2017-06-20 Thread Robert Paprocki
Do you mean $http_user_agent? > On Jun 20, 2017, at 17:36, "li...@lazygranch.com" > wrote: > > I would like to block the google app from directly downloading images. > > access.log: > > 200 186.155.157.9 - - [20/Jun/2017:00:35:47 +] "GE

block google app

2017-06-20 Thread li...@lazygranch.com
I would like to block the google app from directly downloading images. access.log: 200 186.155.157.9 - - [20/Jun/2017:00:35:47 +] "GET /images/photo.jpg HTTP/1.1" 334052 "-" "com.google.GoogleMobile/28.0.0 iPad/9.3.5 hw/iPad2_5" "-" M

Re: several sibling location block

2017-06-14 Thread Ingo Schmidt
Hi! to nginx, as follows: location / { # force download for ceratain file types location ~* \.(?:fb2|mobi|mp3)$ { add_header Content-Disposition "attachment"; } location ~* \.fb2$ { add_header Content-type "text/fb2+xml"; } location ~* \.mobi$ {

several sibling location block

2017-06-13 Thread ST
Hello, I try to convert following apache related stuff: # force download for ceratain file types Header set Content-Disposition attachment Header set Content-type text/fb2+xml Header set Content-type application/x-mobipocket-ebook Header set Content-type audio/mpeg to nginx,

Re: Upstream block: backup with max_fails=0 does not appear to work as expected

2017-05-18 Thread Roman Arutyunyan
Hi Jonathan, On Wed, May 17, 2017 at 05:05:51PM -0400, Jonathan Simowitz via nginx wrote: > Hello, > > I have an upstream block with two servers as follows: > > upstream { > server foo.com; > server bar.com max_fails=0 backup; > } > > My desired use case would

Upstream block: backup with max_fails=0 does not appear to work as expected

2017-05-17 Thread Jonathan Simowitz via nginx
Hello, I have an upstream block with two servers as follows: upstream { server foo.com; server bar.com max_fails=0 backup; } My desired use case would be that the foo.com server is hit for all requests and can be marked as down by nginx if it starts serving errors. In this case nginx will

Re: configuration nginx server block [virtual host] with Ipv6.

2017-03-10 Thread Francis Daly
On Fri, Mar 10, 2017 at 09:06:03PM -0400, Wilmer Arambula wrote: Hi there, > The websites pages do not load, not open, and write anything in te log, What response do you get when you do something like curl -v -g -H Host:domain1.com 'http://[::1]:80/' on the server itself? "Nothing in the log"

Re: configuration nginx server block [virtual host] with Ipv6.

2017-03-10 Thread Wilmer Arambula
The websites pages do not load, not open, and write anything in te log, Thks, Wilmer. El 10/3/2017 21:00, "Francis Daly" escribió: On Thu, Mar 09, 2017 at 06:06:05PM -0500, Vanhels wrote: Hi there, > The error happens when Listen and fastcgi_pass have the same port address in > both domains

Re: configuration nginx server block [virtual host] with Ipv6.

2017-03-10 Thread Francis Daly
On Thu, Mar 09, 2017 at 06:06:05PM -0500, Vanhels wrote: Hi there, > The error happens when Listen and fastcgi_pass have the same port address in > both domains, What's the error? What do you do / what do you see / what do you want to see instead? f -- Francis Dalyfran...@daoi

Re: configuration nginx server block [virtual host] with Ipv6.

2017-03-09 Thread Vanhels
Thanks for your answer, I'll specify it better: Config Work Fine: [domain1.conf]: server { listen [::]:80; root /home/domain1/public_html; index index.php index.html index.htm; server_name domain1 www.domain1; location ~ \.ph

Re: configuration nginx server block [virtual host] with Ipv6.

2017-03-09 Thread Francis Daly
On Thu, Mar 09, 2017 at 03:10:13PM -0500, Vanhels wrote: Hi there, > Hi, I have installed nginx + php-fpm (php5.4 / php5.6), i'm trying to set > everything up for ipv6 in Centos 7.3, install from official nginx repo: What part fails for you? Does nginx listen on the IPv6 port? Does the client c

configuration nginx server block [virtual host] with Ipv6.

2017-03-09 Thread Vanhels
Hi, I have installed nginx + php-fpm (php5.4 / php5.6), i'm trying to set everything up for ipv6 in Centos 7.3, install from official nginx repo: [/etc/nginx/nginx.conf]: user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid/var/run/nginx.pid; events { worker

Re: unbearable reload downtime when introducing a new server block

2017-03-08 Thread he.hailong5
Hi, In my case, I need to add new server block from time to time in nginx. after reloading, it is observed that the newly added server is not available for seconds. is this as expected? how to improve it? BR, Joe___ nginx mailing list nginx

unbearable reload downtime when introducing a new server block

2017-03-08 Thread he.hailong5
Hi, In my case, I need to add new server block from time to time in nginx. after reloading, it is observed that the newly added server is not available for seconds. is this as expected? how to improve it? BR, Joe___ nginx mailing list nginx

Re: setting up a forward proxy for a few specific website only, and block the rest

2016-12-29 Thread Francis Daly
xy server configuration; although "do not limit by source IP" is probably the default configuration. > So would like to ask anyone has configure such config in nginx before ? How > do I configure the nginx as forward proxy, to block all proxy request, and > allow only the few websi

  1   2   3   >