Re: Проблема при использовании return и кастомных ошибок на уровне server

2018-03-22 Thread Aziz Rozyev
если есть возможность привязаться к к/л стандартной ошибке, например, для 404: error_page 404 =527 /plugin.html а так в nginx кажется не предусмотрена ошибка 527. br, Aziz. > On 22 Mar 2018, at 15:54, Никита wrote: > > > Добрый день. > > При попытке сделать вернуть

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,

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”.

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 <aroz...@ngi

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

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

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 <aroz...@nginx.com> wrote: > > Valery, > > may you please

Re: fsync()-in webdav PUT

2018-02-28 Thread Aziz Rozyev
moment when the data 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 > &g

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.

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

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

Re: Nginx error log parser

2018-01-11 Thread Aziz Rozyev
hit Agrawal <mohit3081...@gmail.com> 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

Re: Nginx error log parser

2018-01-10 Thread Aziz Rozyev
achieved. grok didn't work for 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 <aroz...@nginx.com> wrote: > Hi Mohit, > > check the sec

Re: Nginx error log parser

2018-01-10 Thread Aziz Rozyev
for access log, I am looking 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 <aroz...@nginx.com> wrote: > btw, after re-reading the your qu

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

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

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

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

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 <aroz...@nginx.com> wrote: > >> Hi, &g

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

Re: https upstream server и локальный backup http upstream

2017-12-16 Thread Aziz Rozyev
ния if-а. > > В идеале: собственно в виде backup_proto=http :) поскольку эта же задача > максимально элегантно решалась через >> upstream remote { >> server remote; >> server local backup; >> } > пока не появилось требование к https у upstream-а > > 16.12.17 22:

Re: https upstream server и локальный backup http upstream

2017-12-16 Thread Aziz Rozyev
а вариант с 2 апстримами не подходит? upstream remote_up { remote_upstream:443; } upstream local_up { localhost:7070; } map $http_x_some_header $remote { “”0; “default” 1; } if ($remote) { proxy_pass https://remote; } proxy_pass http://local; br, Aziz. > On 16 Dec

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,

Re: Different Naxsi rulesets

2017-11-13 Thread Aziz Rozyev
location / { >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). >

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

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

Re: Динамический CRL для SSL сертификатов "клиентов"

2017-08-09 Thread Aziz Rozyev
Леонид, а вам не подходит вариант с auth_request и дополнительным скриптом? что-то такое: location / { auth_request /auth-proxy; add_header X-Client-Cert $ssl_client_cert; proxy_pass http://backend; proxy_set_header X-Client-Cert

Re: Как же сделать,чтоб сайт уже начал открываться?

2017-07-07 Thread Aziz Rozyev
на официальном сайте есть инструкции: https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/ br, Aziz. > On 7 Jul 2017, at 18:01, Nadya wrote: > > Спасибо,что подсказали решение. Не мешало бы еще указать ссылки. > > Posted at Nginx Forum: >