Re: How to use location before rewrite

2013-11-04 Thread Francis Daly
On Mon, Nov 04, 2013 at 08:51:53PM -0500, etrader wrote: Hi there, the answer to the question in the Subject: line is "you don't". > I have a set of rewrite rules as > > rewrite ^/(.*) /script.php?file=$1 last; > > location ~ \.php$ { > php proxy > } > > but I want to make a few exceptions as

How to use location before rewrite

2013-11-04 Thread etrader
I have a set of rewrite rules as rewrite ^/(.*) /script.php?file=$1 last; location ~ \.php$ { php proxy } but I want to make a few exceptions as location = file1|file2|file3 { static delivery } but rewrite will change any static file to php file before the latter location. I cannot use rewrit

Re: Support for relative URL in Location header

2013-11-04 Thread Maxim Dounin
Hello! On Mon, Nov 04, 2013 at 10:42:00AM -0800, Jeroen Ooms wrote: > HTTP status codes such as 201, 301, 302, etc rely on the HTTP Location > header. The current standard of HTTP specifies that this URL must be > absolute. However, all popular browsers will accept a relative URL, > and it is cor

Re: Help needed with config

2013-11-04 Thread Ian Hobson
Hi Francis, Your guess was spot on. I had domain "resellerdev.anake.hcs" confused with "reseller.anake.hcs" , becasue of a switch about on my favourites menu :( Thanks. Ian On 04/11/2013 19:01, Francis Daly wrote: On Mon, Nov 04, 2013 at 05:37:15PM +, Ian Hobson wrote: Hi there, I'm

Re: Help needed with config

2013-11-04 Thread Francis Daly
On Mon, Nov 04, 2013 at 05:37:15PM +, Ian Hobson wrote: Hi there, > I'm baffled. What I want to do is to serve static and php files from one > root if they exist there, and > from another if they don't, and give a 404 error if the file is in > neither location. I have the following config f

Support for relative URL in Location header

2013-11-04 Thread Jeroen Ooms
HTTP status codes such as 201, 301, 302, etc rely on the HTTP Location header. The current standard of HTTP specifies that this URL must be absolute. However, all popular browsers will accept a relative URL, and it is correct according to the upcoming revision of HTTP/1.1. See also [1]. I noticed

Help needed with config

2013-11-04 Thread Ian Hobson
Hi, I'm baffled. What I want to do is to serve static and php files from one root if they exist there, and from another if they don't, and give a 404 error if the file is in neither location. I have the following config file. server { server_name reseller.anake.hcs; listen 80; f

Re: Define a proxy for Nginx

2013-11-04 Thread odesport
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 Posted at Nginx Forum: http://forum.nginx.org/read.php?2,244407,244410#msg-244410 ___ nginx mailing list

Re: Define a proxy for Nginx

2013-11-04 Thread Jonathan Matthews
On 4 November 2013 13:00, odesport wrote: > Hello, > > My Nginx servers are behind a proxy. Some PHP apps need to reach external > web sites (for RSS feeds for example). I've tried this in nginx.conf : > > env http_proxy=http://myproxy:port > > but there is no effect. > > How can I define a proxy

Define a proxy for Nginx

2013-11-04 Thread odesport
Hello, My Nginx servers are behind a proxy. Some PHP apps need to reach external web sites (for RSS feeds for example). I've tried this in nginx.conf : env http_proxy=http://myproxy:port but there is no effect. How can I define a proxy for nginx ? Posted at Nginx Forum: http://forum.nginx.or

Re: nginx http proxy support for backend server health checks / status monitoring url

2013-11-04 Thread Pasi Kärkkäinen
On Fri, Nov 01, 2013 at 01:58:52PM +0800, Weibin Yao wrote: > HPPS health check is difficult for the check module, I have added an > alternative feature for this request. The 'port' option can be > specifed with different port from the server's original port. For > example: > > server { > serv