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: map directive doubt

2017-03-09 Thread Francis Daly
On Thu, Mar 09, 2017 at 11:01:38AM +0530, Anoop Alias wrote: Hi there, > Just have a doubt in map directive > > map $http_user_agent $upstreamname { > default desktop; > ~(iPhone|Android) mobile; > } > > is correct ? That doesn't look too hard to test. == server { listen 8880; retu

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: Reverse Proxy with 500k connections

2017-03-09 Thread Konstantin Pavlov
On 09/03/2017 21:10, larsg wrote: > Hi Reinis, > > yes, IPs exist: > > ifconfig > eth0: flags=4163 mtu 1500 > inet 192.168.1.130 netmask 255.255.255.0 broadcast 192.168.1.255 > ether fa:16:3e:1e:ad:da txqueuelen 1000 (Ethernet) > ... > eth1: flags=4163 mtu 1500 > in

Re: RE: Reverse Proxy with 500k connections

2017-03-09 Thread larsg
Hi Reinis, yes, IPs exist: ifconfig eth0: flags=4163 mtu 1500 inet 192.168.1.130 netmask 255.255.255.0 broadcast 192.168.1.255 ether fa:16:3e:1e:ad:da txqueuelen 1000 (Ethernet) ... eth1: flags=4163 mtu 1500 inet 192.168.1.131 netmask 255.255.255.0 broadcast 192.1

RE: RE: Fastcgi_cache permissions

2017-03-09 Thread Maxim Ozerov
> Why would you manipulate nginx cache files from php directly (or even if you > do so why not run the nginx and phpfpm under same user then)? Yeah... For example: with php-fpm you can run each site with its own uid/gid (pool configuration), and with address on which to accept FastCGI requests S

RE: RE: Fastcgi_cache permissions

2017-03-09 Thread Reinis Rozitis
> thanks for the reply. The use case that I have is when php-fpm is running as a > user different than the nginx one. In this case the permissions being set as > 0700 > basically deny any manipulation of the cached files from php scripts. > Everytime > you try something like this you get permissi

Re: Reverse Proxy with 500k connections

2017-03-09 Thread larsg
Hi everybody, ok, I recognized another linux network problem that I solved now. Situation now is like following: When I call my upstream address via curl (on the nginx host) by selecting the corresponding local interface (eth0-9 = 192.168.1.130-139) everything is fine. curl https://192.168.1.

RE: Reverse Proxy with 500k connections

2017-03-09 Thread Reinis Rozitis
> When enabling sysctl option "net.ipv4.ip_nonlocal_bind = 1" it is possible > to use local IP addresses (192.168.1.130-139) as proxy_bind address. > But than using such an address (other than 0.0.0.0), nginx will produce an > error message. Do the 192.168.1.130-139 IPs actually exist and are conf

Re: RE: Fastcgi_cache permissions

2017-03-09 Thread maznislav
Hi Maxim, thanks for the reply. The use case that I have is when php-fpm is running as a user different than the nginx one. In this case the permissions being set as 0700 basically deny any manipulation of the cached files from php scripts. Everytime you try something like this you get permission

RE: Fastcgi_cache permissions

2017-03-09 Thread Maxim Ozerov
And what is the purpose of changing permissions? In other words - nginx.conf - user www-data; So for example, Directories Access: (0700/drwx) with Uid: (33/www-data) And no one forbids you to access the cache from this user for manipulating files (allow other process (for example php-fpm runs

Re: Reverse Proxy with 500k connections

2017-03-09 Thread larsg
Thanks for the advice. I implemented this approach. Unfortunately not with 100% success. When enabling sysctl option "net.ipv4.ip_nonlocal_bind = 1" it is possible to use local IP addresses (192.168.1.130-139) as proxy_bind address. But than using such an address (other than 0.0.0.0), nginx will p

Fastcgi_cache permissions

2017-03-09 Thread maznislav
Hello, I was searching for an answer for this question quite a bit, but unfortunately I was not able to find such, so any help is much appreciated. The issue is the following - I have enabled Fastcgi_cache for my server and I have noticed that the cache has very restricted permissions 700 to be pre

Re: Passing $upstream_response_time in a header

2017-03-09 Thread Maxim Dounin
Hello! On Tue, Mar 07, 2017 at 04:38:04PM -0500, Jonathan Simowitz via nginx wrote: > Hello, > > I have an nginx server that runs as reverse proxy and I would like to pass > the $upstream_response_time value in a header. I find that when I do the > value is actually a linux timestamp with millis

Re: Nginx reverse proxy for TFTP UDP port 69 traffic

2017-03-09 Thread Eric Feldhusen
On Mar 7, 2017, at 4:58 PM, Vladimir Homutov wrote: On 08.03.2017 00:21, Eric Feldhusen wrote: I’m trying to use Nginx to reverse proxy TFTP UDP port 69 traffic and I”m having a problem with getting files through the nginx reverse proxy. My configuration is simple, I’m running TFTP on one Cento

Conflict between form-input-nginx-module and nginx-auth-request-module?

2017-03-09 Thread Yongtao You via nginx
Hi, I was able to get both form-input-nginx-module and nginx-auth-request-module work fine, individually, with nginx-1.9.9. Putting them together, and the HTTP POST request just timeout (I never got any response back). Any one had any experience using both of them in the same location block? Tha

Re: combining map

2017-03-09 Thread Ruslan Ermilov
On Thu, Mar 09, 2017 at 02:05:20PM +0530, Anoop Alias wrote: > Hi Igor, > > I need to use this with > > ## > srcache_fetch_skip $skip_cache; > srcache_store_skip $skip_cache; > ## > > As per srcache docs the value must be 0 for not skipping and anything other > th

Re: Reverse Proxy with 500k connections

2017-03-09 Thread Maxim Konovalov
This is just a matter of number of ip addresses you have in a proxy_bind pool and suitable hash function for the split_clients map. Adding additional logic to proxy_bind ip address selection you still can face the same problem. On 3/8/17 9:45 PM, Tolga Ceylan wrote: > is IP_BIND_ADDRESS_NO_PORT t

Re: combining map

2017-03-09 Thread Igor A. Ippolitov
No, it won't. You can try something like map $request_method $requestnocache { default ""; POSTwhatever; } map $requestnocache$query_string$cookie__mcnc $skip_cache { default 0; ~.1; } So basically, "don't skip by default, but skip, if there are any letters" You can test

Re: combining map

2017-03-09 Thread Anoop Alias
Hi Igor, I need to use this with ## srcache_fetch_skip $skip_cache; srcache_store_skip $skip_cache; ## As per srcache docs the value must be 0 for not skipping and anything other than 0 will be considered for skipping Will combining the variables work here too?

Re: combining map

2017-03-09 Thread Igor A. Ippolitov
If you are going to use it inside proxy_no_cache directive, you can combine proxy_cache_method (POST is not included by default) and 'proxy_no_cache $query_string$cookie__mcnc' The latter will not cache the request until there is query string or a cookie with a value set. So basically, it looks