Need SSL state to be visible behind a double nginx proxy

Rob Schultz lists at
Thu Oct 30 22:05:17 MSK 2008

   I am not sure if you can use the port in the server_name directive. I 
think you need to add listen directives.

Note i could be totally off on this but this is a very very simplistic 
view of what i was trying to accomplish

Basically demo'ing 3 different server configs with 2 being your 
"frontend" server's for doing SSL and then having 1 server listening on 
two ports and manually setting the protocal no the second when it is 
passed onto rails.


Nick Pearson wrote:
> Hi Rob,
> Thank you very much for the suggestions.  The first one isn't really an
> option due to the caching that the CMS does (not, that is, without some
> serious rework regarding how the cached files are written and deleted).
>  However, your second solution has a lot of promise.  I do have one 
> question
> on it, though.
> Because of the caching, each site that runs on my CMS has its own nginx
> config file, each with two server directives -- one for http and one for
> https.  Using your solution, this would remain the same, except that 
> instead
> of listening for port 443, the https server directive would listen on 
> some
> other port.  My initial tests show that I can use this for one server
> directive (the http one):
>     server_name:;
> and this for the other (the https one):
>     server_name:;
> I can't find any documentation or examples that say whether specifying a
> port with the host name in a server_name directive is valid.  I'll need 
> to
> do some more testing to be sure it works as I believe it does.  Do you 
> know
> if this usage of host:port is valid for server_name?  If so, then I 
> believe
> your second solution will solve my problem.  Thanks!
> Nick

Posted via

More information about the nginx mailing list