NGINX proxypass

Discussion in 'Server Operation' started by Petter Neumann, Feb 12, 2018.

  1. Petter Neumann

    Petter Neumann New Member

    I'm trying to ask a question about nginx proxy pass, but are unable to publish the post due to restrictions of posting links, which I use as examples in my question like example dot com with prefix http or https After 2 posts, this should be possibel, so here is my 1st post
     
  2. Petter Neumann

    Petter Neumann New Member

    I'm trying to ask a question about nginx proxy pass, but are unable to publish the post due to restrictions of posting links, which I use as examples in my question like example dot com with prefix http or https After 2 posts, this should be possible, so here is my 2st post
     
  3. Petter Neumann

    Petter Neumann New Member

    I'm trying to ask a question about nginx proxy pass, but are unable to publish the post due to restrictions of posting links, which I use as examples in my question like example dot com with prefix http or https After 2 posts, this should be possible, hmm not working yet ?, so here is my 3st post
     
  4. Petter Neumann

    Petter Neumann New Member

    I have a webserver with nginx running behind my firewall, using an internal ip


    external ip->firewall nat-> internal local ip 192.168.50.10 The firewall is configured to forward port 80 and 443 to 192.168.50.10

    the server at 192.168.50.10 is hosting https://mydomain.com - all requests for http://www.mydomain.com - https://www.mydomain.com or http://mydomain.com is redirected to https://mydomain.com The server is running ubuntu 16.04 x64 and everything works perfect.


    Now I want to add a Raspberry pi running nextcloud connected to the same switch as the server and with ip address 192.168.50.11 and with host name nc.mydomain.com that must be accessible from outside using https://nc.mydomain.com Configuring the raspberry is no problem.

    Since all outside requests for port 80 and 443 will be forwarded to ip 192.168.50.10 (witch is running the main website using nginx), I will need to add a proxy pass to the nginx on this server so all requests for nc.mydomain is proxied to 192.168.50.11 so that the small raspberry is able to handle all requests done to https://nc.nmydomain.com and http://nc.mydomain.com I have tried to google this, but until now I have not found any good example of hot to do thus a proper way. Any help would be great.
     

Share This Page