Welcome! Log In Create A New Profile

Advanced

Re: NGINX only for forwarding to LAN

Francis Daly
December 11, 2019 03:22PM
On Wed, Dec 11, 2019 at 07:42:26AM -0500, pixel24 wrote:

Hi there,

> NGINX on the IPfire should now forward all requests directed to
> gw.mydomain.de to the server 192.168.xx.5 (and turück)
>
> and requests addressed to cloud.mydomain.com to LAN: 192.168.xx.6

Typed, rather than tested and copy-pasted, but the following looks like
it should work for the simple case:

server {
server_name gw.mydomain.com;
location / {
proxy_pass http://192.168.xx.5;
}
}
server {
server_name cloud.mydomain.com;
location / {
proxy_pass http://192.168.xx.6;
}
}

Depending on what the "upstream" (LAN) web servers do, you might need
some more directives there too.

If you can report a specific problem -- such as "when I do 'curl -i
http://gw.mydomain.com/dir', I get a 301 to http://192.168.xx.5/dir/
but I want a 301 to http://gw.mydomain.com/dir/", then someone may be
able to offer an improvement.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

NGINX only for forwarding to LAN

pixel24 December 11, 2019 07:42AM

Re: NGINX only for forwarding to LAN

Francis Daly December 11, 2019 03:22PM

Re: NGINX only for forwarding to LAN

pixel24 December 12, 2019 11:02AM

Re: NGINX only for forwarding to LAN

pixel24 December 12, 2019 11:22AM

Re: NGINX only for forwarding to LAN

Francis Daly December 12, 2019 11:38AM

Re: NGINX only for forwarding to LAN

pixel24 December 12, 2019 01:12PM

Re: NGINX only for forwarding to LAN

pixel24 December 13, 2019 02:39AM

Re: NGINX only for forwarding to LAN

Francis Daly December 13, 2019 08:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 315
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready