Re: proxy_pass_header not working in 1.6.0

2014-07-01 Thread Jonathan Matthews
On 1 Jul 2014 07:58, Lucas Rolff lu...@slcoding.com wrote: Hi guys, I'm currently running nginx version 1.6.0 (after upgrading from 1.4.4). Sadly I've found out, after upgrading proxy_pass_header seems to stop working, meaning no headers is passed from the upstream at all You need to read

Re: proxy_pass_header not working in 1.6.0

2014-07-01 Thread Jonathan Matthews
On 1 Jul 2014 10:20, Lucas Rolff lu...@slcoding.com wrote: Well, it used to work before 1.6.0.. For me http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass_header shows that I should do: proxy_pass_header Cache-Control; So that should be correct No. You have misread the

Re: proxy_pass_header not working in 1.6.0

2014-07-01 Thread Jonathan Matthews
On 1 Jul 2014 10:34, Lucas Rolff lu...@slcoding.com wrote: Do you have a link to a documentation that has info about this then? Because in the below link, and in http://wiki.nginx.org/HttpProxyModule#proxy_pass_header theres nothing about what it accepts. How about the doc you already found,

Re: proxy_pass_header not working in 1.6.0

2014-07-01 Thread Jonathan Matthews
On 1 Jul 2014 11:01, Lucas Rolff lu...@slcoding.com wrote: So.. Where is the thing that states I can't use proxy_pass_header cache-control, or expires? :))) The proxy_hide_header and proxy_pass_header reference docs. ___ nginx mailing list

Re: RE: GeoIP FirstNonPrivateXForwardedForIP

2014-06-23 Thread Jonathan Matthews
On 23 Jun 2014 07:58, Keyur nginx-fo...@nginx.us wrote: Hello, Can someone please look into this.. I need it for proper website functionality. I don't know the answer to your problem and perhaps, given the lack of reply, no one on this public mailing list mainly populated by non-nginx staff

Re: using 2000+ ip prefixes in nginx geo module !!

2014-06-19 Thread Jonathan Matthews
On 19 June 2014 19:59, shahzaib shahzaib shahzaib...@gmail.com wrote: We've added 2000+ ip prefixes in a file geo.conf included in nginx vhost by using ngx-http_geo_module and received the following warning :- 2014/06/19 23:52:46 [warn] 1633#0: duplicate network 103.24.96.0/22, value: tw, old

Re: Caching servers in Local ISPs !!

2014-06-18 Thread Jonathan Matthews
On 18 Jun 2014 20:45, shahzaib shahzaib shahzaib...@gmail.com wrote: why not host those file on a professional CDN instead of in-house? Because 80% of the traffic is from our country and 50% of that traffic is from the ISP we're talking to and this is the reason we deployed the caching box on

Re: URI escaping for X-Accel-Redirect and proxy_pass in 1.4.7 and 1.6.0

2014-06-17 Thread Jonathan Matthews
On 17 June 2014 07:49, gwilym nginx-fo...@nginx.us wrote: The workaround is to _double_ encode so as to send back image%2520with%2520spaces.jpg to Nginx but we can't roll this out until Nginx 1.6 because it breaks 1.4... but we can't roll out 1.6 until the code is there. I don't have a nice

Re: How could I forbid outside visits without response 403

2014-06-13 Thread Jonathan Matthews
On 13 Jun 2014 15:15, 姚锟 627...@qq.com wrote: I think it still waste some resourses, RETURN A 403 STATIC PAGE.. I think you're probably wrong. You're almost certainly prematurely optimising the wrong thing. Just 403 the unwanted requests and move on with your job/life/project. I mean this

Re: location uri wildcard

2014-06-11 Thread Jonathan Matthews
On 10 June 2014 17:31, grd2345 nginx-fo...@nginx.us wrote: http://www.mysite.com/ClassScheduler.aspx [snip] I basically need a wild card to detect ClassScheduler.aspx from the above old urls This assumption looks wrong. Check out how location stanzas work: http://nginx.org/r/location Hint:

Re: nginx channel

2014-06-06 Thread Jonathan Matthews
On 6 June 2014 12:41, nginxsantos nginx-fo...@nginx.us wrote: Would be great where channels are used, I am talking about ngx_channel? Please rearrange your words into a comprehensible sentence and/or question. Thank you. ___ nginx mailing list

Re: Dynamic config options from ENV

2014-06-05 Thread Jonathan Matthews
On 5 June 2014 17:00, Maximilian Schulz nam...@gmail.com wrote: Hi everybody, is it possible to set a nginx config variable from an ENV variable? I tried several thing, but none of them worked. The most promising was specifying env MY_VAR; at the top of the nginx.conf and then using its value

Re: Issue nginx - ajax

2014-06-04 Thread Jonathan Matthews
On 4 June 2014 05:48, Vishal Mestri vishal.mes...@cloverinfotech.com wrote: Hi Jonathan Matthews, Thank you for your valuable comments. I understand , what you would like to suggest, but we are using self-signed certificate just for trial demo. Once UAT is done, we would be using actual

Re: Browser showing headers and Gziped code inside body.

2014-06-03 Thread Jonathan Matthews
On 2 June 2014 19:09, Satake nginx-fo...@nginx.us wrote: I'm currently using nginx/1.4.7 and for some reason a client is complaining that the page is showing with errors in both his browsers (Firefox and IE). The error in question is the following:

Re: Issue nginx - ajax

2014-06-03 Thread Jonathan Matthews
On 3 June 2014 11:58, Vishal Mestri vishal.mes...@cloverinfotech.com wrote: Hi B.R. and all, Really thank you for your support till now. We were able to resolve issue on IE as well as on Firefox. we did following settings:- 1) IE We added my website to secure site list. Post that,

Re: Nginx 1.7.0: location @php

2014-06-02 Thread Jonathan Matthews
On 2 June 2014 04:47, TECK nginx-fo...@nginx.us wrote: Francis, We are going in circles without reaching a solution Fortunately, this being a *public* *mailing* *list*, and Francis (along with almost every other subscriber) giving his time, experience and opinions for free, you are definitely

Re: Nginx Rewrite for Proxy Pass

2014-05-30 Thread Jonathan Matthews
On 30 May 2014 16:55, bwellsnc bwell...@gmail.com wrote: Hello everyone, I have an interesting issue. I am using nginx 1.6.0 to proxy back to my Jira instance. This is working great within my network. This is the issue. I am using a fortigate device to protect my network and I want to use

Re: Issues with my galaxy server

2014-05-29 Thread Jonathan Matthews
Someone, perhaps you, changed something on your backend (your galaxy server, which means absolutely nothing to anyone on this list, do be aware), and they fucked it. Or introduced an intermittent performance issue which is resulting in a proportion of your proxied requests to time out, if you

Re: RE: Nginx with NO SSL offload

2014-05-27 Thread Jonathan Matthews
On 27 May 2014 19:29, nginxsantos nginx-fo...@nginx.us wrote: I am still not convinced that no one faced this problem earlier. When Nginx works as a reverse proxy, is everyone doing a SSL offload for the HTTPS traffic? Yes, everyone is. ___ nginx

Re: $arg_name as an array

2014-05-09 Thread Jonathan Matthews
On 9 May 2014 10:16, beatnut nginx-fo...@nginx.us wrote: Hello, Does it possible to use $arg_name as an array? For example I've query string : ?opt[test]=1 I'd like to get value od opt[test] but $arg_opt[test] doesn't work. Is there special syntax for that case? Query strings arguments

Re: subs filter error

2014-05-09 Thread Jonathan Matthews
On 9 May 2014 13:36, Tom McLoughlin m...@tommehm.com wrote: I keep getting this error every time someone loads a page. subs filter header ignored, this may be a compressed response. while reading response header from upstream, client: xx.xx.xx.xx, server: , request: GET

Re: using $upstream* variables inside map directive

2014-05-07 Thread Jonathan Matthews
On 7 May 2014 06:38, Kirill K. nginx-fo...@nginx.us wrote: Hello, I'm trying to avoid caching of small responses from upstreams using map: map $upstream_http_content_length $dontcache { default 0; ~^\d\d$ 1; ~^\d$ 1; } Unfortunatelly, nginx seems to ignore $upstream* variables at the map

Re: Cache revalidate modified timezone mismatch

2014-05-07 Thread Jonathan Matthews
On 7 May 2014 15:51, Thijs Koerselman thijskoersel...@gmail.com wrote: I have a backend returning a last modified header in CEST. RF2616 says All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception. I'm not very surprised nginx isn't doing what you expect.

Re: Nginx receiving bytes from Amazon ELB (Performance Issue)

2014-05-07 Thread Jonathan Matthews
On 7 May 2014 19:05, rodrigo.aiello nginx-fo...@nginx.us wrote: requests are taking too long to process [snip] 1 EC2 Micro (Nginx) I found your problem. Micro instances are a false economy. Stop using them. ___ nginx mailing list nginx@nginx.org

Re: nginx logging with huge vhosts

2014-04-30 Thread Jonathan Matthews
On 30 Apr 2014 05:56, Joydeep Bakshi joydeep.bak...@netzrezepte.de wrote: Hello Maxim, Presently I have configured separate access error log for each every nginx vhost. I wonder if there is other alternative which can log all vhosts into a common access error log and later split them

Re: can multiple domain points a single nginx host with server_name ?

