* Suggestion for improvement of examples/nginx.conf
@ 2012-02-28 18:34 Eike Herzbach
2012-02-28 21:01 ` Eric Wong
0 siblings, 1 reply; 3+ messages in thread
From: Eike Herzbach @ 2012-02-28 18:34 UTC (permalink / raw)
To: mongrel-unicorn
Hi,
what do you think about that:
diff --git a/examples/nginx.conf b/examples/nginx.conf
index cc1038a..5ef43f3 100644
--- a/examples/nginx.conf
+++ b/examples/nginx.conf
@@ -55,7 +55,7 @@ http {
# faster or not than doing compression via nginx. It's easier
# to configure it all in one place here for static files and also
# to disable gzip for clients who don't get gzip/deflate right.
- # There are other other gzip settings that may be needed used to deal with
+ # There are other gzip settings that may be needed used to deal with
# bad clients out there, see http://wiki.nginx.org/NginxHttpGzipModule
gzip on;
gzip_http_version 1.0;
@@ -120,9 +120,9 @@ http {
# http://en.wikipedia.org/wiki/X-Forwarded-For
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- # enable this if and only if you use HTTPS, this helps Rack
+ # enable this if you use HTTPS, this helps Rack
# set the proper protocol for doing redirects:
- # proxy_set_header X-Forwarded-Proto https;
+ # proxy_set_header X-Forwarded-Proto $scheme;
# pass the Host: header from the client right along so redirects
# can be set properly within the Rack application
I haven't found an easy way to only set the header if the scheme is
https, but I don't see any problems in sending the header for all
requests either.
Regards,
Eike
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Suggestion for improvement of examples/nginx.conf
2012-02-28 18:34 Suggestion for improvement of examples/nginx.conf Eike Herzbach
@ 2012-02-28 21:01 ` Eric Wong
2012-03-20 19:59 ` Eric Wong
0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2012-02-28 21:01 UTC (permalink / raw)
To: unicorn list
Eike Herzbach <eike@herzbach.net> wrote:
> Hi,
>
> what do you think about that:
>
> diff --git a/examples/nginx.conf b/examples/nginx.conf
> index cc1038a..5ef43f3 100644
> --- a/examples/nginx.conf
> +++ b/examples/nginx.conf
> @@ -55,7 +55,7 @@ http {
> # faster or not than doing compression via nginx. It's easier
> # to configure it all in one place here for static files and also
> # to disable gzip for clients who don't get gzip/deflate right.
> - # There are other other gzip settings that may be needed used to deal with
> + # There are other gzip settings that may be needed used to deal with
Obviously correct, will apply. Thanks.
> - # enable this if and only if you use HTTPS, this helps Rack
> + # enable this if you use HTTPS, this helps Rack
> # set the proper protocol for doing redirects:
> - # proxy_set_header X-Forwarded-Proto https;
> + # proxy_set_header X-Forwarded-Proto $scheme;
>
> # pass the Host: header from the client right along so redirects
> # can be set properly within the Rack application
>
> I haven't found an easy way to only set the header if the scheme is
> https, but I don't see any problems in sending the header for all
> requests either.
Setting it for all requests uses an extra hash slot and leads to extra
method dispatches in Rack (and possibly code elsewhere). I suppose
it doesn't matter for most setups, though.
How about this?
--- a/examples/nginx.conf
+++ b/examples/nginx.conf
@@ -120,9 +120,9 @@ http {
# http://en.wikipedia.org/wiki/X-Forwarded-For
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- # enable this if and only if you use HTTPS, this helps Rack
- # set the proper protocol for doing redirects:
- # proxy_set_header X-Forwarded-Proto https;
+ # enable this if you forward HTTPS traffic to unicorn,
+ # this helps Rack set the proper URL scheme for doing redirects:
+ # proxy_set_header X-Forwarded-Proto $scheme;
# pass the Host: header from the client right along so redirects
# can be set properly within the Rack application
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Suggestion for improvement of examples/nginx.conf
2012-02-28 21:01 ` Eric Wong
@ 2012-03-20 19:59 ` Eric Wong
0 siblings, 0 replies; 3+ messages in thread
From: Eric Wong @ 2012-03-20 19:59 UTC (permalink / raw)
To: unicorn list
Eric Wong <normalperson@yhbt.net> wrote:
> Eike Herzbach <eike@herzbach.net> wrote:
> > Hi,
> >
> > what do you think about that:
> >
> > diff --git a/examples/nginx.conf b/examples/nginx.conf
> > index cc1038a..5ef43f3 100644
> > --- a/examples/nginx.conf
> > +++ b/examples/nginx.conf
> > @@ -55,7 +55,7 @@ http {
> > # faster or not than doing compression via nginx. It's easier
> > # to configure it all in one place here for static files and also
> > # to disable gzip for clients who don't get gzip/deflate right.
> > - # There are other other gzip settings that may be needed used to deal with
> > + # There are other gzip settings that may be needed used to deal with
>
> Obviously correct, will apply. Thanks.
Pushed:
http://bogomips.org/unicorn.git/patch/?id=0daedd92d3e896a9fcd301bbb58e85bb54a939ee
> > - # enable this if and only if you use HTTPS, this helps Rack
> > + # enable this if you use HTTPS, this helps Rack
> > # set the proper protocol for doing redirects:
> > - # proxy_set_header X-Forwarded-Proto https;
> > + # proxy_set_header X-Forwarded-Proto $scheme;
> >
> > # pass the Host: header from the client right along so redirects
> > # can be set properly within the Rack application
> >
> > I haven't found an easy way to only set the header if the scheme is
> > https, but I don't see any problems in sending the header for all
> > requests either.
>
> Setting it for all requests uses an extra hash slot and leads to extra
> method dispatches in Rack (and possibly code elsewhere). I suppose
> it doesn't matter for most setups, though.
>
> How about this?
>
> --- a/examples/nginx.conf
> +++ b/examples/nginx.conf
> @@ -120,9 +120,9 @@ http {
> # http://en.wikipedia.org/wiki/X-Forwarded-For
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>
> - # enable this if and only if you use HTTPS, this helps Rack
> - # set the proper protocol for doing redirects:
> - # proxy_set_header X-Forwarded-Proto https;
> + # enable this if you forward HTTPS traffic to unicorn,
> + # this helps Rack set the proper URL scheme for doing redirects:
> + # proxy_set_header X-Forwarded-Proto $scheme;
>
> # pass the Host: header from the client right along so redirects
> # can be set properly within the Rack application
Also pushed this:
http://bogomips.org/unicorn.git/patch/?id=9fc5c24920726d3c10bc9f39d8e97686b93cbbe0
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-20 20:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-28 18:34 Suggestion for improvement of examples/nginx.conf Eike Herzbach
2012-02-28 21:01 ` Eric Wong
2012-03-20 19:59 ` Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).