OpenWrt Forum Archive

Topic: [How-To] Set up nginx / realip passthrough from router to LAN servers

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Article has been moved here: http://wiki.findrbot.com/howtos

Kept posting for bugs tongue

(Last edited by mys5droid on 23 Apr 2017, 18:35)

Praise and comments to follow. big_smile

And bug reports / questions...

Hi,

thx but adding additional ports for other servers isn't required, when your clients are SNI capable, which most clients are. So instead of opening additional ports, a simple:

server {
 listen 3100;
 listen [::]:3100;
 listen 4100 ssl;
 listen [::]:4100 ssl;

 server_name foo.nsa.gov;
 ...
}

server {
 listen 3100;
 listen [::]:3100;
 listen 4100 ssl;
 listen [::]:4100 ssl;

 server_name bar.nsa.gov;
 ...

will pretty much work as well.

Yes that is one way to do it but its not the way I need or am describing. You are assuming that is the way I want to set up my servers, one per subdomain.

I do not, I want one http and one ssl port per server. And according to the number of people asking how to do things like this other people want this setup as well. Ive seen posts and comments from years ago and no one explains how to compile nginx or add real ip. - the purpose of the tutorials.

Maybe someone else can use your suggestion, however I cannot.

Thanks anyways!

Good day smile

(Last edited by mys5droid on 3 Mar 2017, 00:53)

The discussion might have continued from here.