Re: Full and relative URL.

2011-08-07 Thread Eric Lemoine
On Mon, Aug 8, 2011 at 7:15 AM, Chris McDonough wrote: > On Mon, 2011-08-08 at 07:04 +0200, Eric Lemoine wrote: >> On Mon, Aug 8, 2011 at 6:49 AM, Chris McDonough wrote: >> > On Mon, 2011-08-08 at 06:38 +0200, Eric Lemoine wrote: >> >> >> Right. I'd rather apply this: "don't generate fully-qualif

Re: Full and relative URL.

2011-08-07 Thread Chris McDonough
On Mon, 2011-08-08 at 07:04 +0200, Eric Lemoine wrote: > On Mon, Aug 8, 2011 at 6:49 AM, Chris McDonough wrote: > > On Mon, 2011-08-08 at 06:38 +0200, Eric Lemoine wrote: > >> >> Right. I'd rather apply this: "don't generate fully-qualified URLs in > >> >> your web apps, or you may have trouble ru

Re: Full and relative URL.

2011-08-07 Thread Eric Lemoine
On Mon, Aug 8, 2011 at 6:49 AM, Chris McDonough wrote: > On Mon, 2011-08-08 at 06:38 +0200, Eric Lemoine wrote: >> >> Right. I'd rather apply this: "don't generate fully-qualified URLs in >> >> your web apps, or you may have trouble running them behind proxies". >> > >> > You're eventually going t

Re: Full and relative URL.

2011-08-07 Thread Chris McDonough
On Mon, 2011-08-08 at 06:38 +0200, Eric Lemoine wrote: > >> Right. I'd rather apply this: "don't generate fully-qualified URLs in > >> your web apps, or you may have trouble running them behind proxies". > > > > You're eventually going to run into situations with middleware that > > unconditionally

Re: Full and relative URL.

2011-08-07 Thread Eric Lemoine
>> Right. I'd rather apply this: "don't generate fully-qualified URLs in >> your web apps, or you may have trouble running them behind proxies". > > You're eventually going to run into situations with middleware that > unconditionally generates fully qualified URLs where I believe you're > going to

Re: Full and relative URL.

2011-08-07 Thread Chris McDonough
On Sun, 2011-08-07 at 14:35 +0200, Eric Lemoine wrote: > > > > ServerName www.example.com > > RewriteEngine On > > RewriteRule ^/(.*) http://appserver:6543/$1 [L,P] > > ProxyPreserveHost on > > > > > > The above configuration will pass the request off to > > http://appse

Re: Full and relative URL.

2011-08-07 Thread Eric Lemoine
On Sunday, August 7, 2011, Chris McDonough wrote: > On Sun, 2011-08-07 at 09:49 +0200, Eric Lemoine wrote: > >> > There's no reason for the Host header to *not* be passed >> > to the backend server, especially if one of the main purposes in life of >> > the Apache server is to be a frontend for th

Re: Full and relative URL.

2011-08-07 Thread Chris McDonough
On Sun, 2011-08-07 at 09:49 +0200, Eric Lemoine wrote: > > There's no reason for the Host header to *not* be passed > > to the backend server, especially if one of the main purposes in life of > > the Apache server is to be a frontend for the application being proxied > > to. Having it Off is a p

Re: Full and relative URL.

2011-08-07 Thread Wichert Akkerman
On 08/07/2011 09:49 AM, Eric Lemoine wrote: How about this case: The backend server has two virtual hosts, one serving "app1" and the other one serving "app2". The proxy server makes "app1 and "app2" available at http://proxy.com/app1 and http://proxy.com/app2, respectively. In that case you can

Re: Full and relative URL.

2011-08-07 Thread Eric Lemoine
On Sun, Aug 7, 2011 at 1:15 AM, Chris McDonough wrote: > On Sat, 2011-08-06 at 22:56 +0200, Eric Lemoine wrote: >> > >> > In what configuration would it be sane to have any proxy set the >> Host >> > header to anything except what the client user agent says the Host >> > header is? >> >> Here's wh

Re: Full and relative URL.

2011-08-06 Thread Chris McDonough
On Sat, 2011-08-06 at 22:56 +0200, Eric Lemoine wrote: > > > > In what configuration would it be sane to have any proxy set the > Host > > header to anything except what the client user agent says the Host > > header is? > > Here's what the Apache doc says about the ProxyPreserveHost directive: >

Re: Full and relative URL.

2011-08-04 Thread Chris McDonough
On Thu, 2011-08-04 at 17:40 +0200, Eric Lemoine wrote: > >> Shouldn't Pyramid be able to generate paths, as opposed to URLs, for > >> static resources? Fowarding the Host header doesn't sound like a good > >> solution, as you'll run into issues if you have (Apache) virtual hosts > >> on the backend

Re: Full and relative URL.

2011-08-04 Thread Eric Lemoine
On Thu, Aug 4, 2011 at 11:25 AM, Chris McDonough wrote: > On Thu, 2011-08-04 at 10:45 +0200, Eric Lemoine wrote: >> On Mon, Jan 24, 2011 at 6:22 AM, Chris McDonough wrote: >> > Have nginx pass through the Host header to Pyramid.  The right URLs will >> > be generated. >> >> Chris, >> >> Shouldn't

Re: Full and relative URL.

2011-08-04 Thread Chris McDonough
On Thu, 2011-08-04 at 10:45 +0200, Eric Lemoine wrote: > On Mon, Jan 24, 2011 at 6:22 AM, Chris McDonough wrote: > > Have nginx pass through the Host header to Pyramid. The right URLs will > > be generated. > > Chris, > > Shouldn't Pyramid be able to generate paths, as opposed to URLs, for > st

Re: Full and relative URL.

2011-08-04 Thread Eric Lemoine
On Mon, Jan 24, 2011 at 6:22 AM, Chris McDonough wrote: > Have nginx pass through the Host header to Pyramid.  The right URLs will > be generated. Chris, Shouldn't Pyramid be able to generate paths, as opposed to URLs, for static resources? Fowarding the Host header doesn't sound like a good sol

Re: Full and relative URL.

2011-01-24 Thread Ginés Martínez
Great! works! Thanks Gins 2011/1/24 Kyle Terry > proxy_set_header Host $host; > > That should do the trick. > > Kyle Terry | www.kyleterry.com > > > > On Sun, Jan 23, 2011 at 9:22 PM, Chris McDonough wrote: > >> Have nginx pass through the Host header to Pyramid. The right URLs w

Re: Full and relative URL.

2011-01-23 Thread Kyle Terry
proxy_set_header Host $host; That should do the trick. Kyle Terry | www.kyleterry.com On Sun, Jan 23, 2011 at 9:22 PM, Chris McDonough wrote: > Have nginx pass through the Host header to Pyramid. The right URLs will > be generated. > > - C > > On Sun, 2011-01-23 at 15:35 -0800,

Re: Full and relative URL.

2011-01-23 Thread Chris McDonough
Have nginx pass through the Host header to Pyramid. The right URLs will be generated. - C On Sun, 2011-01-23 at 15:35 -0800, gins...@gmail.com wrote: > Hi! > static_url() generates a fully qualified URL for a static asset. But > for applications behind of nginx acting as reverse proxy, I need a