Re: [thredds] Thredds behind Nginx reverse proxy server

  • To: Thomas Cook <tmcook@xxxxxxxx>, Sean Arms <sarms@xxxxxxxx>
  • Subject: Re: [thredds] Thredds behind Nginx reverse proxy server
  • From: "Vu , Long" <vu.long@xxxxxxxxxx>
  • Date: Thu, 19 Sep 2019 21:12:47 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ouranos.ca; dmarc=pass action=none header.from=ouranos.ca; dkim=pass header.d=ouranos.ca; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZngGxNfKF078NUqcQwpJVFwcAkF8EyYXGZVocNYIxCE=; b=mxo+CttIbU2FG9zlowdFjfwWwoNBQEpixVpdnArRp7/uCUEpAJkApRk7Jq0Jks4+IfMvAdd+EFONUeTfRsz/XVB8Vgt7Sk/c0qeoIg/G3oHv3EKxyGufRBG13lvrCe6VTKYWPK/aL6jS6SY7ExNb73QTisfxmxqhj35dTTDNkQ7LDRwy/lbDfvYcs9jpD9IC2mLLkM4CfHaTLW5MD59/nsbTNH7EfKxp1dJAMUrJgxVXJ2kTPZPGlajrfJxjJNeKy3PXBtNqtiV2AJJ0z+J+b1z5wjWvwo7YakngoeHxPKiygIa2/ZAdjqtJmKV/6eK93pggnhveUON1V3UqtY85Cw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fG/LD7IUizAIIb/tZg9b8WS+k6rwOTeUl1UTCMG2L8n90+1NYHiS7RGHafG2JxkAg7I/pQTv/nETbnSXKPhzZD/8UUaRRLYTeXP7smXgzYsaZj5pRCGoaChkg/rkrgb2UUFJYC2ScdARV4eR/CZPb2smO3cXjx9Xnux804N9+dlP6Cx7uRk94N+laEojd1Bq+6cXzscLIZ6FO4666XRzcXLaBd7aNPsGJO2WVj4jqVN4T42KLjJlHW5O5LwUCRpAxYVFePCh0udmg8SKUXcFP2d4/vMRaY0he5DB/vN09cODZP10Xx4XbdTvR28pC3Ky7ucg7FomX793BYYdXkrEwQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vu.long@xxxxxxxxxx;
I filled a bug for Thredds because http headers from Nginx are being 
ignored: https://github.com/Unidata/thredds/issues/1310

There is a work-around for keeping the original httpS proto in there for 
those interested.

I still do not have a work-around for the wrong client IP being logged 
because X-Forwarded-For http header is being ignored by Thredds.

Long


-------- Original Message --------
From: Thomas Cook <tmcook@xxxxxxxx>
Subject: [thredds] Thredds behind Nginx reverse proxy server
Date: Tuesday, September 17, 2019, 17:38
To: Sean Arms <sarms@xxxxxxxx>
Cc: Vu , Long <vu.long@xxxxxxxxxx>, support-thredds@xxxxxxxxxxxxxxxx 
<support-thredds@xxxxxxxxxxxxxxxx>, thredds@xxxxxxxxxxxxxxxx 
<thredds@xxxxxxxxxxxxxxxx>

I'm trying this again, since the unidata email address bounced back.

On Tue, Sep 17, 2019 at 10:42 AM Thomas Cook <tmcook@xxxxxxxx
<mailto:tmcook@xxxxxxxx>> wrote:

     I'm running thredds with nginx using docker.
     Check out Rich Signell's Thredds/Docker repo here:
     https://github.com/rsignell-usgs/docker-nginx-thredds-pycsw Copying
     his setups has helped me (and probably many others) look like a
     smart programmer. Even if you are not using docker, his nginx config
     files should work for you.
     Tom

     On Mon, Sep 16, 2019 at 5:18 PM Sean Arms <sarms@xxxxxxxx
     <mailto:sarms@xxxxxxxx>> wrote:

         Greetings!

         We don't run nginx here at Unidata, so I'm not certain about the
         details, but perhaps this will be of help?

         https://github.com/USGS-CMG/usgs-cmg-portal/issues/223

         Not sure if the above needs augmented with the following to work
         with the godiva2 client shipped with ncWMS:

         https://github.com/Unidata/thredds/issues/982

         If you do get something working and would like to contribute
         some documentation, I'm sure it'd be greatly appreciated by many!

         Cheers,

         Sean


         On Mon, Sep 16, 2019 at 6:09 PM Vu , Long <vu.long@xxxxxxxxxx
         <mailto:vu.long@xxxxxxxxxx>> wrote:

             Hi,

             I've found the page about Running The TDS Behind a Proxy Server
 
(https://www.unidata.ucar.edu/software/tds/current/reference/TomcatBehindProxyServer.html).

             It shows configurations for when Thredds is behind Apache
             reverse proxy
             server.

             There are no configurations for when Thredds is behind Nginx
             reverse
             proxy server.

             I've tried

                    location /thredds/ {
                      proxy_pass http://internal_host/thredds/;
                      proxy_set_header Host $host;
                      proxy_set_header X-Real-IP $remote_addr;
                      proxy_set_header X-Forwarded-For
             $proxy_add_x_forwarded_for;
                      proxy_set_header X-Forwarded-Proto $scheme;
                    }

             What else I have to set in my Nginx config?

             Thanks,
             Long
             _______________________________________________
             NOTE: All exchanges posted to Unidata maintained email 
lists are
             recorded in the Unidata inquiry tracking system and made
             publicly
             available through the web.  Users who post to any of the
             lists we
             maintain are reminded to remove any personal information
             that they
             do not want to be made public.


             thredds mailing list
             thredds@xxxxxxxxxxxxxxxx <mailto:thredds@xxxxxxxxxxxxxxxx>
             For list information or to unsubscribe,  visit:
             https://www.unidata.ucar.edu/mailing_lists/

         _______________________________________________
         NOTE: All exchanges posted to Unidata maintained email lists are
         recorded in the Unidata inquiry tracking system and made publicly
         available through the web.  Users who post to any of the lists we
         maintain are reminded to remove any personal information that they
         do not want to be made public.


         thredds mailing list
         thredds@xxxxxxxxxxxxxxxx <mailto:thredds@xxxxxxxxxxxxxxxx>
         For list information or to unsubscribe,  visit:
         https://www.unidata.ucar.edu/mailing_lists/


  • 2019 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: