A much easier option is to use labels and perl to swap comment items around in the nginx.conf file. #PLABEL #development line....; production line....; if readln eq '^#PLABEL' then { swap 2 lines comment char; } else { write unchangedline; } Or something in that order.by itpp2012 - Nginx Mailing List - English
server_name www.mydomain.eu mydomain.eu;by itpp2012 - How to...
If you download prove05.zip of my site and check out the file nginx-win-prove.conf; location /ajptest1/ { [.............] rewrite /ajptest1/([^/]+) /$1 break; ajp_pass tomcats/; # or pass directly to IP } I have in my debug log: 2015/02/13 12:09:34 1632#2812: *61 "/ajptest1/([^/]+)" matches "/ajptest1/index.html", clientby itpp2012 - How to...
Define your zones in one place and use them where you need them, and yes you need multiple zones if you don't want mixed results. A zone is one cache after all, so each entry is only unique to it's zone.by itpp2012 - Other discussion
basti Wrote: ------------------------------------------------------- > Hello, > > i have a URL like > > https://example.com/foo/doc/bar/filename.txt > > I want to deny access to all files and folders in /doc/... > and try > location ~ ^/foo/(doc|etc|lib|log|sbin|var/cache|var/lib|var/log)/ { > deny all; > } Maybe something like: map $uri $lby itpp2012 - Nginx Mailing List - English
Add the cache settings; ea.: proxy_cache content; proxy_cache_key $scheme$host$request_uri$request_method; proxy_cache_valid 200 301 302 304 15s; proxy_cache_use_stale updating error timeout invalid_header http_500; proxy_pass_header Set-Cookie; proxy_pass_header Cookie; proxy_ignore_headersby itpp2012 - How to...
See http://nginx.org/en/docs/http/load_balancing.html just create multiple upstreams and use location to direct what goes where.by itpp2012 - How to...
Sure, no problem doing that with 1 nginx server.by itpp2012 - How to...
See http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass or rewrite the location rewrite /cama/([^/]+) /$1 break;by itpp2012 - How to...
Enable debug and see the logs whats actually being rewritten.by itpp2012 - Nginx Mailing List - English
Maybe something like; rewrite /<folder name>/([^/]+) /$1 break;by itpp2012 - Nginx Mailing List - English
Use map; map $request_uri $requri { default 0; ~\@ 1; } ................... server { if ($requri) { return 404; } }by itpp2012 - Migration from Other Servers
Enable debug in your logging and read the logs.by itpp2012 - Other discussion
peter petrov Wrote: ------------------------------------------------------- > Everything is working perfectly now. You can't imagine how grateful am http://nginx.org/en/donation.html :-)by itpp2012 - Nginx Mailing List - English
Use this version instead: http://nginx-win.ecsds.eu/by itpp2012 - Ideas and Feature Requests
Put them in an upstream, you will have to move the ssl certs to nginx as nginx terminates ssl at the frontend. See also https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-load-balancing-with-ssl-terminationby itpp2012 - How to...
rewrite_by_lua ' .......... if v>0 then return ngx.exit(513); end; ';by itpp2012 - How to...
There's no special need to do anything other then point other external IP's to the IP where nginx is running, you may have to add routing back to the extra IP's if they are on a subnet not already routed.by itpp2012 - How to...
In the map flip the 1 and 0 around, if $allowonly=1 then the IF is true (unless that's what you want). General rule for IF's; only use it to return a state. if ..... return .... continue with complex configuration items. Don't do: 'if ..... do complex things ....' (unless proceeded with Lua finishing with an nginx if....return) If you want to expand the logic what is ok and what not,by itpp2012 - Nginx Mailing List - English
Use map, map $request $allowonly { default 1; ~*addmedia\.upload() 0; } inside location {} if ($allowonly) { return 404; } Untested but should give you enough to test with.by itpp2012 - Nginx Mailing List - English
Does this one help? http://wiki.nginx.org/ServerBlockExampleby itpp2012 - Nginx Mailing List - English
Have a look how map is used in 'nginx-simple-WAF.conf' in the /conf folder from package in my sig. Map is your friend here.by itpp2012 - How to...
Switch to openresty with mongodb, https://www.google.nl/#q=openresty+lua+MongoDB Much easier.by itpp2012 - Nginx Mailing List - English
Setup an accesspoint with raw logging and let an iphone go trough that, see what it's doing.by itpp2012 - Nginx Mailing List - English
Jan Algermissen Wrote: ------------------------------------------------------- > Francis, > > thanks a lot; > > > proxy_hide_header > > does the trick. However, it still feels a bit brute-force. > > Hence, if there are other solutions, I would be curious to know. With Lua you could test to see which header has the least expiry time and pass only thatby itpp2012 - Nginx Mailing List - English
See https://github.com/openresty/lua-nginx-module/issues/125by itpp2012 - How to...
I might have read it wrong but it seems that you could create fake files the device is looking for or just return a 200 for such requests.by itpp2012 - Nginx Mailing List - English
19:14 17-1-2015 nginx 1.7.10.1 Gryphon Based on nginx 1.7.10 (15-1-2015, last changeset 5964:0a198a517eaf) with; + reverted changeset 5962:727177743c3c (causing segfaults) + set-misc-nginx-module v0.27 (upgraded 14-1-2015) + HttpSubsModule v0.6.4 (upgraded 14-1-2015) + lua-nginx-module v0.9.13 (upgraded 14-1-2015) + prove05.zip (onsite), a Windows Test_Suite (updated 16-1-2015) + See httpby itpp2012 - Nginx Mailing List - English
See here: http://www.experts-exchange.com/Security/Operating_Systems_Security/Windows_Security/Q_28538115.htmlby itpp2012 - Nginx Mailing List - English
kunalvjti Wrote: ------------------------------------------------------- > Sorry am new to Lua but can you plz explain how this upstream status & > control will help with this issue. How can i query for the upstream ip Use the ngxlua --add option (https://github.com/chaoslawful/lua-nginx-module) or openresty, then add https://github.com/agentzh/lua-upstream-nginx-module replace thby itpp2012 - Nginx Mailing List - English
![]() |
![]() |
![]() |
![]() |
|