Re: nginx Connections

2018-03-15 Thread Aziz Rozyev
check the limit_req_module, http://nginx.org/ru/docs/http/ngx_http_limit_req_module.html our beloved and hugely useful search engines gave this: https://www.nginx.com/blog/rate-limiting-nginx/ it’s not possible to manipulate limits with cli though. br, Aziz. > On 15 Mar 2018, at 09:52, Ma

Re: How can i configure proxy multiple hosts for a domain?

2018-03-12 Thread Aziz Rozyev
Hi, perhaps you should’ve explained your intention bit more in details, may be with some functional schema. As of my current understanding, you want something like port mirroring to duplicate your network traffic. anyways, it’s out of scope of nginx, search for “port/traffic mirroring”. br,

Re: Check the size of one of the request header in nginx conf

2018-03-06 Thread Aziz Rozyev
by the way, there is easier solution to this (thanks to Ruslan Ermilov) something like this: map $http_ $disabled { ^.{65,} 1 } location / { if $disable { return 404; } proxy_pass http://upstream; } br, Aziz. > On 6 Mar 2018, at 15:16, Aziz Rozyev wrote: > > h

Re: Check the size of one of the request header in nginx conf

2018-03-06 Thread Aziz Rozyev
hi, I think you can do such a checking with lua/njs modules. br, Aziz. > On 6 Mar 2018, at 15:13, mejetjoseph wrote: > > Dear Team, > > I would like to know is it possible to check the size of one of header > values in nginx conf file . I need to reset the header value if the size of > t

Re: fsync()-in webdav PUT

2018-03-02 Thread Aziz Rozyev
Atilla, man page quote is related to the Valery’s argument that fsync wont affect performance, forget it. It’s nonsense because you’re trying to solve the reliability problem at the different level, it has been multiple times suggested here already by maxim and Paul, that it’s better to inves

Re: why hardcoded /var/log/nginx/error.log in pre-built packages?

2018-03-01 Thread Aziz Rozyev
it’s not hardcoded afaik. check output of nginx -T perhaps it’s defined error_log directive somewhere.. br, Aziz. > On 1 Mar 2018, at 23:40, Daniel wrote: > > Hello all, > > can someone please explain to me why the location /var/log/nginx/error > log is hardcoded in the official prebuilt

Re: fsync()-in webdav PUT

2018-02-28 Thread Aziz Rozyev
if=/dev/zero of=/writetest bs=8k count=61960 conv=fsync 61960+0 records in 61960+0 records out 507576320 bytes (508 MB) copied, 1.74482 s, 291 MB/s br, Aziz. > On 1 Mar 2018, at 00:41, Aziz Rozyev wrote: > > Valery, > > may you please suggest how you came to the

Re: fsync()-in webdav PUT

2018-02-28 Thread Aziz Rozyev
ta of certain specific file reaches the > storage depends on numerous factors, for example, I/O contention. > Consequently, the exact moment when the data of a file being uploaded reaches > the storage can be only determined by executing fsync. > > val > > On 28

Re: fsync()-in webdav PUT

2018-02-28 Thread Aziz Rozyev
While it’s not clear why one may need to flush the data on each http operation, I can imagine to what performance degradation that may lead of. if it’s not a some kind of funny clustering among nodes, I wouldn't care much where actual data is, RAM still should be much faster, than disk I/O. br,

Re: Jenkins reverse proxy on single domain with multiple apps

2018-02-26 Thread Aziz Rozyev
well, as I’ve said try checking headers first, as per the following doc: https://wiki.jenkins.io/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy it can be much complicated than just proxy_pass’ing. regarding sub_fillter, try getting rid of one of the sub_filters, probably the second one:

Re: Jenkins reverse proxy on single domain with multiple apps

2018-02-25 Thread Aziz Rozyev
Hi, compare the output of curl -ivvv http://jenkins:8080 curl -ivvv http://localhost/jenkins then curl -iLvvv http://jenkins:8080 curl -iLvvv http://localhost/jenkins pay attention on the cookie headers. java based applications usually may set session cookies and you should handle th

Re: Redirection

2018-02-22 Thread Aziz Rozyev
Hi, show your full config, usually there is no need to set variable like $tomcatdomain, proxy_pass http://tomcatdomain; is enough. br, Aziz. > On 22 Feb 2018, at 16:17, imrickysingh wrote: > > Hi guys, > > I am new to nginx and facing some problem with my setup. > > In my setup i have

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

2018-01-20 Thread Aziz Rozyev
As usual, try disabling selinux if it’s active. If that helps, investigate audit log.. br, Aziz. > On 20 Jan 2018, at 15:47, Friscia, Michael wrote: > > I’m stumped and have exhausted pretty much every google search I could come > up with on this. I have NGINX setup for caching. I’m using

Re: Nginx error log parser

2018-01-11 Thread Aziz Rozyev
hit Agrawal wrote: > > Thanks Aziz for this, I get your point, but can we do awking in fluentd cons > file ? Basically we are looking for realtime awking a nginx error log file, > how heavy this would be according to you. > > On 10 January 2018 at 17:44, Aziz Rozyev wrote

Re: Nginx error log parser

2018-01-10 Thread Aziz Rozyev
or me, I tried regex then it was able to > segregate time , pid, tid, log_level and message. I also need message break > up for above pattern > > On 10 January 2018 at 17:12, Aziz Rozyev wrote: > Hi Mohit, > > check the second reply. I’m not sure that there is a convention

Re: Nginx error log parser

2018-01-10 Thread Aziz Rozyev
ng to > format error.log which doesn't take log_format directive. > Above example that I gave is just for nginx error logs. > > Thanks > > On 10 January 2018 at 15:26, Aziz Rozyev wrote: > btw, after re-reading the your questing, it looks like you need something >

Re: Nginx error log parser

2018-01-10 Thread Aziz Rozyev
btw, after re-reading the your questing, it looks like you need something like logstash grok filter. br, Aziz. > On 10 Jan 2018, at 11:45, mohit Agrawal wrote: > > Hi , > > I am looking to parse nginx error log so as to find out which particular IP > is throttled during specific amount o

Re: Nginx error log parser

2018-01-10 Thread Aziz Rozyev
is the 'log_format json’ is what you’re asking for? http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format br, Aziz. > On 10 Jan 2018, at 11:45, mohit Agrawal wrote: > > Hi , > > I am looking to parse nginx error log so as to find out which particular IP > is throttled during

Re: 504 gateway timeouts

2018-01-09 Thread Aziz Rozyev
Hi Wade, At least provide the access/error log fragments, curl -ivvv <..> outputs directly to the 3rd party service and via the nginx, jmeter (if you use that) outputs would make sense. Also, it would be nice to compare nginx configurations from the mac and linux. Currently it’s barely possible

Re: MAP location in conf file

2017-12-29 Thread Aziz Rozyev
check docs: http://nginx.org/en/docs/http/ngx_http_map_module.html every directive description has a “Context” field, where you may find in which configuration context you can put the directive. regarding your questions, yes, you actually have to put it on the very top - in ‘http' context. br,

Re: Proxy pass and URL rewrite with upstream

2017-12-21 Thread Aziz Rozyev
Hi create 4 separate upstreams for each of these apaches, create 4 locations, within each location block proxy_pass to appropriate upstream. avoid using sub_filters, they are mostly forrewriting bodies of html documents. http { # for phpadmin upstream phpadminup { server phpadmin.ltda.loca

Re: Centos 7 file permission problem

2017-12-20 Thread Aziz Rozyev
. > I'm going to mention this in the Digital Ocean help pages. > > I disabled selinx, but I have a book laying around on how to set it up. > Eh, it is on the list. > > On Wed, 20 Dec 2017 14:17:18 +0300 > Aziz Rozyev wrote: > >> Hi, >> >> h

Re: Centos 7 file permission problem

2017-12-20 Thread Aziz Rozyev
Hi, have you checked this with disabled selinux ? br, Aziz. > On 20 Dec 2017, at 11:07, li...@lazygranch.com wrote: > > I'm setting up a web server on a Centos 7 VPS. I'm relatively sure I > have the firewalls set up properly since I can see my browser requests > in the access and error lo

Re: Nginx reload intermittenlty fails when protocol specified in proxy_pass directive is specified as HTTPS

2017-11-20 Thread Aziz Rozyev
Hi, try 1) curl -ivvv https:// to your upstreams. 2) add server :443 (if your upstreams accepting ssl connections on 443) br, Aziz. > On 20 Nov 2017, at 20:46, shivramg94 wrote: > > I am trying to use nginx as a reverse proxy with upstream SSL. For this, I > am using the below directi

Re: Different Naxsi rulesets

2017-11-13 Thread Aziz Rozyev
{ >include /usr/local/nginx/naxsi.rules.default; > >set $ruleSet $ruleSetCC; >rewrite ^(.*)$ /$ruleSet$1 last; > } > > > It's always using naxsi.rules.default. If this line is removed it's not using > any rules (pass-all). > > Tha

Re: Different Naxsi rulesets

2017-11-13 Thread Aziz Rozyev
At first glance config looks correct, so probably it’s something with naxi rulesets. Btw, why don’t you use maps? map $geoip_coutnry_code $strictness { default “strict"; CC_1“not-so-strict"; CC_2“not-so-strict"; # .. more country codes; } # strict and not-so-strict locations ma

Re: Different Naxsi rulesets

2017-11-12 Thread Aziz Rozyev
at least you’re missing or (|) operator between > TRUSTED_CC_2 and TRUSTED_CC_3 br, Aziz. > On 12 Nov 2017, at 14:03, Jean-Paul Hemelaar wrote: > > Hi! > > I'm using Nginx together with Naxsi; so not sure it this is the correct place > for this post, but I'll give it a try. > > I wa