blank lines in config

2018-05-17 Thread Frank Liu
Should nginx ignore those blank lines (lines with spaces only) in config? I tried below in the config of nginx 1.14.0: server { ... set $testvar1 "testval1"; ... 300 blank lines, each with 20 spaces ... set $testvar2 "testval2"; ... } nginx configtest says: nginx: [emerg] too long para

Re: Nginx Directory Listing - Restrict by IP Address

2018-05-17 Thread Sathish Kumar
Hi Prajith, I had tried this option but autoindex is not allowed under if statement. location / { root /downloads; if ($allowed = 1) { autoindex on; } } Error: "autoindex" directive is not allowed here in domain.conf Thanks & Regards Sathish.V On Fri, May 18, 2018 at 2:16 PM PRAJITH

Re: Nginx Directory Listing - Restrict by IP Address

2018-05-17 Thread PRAJITH
Hi Satish, There are "if" constructs in nginx, please check http://nginx.org/r/if. if you want to allow multiple IP addresses, it might be better idea to use map. eg: map $remote_addr $allowed { default 0; 1.1.1.1 1; 2.2.2.2 1; } and then in in the download lo

Nginx Directory Listing - Restrict by IP Address

2018-05-17 Thread Sathish Kumar
Hi Team, We have a requirement to allow directory listing from few servers and disallow from other ip addresses and all IP addresses should be able to download all files inside the directory. Can somebody provide the correct nginx config for the same. location / { root /downloads; autoindex on;

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` dir

Re: if( variable exists )

2018-05-17 Thread foxman
if ($arg_user) { do as $arg_user exist bla bla bbla } if ($arg_user !~ $arg_user) { do as $arg_user not exist } Posted at Nginx Forum: https://forum.nginx.org/read.php?2,224860,279847#msg-279847 ___ nginx mailing list nginx@nginx.org ht

Compile static nginx

2018-05-17 Thread nginx
Hello all I am trying to compile a static version of nginx on Arch Linux. This is my first attempt at compiling a static program. I have tried a bunch of different options from examples that I have found googling around, but I have not had any success. I am hoping that someone can help point me

Re: Connection refused

2018-05-17 Thread Richard Stanway via nginx
You should check your upstream logs to see why it is closing connections or crashing. On Tue, May 15, 2018 at 6:22 PM Ricky Gutierrez wrote: > Any help? > > El lun., 14 may. 2018 20:02, Ricky Gutierrez > escribió: > >> hello list, I have a reverse proxy with nginx front end and I have the >> ba

Re: Nginx Cache | @ prefix example

2018-05-17 Thread Francis Daly
On Thu, May 17, 2018 at 12:50:10AM -0400, c0nw0nk wrote: Hi there, > Thank you for the response and useful information Francis incredibly > helpful. You're welcome. > My webapp outputting the X-Accel-Expires header is PHP like so. > > CODE: > echo(gmdate('D, d M Y H:i:s', 0) . ' GMT'); > ?> >