2014-04-28 Thread Jonathan Matthews
On 28 Apr 2014 12:44, Joydeep Bakshi joydeep.bak...@netzrezepte.de wrote: is nginx [ server_name test1.com test2.com www.test3.com ] equivalent to apache [ servername test1.com serveralias test2.com www.test3.com ] ? As Maxim says, yes. If you have hardcoded names, i believe

Re: 1.7.01 mainline on debian has installed a wrong package

2014-04-27 Thread Jonathan Matthews
On 27 April 2014 22:37, ura nginx-fo...@nginx.us wrote: after running the upgrade to 1.7.01 mainline version on debian, the nginx version check (service nginx -V) lists: 0.91-ubuntu1 - even though 1.7.01 is listed in the package manager in debian. does this mean that debains repos are

Re: 1.7.01 mainline on debian has installed a wrong package

2014-04-27 Thread Jonathan Matthews
On 27 April 2014 23:00, ura nginx-fo...@nginx.us wrote: thanks for assisting. i ran that command and see 3 repos which provide nginx. from what i see there, the 1.7.0-1 wheezy package is the candidate and also has been installed. i just checked my local development machine which is running

Re: 1.7.01 mainline on debian has installed a wrong package

2014-04-27 Thread Jonathan Matthews
On 27 April 2014 23:14, ura nginx-fo...@nginx.us wrote: those two commands don't show any version numbers No, they don't - they show paths. so i am not presently any closer to identifying the issue here. the paths returned look fine to me, from what i know already. Ok. Good luck finding the

Re: how to allow apache to control SSL traffic ?

2014-04-21 Thread Jonathan Matthews
On 21 Apr 2014 07:01, Joydeep Bakshi joydeep.bak...@netzrezepte.de wrote: Hello list, My apache vhosts are configured to take care of SSL connections. I have installed nginix as http accelerator. How can I instruct nginx to pass all SSL request to apache SSL vhost ? Most simply, try stopping

Re: SSL renegotiation probelm using nginx as reverse proxy to apache

