Help with nginx http auth based on forwarded IP.

2015-03-16 Thread Alex Flex
Hello Nginx, I have these lines: location / { proxy_pass http://172.4.1.2:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $our_x_forwarded_for; satisfy any; allow 116.2.200.1;

prepend a php script in all requests

2014-09-25 Thread Alex Flex
Hey guys, Once i have nginx installed with php fastcgi. Is it possible to preppend a php script to be executed when serving any request? (similar to apache prepend function). If yes could I please have an example. Thanks Alex ___ nginx mailing list

whitelist 'notabot' not working in limit_conn

2014-08-03 Thread Alex Flex
Iam trying to whitelist some IPs in the geo #connlimit1 so that the limit_conn doesnt apply to it. For some reason its not working... those ips are always being limited. I must be doing something obviously wrong guidance appreciated. Alex server { geo $connlimit1 { default 1;

Add country region in logs.

2013-08-28 Thread Alex Flex
Hello nginx! Iam trying to identify all my visitors based on their continent region, i want to log this info in each log entry. There is no geoip database for continent region so I want to map manually the countries within their regions. I already have the GeoIP db loaded, and an example map

How to distinguish if nginx generated a 504 error or upstream returned it?

2013-08-20 Thread Alex Flex
Hello ! I run nginx as a reverse proxy and send requests to an upstream server, the problem is according to my logs sometimes i start seeing this: [499] [-] [0] [11602] [xx.126.55.81] [GET /weblogin/ HTTP/1.1] or [504] [-] [0] [11602] [xx.126.55.81] [GET /weblogin/ HTTP/1.1] The first field

Set outgoing ip for reverse proxy?

2013-08-15 Thread Alex Flex
Hello nginx, Iam wondering if there is anyway to bind a specific IP as the outbound IP to contact the backend server for a nginx instance? I serve many instances in a single machine and all of them using the default IP of the server is messy. Thanks Alex __

Fwd: Adding a header to the status page output

2013-08-06 Thread Alex Flex
Hello ! Iam wondering if there is any way to add a custom header/footer to the output of the STATUS page? location /status { stub_status on; } I tried a couple of thigns but for some reason apparently it got ignored. Alex ___ nginx mailing list

Obtaining req/s or connections/sec sent to a backend-server?

2013-08-06 Thread Alex Flex
Hello Nginx I understand that nginx when uses as a reverse proxy does not allow me to poll for stats regarding the amount of connections/requests sent to backend servers. Id like to know if there is creative way I can do this without parsing the logs ? I want to do this almost as a live feed and