gzip doesn't work while backend response include a Accept-Ranges header

2018-06-20 Thread foxgab
i configured gzip like bellow: http { gzipon; gzip_comp_level 5; gzip_http_version 1.0; gzip_proxiedany; gzip_min_length 1k; gzip_types text/css text/plain text/javascript text/xml application/json application/javascript application/x-javascript; ...

get cookie value which name contains hyphen

2017-12-20 Thread foxgab
my app set a cookie which named like SESSIONID-MYAPP, i want to write the value of that cookie to log file, but i tried $cookie_SESSIONID_MYAPP, $cookie_SESSIONID-MYAPP, but i can't get what i want. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,277845,277845#msg-277845 __

is proxy_read_timeout effects for a slow response?

2017-08-15 Thread foxgab
if nginx connect to a proxied server successfully, but the server takes a long time before starting to send the response, will proxy_read_timeout directive effect? if not, is there any other directive do that timeout kind work? when proxy_next_upstream is set to "off", which status code will be res

can variables be used in regular expressions?

2017-07-27 Thread foxgab
i want to change the redirect location URI protocol to https if that is using, so i tried to configure like this: proxy_redirect ~*^http://$host(/.*)?$ $scheme://$host$1; but that didn't work, so i change it to: proxy_redirect http://$http_host $scheme://$http_host; then, it works

number of connections which nginx is waiting the resopnse from upstream

2017-07-18 Thread foxgab
according to the documentation of http_stub_status_module, there are 3 kinds of connections show in the status page, but I'm confused that which kind the connections, which are waiting or reading responses from upstream servers, should be classified into ? Posted at Nginx Forum: https://forum.ngi

Re: Reverse Proxy with 500k connections

2017-07-13 Thread foxgab
is upstream keepalive connetions adaptable with websocket? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,272808,275486#msg-275486 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: upstream keepalive connections for all servers or each server?

2017-07-13 Thread foxgab
hi, how nginx determines idle connections? is keepalive adaptable with websocket? will "proxy_ignore_client_abort off" setting exclude keepalive function? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274098,275484#msg-275484 ___ nginx mai

how nginx deal with gzipped responses when gzip is on

2017-07-13 Thread foxgab
i configred nginx with gzip directives: http { gzipon; gzip_types text/css application/javascript; gzip_comp_level 9; gzip_http_version 1.0; gzip_proxiedany; } some upstream servers have already gzipped the response, i see the lengh of the respense is simil

keepalive connections cache between 2 proxy

2017-07-13 Thread foxgab
hello, my app will keep a long connection with server, while server may push message to client, two levels nginx proxy for the upstream servers, does keepalive directive support this model? the documentation of the keepalive directive said: "For HTTP, the proxy_http_version directive should be s

Re: realip disabled if header contains port

2017-07-12 Thread foxgab
foxgab Wrote: --- > hello, > > i found http_realip_module doesn't work if the realip_header contains > client port. > my config is like bellow: > http { > real_ip_header X-Real-IP; > set_real_ip_fr

realip disabled if header contains port

2017-07-12 Thread foxgab
hello, i found http_realip_module doesn't work if the realip_header contains client port. my config is like bellow: http { real_ip_header X-Real-IP; set_real_ip_from0.0.0.0/0; server {...} } the X-Real-IP header in the request is: X-Real-IP: 123.123.123.123 but the $remote_a

Re: proxy_set_header directives don't inherit from father context

2017-07-12 Thread foxgab
what's gone happen if i set multiple proxy_cache_valid directives in different levels? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275301,275458#msg-275458 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/n

"aio on" unsupported on centos6.8

2017-07-05 Thread foxgab
it said ""aio on" is unsupported on this platform in /usr/local/nginx/conf/nginx.conf:25" when i apply my conf. see version info bellow: [root]# /usr/local/nginx/sbin/nginx -v nginx version: nginx/1.10.3 [root]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4

what's the difference between proxy_buffer_size and proxy_buffers

2017-07-05 Thread foxgab
to explain the proxy_buffer_size directive, the document says: "Sets the size of the buffer used for reading the first part of the response received from the proxied server" what does "first part" mean? that is the first packet or what? what's the relationship and difference between between prox

Re: map configuration

2017-07-04 Thread foxgab
that means, if the value of $http_upgrade is null or that variable doesn't exist, the value of $connection_upgrade will set to "close", or it will set to "upgrade" in the other cases. the $http_upgrade is the value of the "Upgrade" header in the client request. Posted at Nginx Forum: https://for

Re: map configuration

2017-07-04 Thread foxgab
why no just pass the $http_upgrade and $http_connection headers to the backend? like conf bellow: proxy_set_header Upgrade $http_upgrade proxy_set_header Connection $http_Connection and if i set the Connection header to "upgrade" permanently, does it make any harm? Posted at Nginx Forum: https:/

proxy_set_header directives don't inherit from father context

2017-07-04 Thread foxgab
i found if i didn't configure any proxy_set_header directives in a context, it will inherit those directives from father context automatic, but if i set one in current context, the inheritance won't work. my configration is like bellow: http { proxy_set_header X-Forwarded-For $remote_addr;

Re: set_real_ip_from, real_ip_header directive in ngx_http_realip_module

2017-07-03 Thread foxgab
hi Maxim, Thinks for you reply. i got a problem on http_realip_module, as what you said, duplicate addresses occurred in that header. if i want to get the real ip for access limiting, and append the last hop proxy address in X-Forwarded-Fro header at the same time, what should i do? Posted at Ngi

Re: set_real_ip_from, real_ip_header directive in ngx_http_realip_module

2017-06-29 Thread foxgab
if nginx is behind another proxy, that proxy set the X-Forwarded-for header with the real client ip, and the configration of nginx is : location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; real_ip_headerX-Forwarded-For; set_real_ip_from 192.168.0.0/16; } whether the real