2014-04-04 Thread Jonathan Matthews
On 4 Apr 2014 01:57, sean_at_stitcher nginx-fo...@nginx.us wrote: I'm not sure I understand why apache wants to renegotiate with nginx, nor why nginx doesn't seem to want to do it (despite apache thinking it can.) I vaguely recall seeing (on this list) the suggestion that Apache does this (at

Re: Web GUI

2014-04-04 Thread Jonathan Matthews
On 5 Apr 2014 00:03, Knut Moe kmo...@gmail.com wrote: I just got NginX installed on Ubuntu and was wondering if there is a Web GUI built-in that can be called from the local IP address with some port number? Nginx does not have a GUI built in. It has a status module called stub_status which you

Re: Transfering url arguments to different location

2014-04-02 Thread Jonathan Matthews
On 2 Apr 2014 07:31, Cristian Rusu cri...@gmail.com wrote: Hello I have a setup on nginx to count downloads. location / {. post_action /afterdownload; Here I have a value in $arg_key location /afterdownload { I need $arg_key here Any way to send it to /afterdownload

Re: 404 error with rewriting rule

2014-04-02 Thread Jonathan Matthews
On 1 Apr 2014 19:23, skyice nginx-fo...@nginx.us wrote: Hello, With this rule : rewrite ^/([^/])(/.*) $2?locale=$1$query_string last; Your first capture is looking for exactly 1 character. Do you really mean that? J ___ nginx mailing list

Re: Transfering url arguments to different location

2014-04-02 Thread Jonathan Matthews
On 2 April 2014 14:13, B.R. reallfqq-ng...@yahoo.fr wrote: If someone had details about reasons not to use post_action (either from the referenced IIRC discussion or from other sources), I would be very interested in them. http://forum.nginx.org/read.php?2,213627,213722#msg-213722 and the note

Re: Defining a default server for when vhost does not exist for requested hostname (including blank hostname), for http and https

2014-03-28 Thread Jonathan Matthews
On 28 March 2014 16:51, Ben Johnson b...@indietorrent.org wrote: Maxim, when you say, If SNI is used, it's in theory possible to close a connection early, do you mean to imply that while possible, this capability has not yet been implemented in nginx (the tickets are still open after almost

Re: Defining a default server for when vhost does not exist for requested hostname (including blank hostname), for http and https

2014-03-28 Thread Jonathan Matthews
On 28 March 2014 14:31, Ben Johnson b...@indietorrent.org wrote: Is there any way to av,oid this certificate being presented, but still return the 444 response under the conditions I've described? I'd /suspect/ not, as the 444 response can't be delivered (i.e. the connection closed) until

Re: nginx ssl certificate via variable

2014-03-27 Thread Jonathan Matthews
On 26 March 2014 13:03, stremovsky nginx-fo...@nginx.us wrote: Hello ! When it will be possible to use variables with ssl_certificate in nginx configuration ? It has been discussed several times already in the passed. For example here: http://forum.nginx.org/read.php?29,235397,235408

Re: Nginx forum returns 502 (2014-03-25T08:13Z)

2014-03-25 Thread Jonathan Matthews
On 25 March 2014 21:17, Jim Ohlstein j...@ohlste.in wrote: [what does] that T08:13Z mean The Z suffix indicates UTC, as per section 2 of http://www.ietf.org/rfc/rfc3339.txt. HTH, Jonathan -- Jonathan Matthews Oxford, London, UK http://www.jpluscplusm.com/contact.html

Re: Nginx getting last variables on exploded uri

2014-03-15 Thread Jonathan Matthews
On 15 Mar 2014 17:30, gokhanege nginx-fo...@nginx.us wrote: Where is the problem? I cound not found it. Your problem is that all of your .* matches are greedy, whereas you (probably) want only the last to be greedy. Have a Google for how to do that with regular expressions. You also might want

Re: SMNP monitoring support

2014-03-14 Thread Jonathan Matthews
On 14 March 2014 04:01, Niranjan Khare niranjankh...@hotmail.com wrote: Hello all, I'd like to know if nginx supports / plans to support triggering SNMP alarms in the near future? I would suggest, and hope, not. That sort of feature creep and bloat doesn't belong anywhere near a small,

Re: Some Issues with Configuration

2014-03-05 Thread Jonathan Matthews
On 5 March 2014 11:13, Richard Ibbotson richard.ibbot...@gmail.com wrote: Hi I've been having a few problems with configuration of NGINX. No problems with running Apache or Lighttpd on my own Linux box but I've been scratching my head over NGINX. When I've compiled from source or used the

Re: Some Issues with Configuration

2014-03-05 Thread Jonathan Matthews
On 5 March 2014 21:18, Richard Ibbotson richard.ibbot...@gmail.com wrote: On Wednesday 05 Mar 2014 21:03:22 Jonathan Matthews wrote: Nginx doesn't execute PHP. It passes each request destined for your blog (i.e. the locations you decide are your blog) to another process that runs/is-running

[SHOW'N'TELL] Primitive RBAC/AAA implementation in nginx config

2014-02-26 Thread Jonathan Matthews
: https://gist.github.com/jpluscplusm/922 Cheers, Jonathan -- Jonathan Matthews Oxford, London, UK http://www.jpluscplusm.com/contact.html ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: [SHOW'N'TELL] Primitive RBAC/AAA implementation in nginx config

2014-02-26 Thread Jonathan Matthews
On 26 Feb 2014 12:05, Jonathan Matthews cont...@jpluscplusm.com wrote: Hi all - I spent some time poking at a interesting problem that came up last night, and ended up with this primitive RBAC system, implemented in declarative nginx config. Thanks to the couple of people who reminded me

Re: Translating apache config to nginx

2014-02-21 Thread Jonathan Matthews
On 21 February 2014 21:51, Grant emailgr...@gmail.com wrote: What is normal operation? If the request you make is like /thr.ee, it should be allowed; if it is not like /thr.ee is should be blocked. I just meant normal browsing around the inbox in Roundcube. If you assume that people on this

Re: nginx limit_rate if in location - strange behaviour - possible bug ?

2014-02-17 Thread Jonathan Matthews
On 17 February 2014 10:02, Bozhidara Marinchovska quintesse...@bulinfo.net wrote: My question is what may be the reason when downloading the example file with download manager not to match limit_rate directive Download managers open multiple connections and grab different byte ranges of the

Re: ASP.NET pages with nginx

2014-02-11 Thread Jonathan Matthews
On 10 Feb 2014 17:12, parnican nginx-fo...@nginx.us wrote: I have tried experiments with following parameters but no change..not sure this is the way i should go... Any suggestion how to make nginx *not* pass through the :8080? How about proxy_set_header? J

Re: ASP.NET pages with nginx

2014-02-11 Thread Jonathan Matthews
On 11 Feb 2014 13:44, parnican nginx-fo...@nginx.us wrote: Just did some experiments with following settings: proxy_set_header X-Real-IP $remote_addr; proxy_pass_header X-Accel-Redirect; No change:( ...its time to give up or any ides? How about using it to set the header that contains

Re: ASP.NET pages with nginx

2014-02-11 Thread Jonathan Matthews
On 11 Feb 2014 15:09, parnican nginx-fo...@nginx.us wrote: This didn't work. proxy_set_header Host $proxy_host; next try proxy_set_header Host $http_host:8080; Tell your app to expect bernolak.dyndns.info, without the port suffix. Tell nginx to set the Host header to bernolak.dyndns.info,

Re: sudden nginx hang -- restart fails, 98: Address already in use

2014-02-05 Thread Jonathan Matthews
On 5 February 2014 18:53, dwirth nginx-fo...@nginx.us wrote: Hello, all. About an hour ago, out of the blue, my server stopped responding to webpage requests. We are using nginx + php-fpm on RHEL6. # service nginx status nginx (pid 31600) is running... # service nginx restart Stopping

Re: nginx - Dns server ?

2014-02-01 Thread Jonathan Matthews
On 31 January 2014 20:35, Larry nginx-fo...@nginx.us wrote: I just read that nginx has a resolver. Will it be able to replace our powerdns which just enables the basics ds stuffs ? (lookup + ttl as usual) No. On 1 February 2014 07:38, Larry nginx-fo...@nginx.us wrote: Maybe this will make it

Re: X-Frame-Options: Nginx includes header twice

2014-01-28 Thread Jonathan Matthews
On 28 January 2014 11:04, Some Developer someukdevelo...@gmail.com wrote: If I could set arbitary headers in Django then I could do it all there I know nothing about Django, but this would seem to be what you're asking for:

Re: Launching Excel in a production web server on a Mac

2014-01-28 Thread Jonathan Matthews
To say that you've not given us sufficient information to help you debug your problem would perhaps be biggest understatement I've yet seen in 2014. Seriously, chap - I can't open my spreadsheet in nginx ... are you /really/ expecting anyone to be able to help from that minimal (if not totally

Re: X-Frame-Options: Nginx includes header twice

2014-01-27 Thread Jonathan Matthews
On 27 January 2014 02:49, Some Developer someukdevelo...@gmail.com wrote: Seems a bit strange to me that an application framework sets HTTP headers. Surely this should be left to the HTTP server? What are other peoples opinions on this? There are many instances where the application is the

Re: nginx seems to proxy only http GET

2014-01-27 Thread Jonathan Matthews
On 27 January 2014 17:24, Matthias Richter matthias.rich...@identpro.de wrote: Hi, I'm using nginx to offload https to http. That works well but in my backend only GET Requests seem to get through. For all POST, PUT and DELETE I only receive a Status 400 with conten HTTP method POST is not

Re: Understanding location blocks and try files

2014-01-22 Thread Jonathan Matthews
On 22 January 2014 18:31, AD7six nginx-fo...@nginx.us wrote: What confuses me is why this example is a 404: curl -i http://nginx.dev/apples.json HTTP/1.1 404 Not Found Server: nginx/1.4.4 As can be seen in the log [3] there is an invalid response from /index.php. If I disable the location

Re: Understanding location blocks and try files

2014-01-22 Thread Jonathan Matthews
On 22 January 2014 20:36, Francis Daly fran...@daoine.org wrote: On Wed, Jan 22, 2014 at 02:54:35PM -0500, AD7six wrote: Hi there, location ~ \.php$ { location ~* \.(?:manifest|appcache|html?|xml|json)$ { A valid response where the url is a file: $ curl -i

Re: Help required in Setting up FTP Load Balancer in NGINX-

2014-01-21 Thread Jonathan Matthews
On 21 January 2014 06:56, tilde...@gmail.com nginx-fo...@nginx.us wrote: I required help to configure FTP Load balancer in NGINX. Can you all please help me with the necessary steps or any link which explains the same. Note: My incoming FTP request will come in FTP protocol only. We cannot

Re: Nested location block for merging config returns 404?

2014-01-21 Thread Jonathan Matthews
On 21 January 2014 13:29, WheresWardy nginx-fo...@nginx.us wrote: I just get a 404 returned for the previously workings URLs: location ~ /(dir1/)?dir2/ { location \.(txt|css) { add_header X-My-Static value2; } add_header X-My-Header value1; proxy_pass http://myproxy; } Can

Re: Nested location block for merging config returns 404?

2014-01-21 Thread Jonathan Matthews
On 21 January 2014 13:40, WheresWardy nginx-fo...@nginx.us wrote: I don't think it's a regex issue, because if I add an additional proxy_pass inside the nested location block, I then get a valid request. Additionally, any headers set inside the outer location block don't appear, but then if I

Re: Nested location block for merging config returns 404?

2014-01-21 Thread Jonathan Matthews
On 21 January 2014 13:59, WheresWardy nginx-fo...@nginx.us wrote: Your line location \.(txt|css) { looks like a regex, but you're not telling nginx it /is/ a regex. I wouldn't expect anything to work until you fix that. Apologies, that was a typo during simplification of my config. I do

Re: Images Aren't Displaying When Perl Interpreter Is Enabled

2014-01-16 Thread Jonathan Matthews
At first, pre-coffee glance, I suspect people will be better placed to help you if you provide some examples (redacted if necessary) of URIs that work and URIs that don't work ... ___ nginx mailing list nginx@nginx.org

Re: Nginx as reverse Proxy, remove X-Frame-Options header

2014-01-09 Thread Jonathan Matthews
On 9 January 2014 10:03, basti black.flederm...@arcor.de wrote: Hello, I have a closed-source Webapp that run on an IIS-Webserver and send a X-Frame-Options: SAMEORIGIN header. I also have to implement this Webapp in my own, Frame based Application. So I try to use nginx as a reverse Proxy,

Re: Nginx as reverse Proxy, remove X-Frame-Options header

2014-01-09 Thread Jonathan Matthews
On 9 January 2014 11:57, Maxim Dounin mdou...@mdounin.ru wrote: Hello! On Thu, Jan 09, 2014 at 10:21:43AM +, Jonathan Matthews wrote: On 9 January 2014 10:03, basti black.flederm...@arcor.de wrote: Hello, I have a closed-source Webapp that run on an IIS-Webserver and send a X

Re: Dynamic ssl certificate ? (wildcard+ multiple different certs)

2014-01-09 Thread Jonathan Matthews
On 9 January 2014 16:28, Larry nginx-fo...@nginx.us wrote: I would like to be able to load the right cert according to the cookie set and request uri. A sort of dynamic setting. So, what is the workaround I could use to avoid creating one file per new (self-signed)certificate issued ? Your

Re: proxy_pass check if 404, and return 404

2014-01-07 Thread Jonathan Matthews
The *only* context I can see this being even slightly useful is where you are concerned about the unacceptably large size of the upstream server's 404 page. If this isn't your problem, I don't understand what you're trying to solve. ___ nginx mailing

Re: proxy_pass check if 404, and return 404

2014-01-07 Thread Jonathan Matthews
On 7 January 2014 23:57, Jonathan Matthews cont...@jpluscplusm.com wrote: The *only* context I can see this being even slightly useful is where you are concerned about the unacceptably large size of the upstream server's 404 page. If this isn't your problem, I don't understand what you're

Re: Very slow dns lookup using proxy_pass

2014-01-06 Thread Jonathan Matthews
On 6 January 2014 20:34, justink101 nginx-fo...@nginx.us wrote: Consistently slow DNS lookups from nginx I *really* don't think you've demonstrated anything that points to that conclusion. Do some tcpdump'ing. Show the data. Show your working. ;-) J

Re: Very slow dns lookup using proxy_pass

2014-01-03 Thread Jonathan Matthews
On 4 January 2014 03:42, justin nginx-fo...@nginx.us wrote: I am seeing very slow DNS lookup times ( 2 seconds ) using proxy_pass, even though dig response times on the server are quick [snip] Any ideas why this is so slow, and solutions? Please demonstrate a slow request, and show the data

Re: Using 127.0.0.1 in resolver

2013-12-20 Thread Jonathan Matthews
On 20 December 2013 23:20, justin nginx-fo...@nginx.us wrote: Using: resolver 127.0.0.1 valid=300s; Does not work. I assume this would simply uses the DNS servers listed in /etc/resolv.conf? Your assumption is wrong. You'd need to be running a local DNS resolver for that config to work.

Re: Optimizing NGINX TLS Time To First Byte (TTTFB)

2013-12-17 Thread Jonathan Matthews
On 17 December 2013 08:46, Lukas Tribus luky...@hotmail.com wrote: Hi Adam, Thanks, this is very helpful. Are you trying to upstream the record size patch? What I don't get from your patch, it seems like you are hardcoding the buffer to 16384 bytes during handshake (line 570) and only later

Re: Proxy_cache or direct static files ?

2013-12-16 Thread Jonathan Matthews
On 16 December 2013 10:47, Larry nginx-fo...@nginx.us wrote Did i understand something wrong ? Yes. Proxy cache is for storing the response of an upstream HTTP server whose requests you're proxying, so that you don't have to ask the potentially slow(er) upstream server the next time an

Re: sent_http_HEADER Volatile under Nginx 1.2.4

2013-12-16 Thread Jonathan Matthews
On 16 December 2013 12:38, Paul Taylor m...@ptylr.com wrote: Hi Maxim, Ok, thanks for the clarification. So to confirm, we are looking for the value of the sent header from the upstream, to identify whether the content should be served from the cache, or the upstream. Does this therefore

Re: hello

2013-12-15 Thread Jonathan Matthews
On 15 December 2013 15:21, nginx14 nginx-fo...@nginx.us wrote: Hello, I have a nginx server is enabled. And I have a file called htaccess The file should cause to allowing accessed only from Israel. But the file does not work, I realized that it is related to nginx only. Nginx does not use

Re: Maintenance mode for all but my ip

2013-12-07 Thread Jonathan Matthews
On 7 December 2013 14:58, B.R. reallfqq-ng...@yahoo.fr wrote: I am new to the use of maps, but I suppose it would fit perfectly, using core variables such as the binary IP address: [snip] rewrite ^.*$ $target #Redirecting all traffic according to map-assigned I don't particularly like ^^^

Re: Maintenance mode for all but my ip

2013-12-07 Thread Jonathan Matthews
On 7 December 2013 15:19, B.R. reallfqq-ng...@yahoo.fr wrote: Hello, On Sat, Dec 7, 2013 at 4:10 PM, Jonathan Matthews cont...@jpluscplusm.com wrote: rewrite ^.*$ $target #Redirecting all traffic according to map-assigned I don't particularly like ^^^ this. It seems like a level

Re: Rewrite URL with parameters

2013-12-05 Thread Jonathan Matthews
On 5 December 2013 17:09, Raphael R. O. rabe...@gmail.com wrote: Hi guys, I'm trying to rewrite an url with a few parameters, but unsuccessfully. You're almost there ;-) What i already tried: rewrite

Re: NGINX Location Matching Question - Case insensitive matching at the start of a URI

2013-12-05 Thread Jonathan Matthews
On 5 December 2013 23:29, Brad Van Sickle bvs7...@gmail.com wrote: Hi, I'm running in a somewhat urgent issue where I have to make a case-insensitive location match on a URI segment that is at the beginning of the URI. so I want to match /uri-segment/* /URI-segment/* /Uri-Segment/*

Re: rewrite or return directives for discuz v3.1

2013-12-04 Thread Jonathan Matthews
On 4 December 2013 07:54, r004 nginx-fo...@nginx.us wrote: hello; I want to write a block to put in my VHOST config file. i want 1. if there is /install/index.php/ in the link. it shouldbe removed from the link. 2. if the format is like /uc_server/blab.php/uc_server/blahblah ===it should

Re: nginx - workers segfaulting

2013-12-04 Thread Jonathan Matthews
On 4 December 2013 09:36, Lukas Tribus luky...@hotmail.com wrote: Agreed, the configuration workaround is viable; but the problem lies in the actual troubleshooting. Coming to this conclusion takes time, time the users don't have when the workers are crashing. Its not always possible to

Re: Need to compare client certificate CN with an entry in /etc/hosts

2013-11-26 Thread Jonathan Matthews
On 26 November 2013 19:19, Radha Venkatesh (radvenka) radve...@cisco.com wrote: we have to match the client certificate CN with an existing entry in /etc/hosts. Please could you specify *exactly* what you need to ensure matches? It's not obvious (to me!), given what you wrote and given the

Re: limit_req and limit_conn in rewrite modules if statement

2013-11-18 Thread Jonathan Matthews
On 18 November 2013 20:57, Nam nginx-fo...@nginx.us wrote: To elaborate a bit more, in a single location I may end up with something like this... set $Whitelisted No; if ($GeoList1 = allow) { set $Whitelisted Yes; } if ($GeoList5 = allow) { set $Whitelisted Yes; } if

Re: using uninitialized pat variable while logging request

2013-11-16 Thread Jonathan Matthews
On 16 Nov 2013 01:02, Toni Mueller support-ng...@oeko.net wrote: Unfortunately, there is nothing between the info (too little) and debug log levels (too much). But it was fruitful, as I found the problem. :) Why don't you let the list know how you fixed it, so the next person with the same

Re: Define a proxy for Nginx

2013-11-06 Thread Jonathan Matthews
On 5 November 2013 15:25, António P. P. Almeida a...@perusio.net wrote: Assuming you're using php-fpm or php-cgi you can set a param to pass that as a server variable: fastcgi_param HTTP_PROXY 'http://proxy:myport'; Then you'll have a $_SERVER['HTTP_PROXY'] entry for the global $_SERVER. I

Re: Define a proxy for Nginx

2013-11-05 Thread Jonathan Matthews
On 4 November 2013 14:09, odesport nginx-fo...@nginx.us wrote: I can't modify PHP code. I've managed to do this for Apache by adding the line export http_proxy=http://myproxy:port; in /etc/apache2/envvars Glad to hear you've solved your problem :-) J

Re: Define a proxy for Nginx

2013-11-04 Thread Jonathan Matthews
) and it is /that/ process which you need to inform about an outbound HTTP proxy. The specifics of how you do that will depend on which process you've chosen to contain your PHP, and the way in which your PHP makes outbound HTTP calls. HTH, Jonathan -- Jonathan Matthews Oxford, London, UK http

Re: Rewrite Rule Assistance

2013-10-22 Thread Jonathan Matthews
doesn't work as you expected. Then we can help you learn, without just doing your job for you ;-) Jonathan -- Jonathan Matthews Oxford, London, UK http://www.jpluscplusm.com/contact.html ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org

Re: Solving a 500 error

2013-10-01 Thread Jonathan Matthews
On 1 October 2013 17:52, Ian Hobson ian.hob...@ntlworld.com wrote: Hi All, I have an nginx install with the configuration below. The server is a linux VM running under Virtual Box on my windows machine. The website / directory is made available as a sharename using Samba, which I connect to

Re: Solving a 500 error

2013-10-01 Thread Jonathan Matthews
On 1 October 2013 22:57, Ian Hobson ian.hob...@ntlworld.com wrote: On 01/10/2013 20:36, Jonathan Matthews wrote: To be fair, chap, you're the one who has access to the log files! What do *they* say? They tell me nothing new. You get a 500 in your *access* log and a simultaneous entry

Re: Compare variable got from location with set of strings

2013-09-23 Thread Jonathan Matthews
On 23 September 2013 11:03, Vil Surkin vill@gmail.com wrote: Hello, I have some location in configuration like this: location ~ /([A-z]+_[A-z0-9]+) { … do something (got $1) … } And i need to compare this '$1' with a set of strings. How can i do this? Use a named capture in the

Re: Server_Name regular expression

2013-08-30 Thread Jonathan Matthews
On 29 Aug 2013 10:01, christospap nginx-fo...@nginx.us wrote: I would like to syntax a regular expression which will match two server names. The server names are example.com and www.example.com. In particular, a regular expression for www or nothing I wrote the following regular expression

Re: Sub-domain filtering

2013-08-19 Thread Jonathan Matthews
On 19 Aug 2013 07:05, ronin nginx-fo...@nginx.us wrote: I am using the statement is: if ($ host! = www.mj.com|ci.mj.com) {rewrite ^ / (. *) $ http://www.mj.com/ $ 1 permanent;} This page contains a redirect loop occurs causing the problem can not access the site, I ask you how to handle this

Re: How to turn off gzip compression for SSL traffic

2013-08-18 Thread Jonathan Matthews
On 18 August 2013 18:09, itpp2012 nginx-fo...@nginx.us wrote: Igor Sysoev Wrote: --- Yes, modern nginx versions do not use SSL compression. [...] You have to split the dual mode server section into two server server sections and set gzip

Re: Cookie/Session Expired - OWA SSL Reverse Proxy

2013-08-14 Thread Jonathan Matthews
On 14 August 2013 18:20, spacecwoboy nginx-fo...@nginx.us wrote: Hi. Trying to configure a reverse proxy to allow external access to an outlook web access server. I am able to route traffic through the NGINX to the OWA server, present the web page, and place the username pw into the form.

Re: NGINX serving data via NFS mount

2013-08-12 Thread Jonathan Matthews
On 12 Aug 2013 08:34, Rakshith nginx-fo...@nginx.us wrote: Hi, Can anybody tell me what are the things needed by nginx to forward the request via the NFS mount point?? Changes to the config file as such?? Nothing special is needed in my experience. That's the point of NFS exposing a normal

Re: How to rewrite with cookie

2013-08-12 Thread Jonathan Matthews
On 12 Aug 2013 19:52, Rodrigo Serra Inacio roina...@gmail.com wrote: Hi, What do you think is more efficient...cookies or redirect by the user agent ? If you do it based on UA *at*the*network*border* you'll block mobile users from switching to your desktop site if they really want to. I /hate/

Re: allow access on a sublocation

2013-08-06 Thread Jonathan Matthews
On 6 Aug 2013 15:08, Greg g...@2lm.fr wrote: Hi, this configuration does not work as expected : server { satisfy any; auth_basic DING DING SONG; auth_basic_user_file /etc/apache2/htpasswd; allow from CIDR; allow from CIDR; allow from CIDR; allow from CIDR;

Re: allow access on a sublocation

2013-08-06 Thread Jonathan Matthews
On 6 Aug 2013 15:35, Greg g...@2lm.fr wrote: It match evrything that _starts_ with /allowed/ , right ? Yes it does; I had a brain-fart. Personally I omit the ^~ unless I have a situation that definitely requires it, as it's clearer without it IMHO. YMMV. J

Re: RE: writev function not implemented

2013-08-05 Thread Jonathan Matthews
On 5 August 2013 23:22, Rangel, Raul raul.ran...@disney.com wrote: So I just tried you little script inside my container (AUFS on top of ZFS): root@47dfdb95e2a6:/# ./a.out writev: Function not implemented root@47dfdb95e2a6:/# Then I tried my script outside of the container (ZFS):

  1   2   >