Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Reverse proxy of Elog using Docker and Nginx?, posted by Andrew Wade on Mon Aug 13 21:09:30 2018 
    icon2.gif   Re: Reverse proxy of Elog using Docker and Nginx?, posted by Stefan Ritt on Tue Aug 14 06:04:53 2018 
       icon2.gif   Re: Reverse proxy of Elog using Docker and Nginx?, posted by Andrew Wade on Fri Aug 17 22:07:41 2018 
          icon2.gif   Re: Reverse proxy of Elog using Docker and Nginx?, posted by Stefan Ritt on Mon Aug 20 12:42:24 2018 
             icon2.gif   Re: Reverse proxy of Elog using Docker and Nginx?, posted by Andrew Wade on Tue Aug 28 23:38:55 2018 
                icon2.gif   Re: Reverse proxy of Elog using Docker and Nginx?, posted by Bolko Beutner on Wed Sep 15 13:52:59 2021 
Message ID: 68836     Entry time: Mon Aug 20 12:42:24 2018     In reply to: 68835     Reply to this: 68838
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Question  OS: Linux | Other  ELOG Version: 3.1.2 
Subject: Re: Reverse proxy of Elog using Docker and Nginx? 

Actually this forum works through an Apache reverse proxy with authentication and it works, so I suspect that the problem has to do with jwilder/nginx-proxy. Since we don't have this here, all I can propose is that you do debugging yourself. Run elogd with the -v flag so that you see all requests coming from the user through the proxy. Compare the requests through Apache and Nginx to see if any argumets are stripped or mangled. Upon successful login, elog sets a cookie with a unique session-ID (the cookie name is "sid") to the browser. If you proxy strips that cookie, you would land on the login page. Maybe look in that direction.

Stefan

Andrew Wade wrote:

Yes, I tried setting the URL parameter to the url used by the proxy.  It goes to the correct address but that landing is the login page.

Andrew

Stefan Ritt wrote:

Have you tried the "URL = ..." statement? This determines you elog redirects if you log in. If you reach elog through a proxy, the URL is a different one that if you access it directly. In your case the proxy URL might be necessary.

Stefan

Andrew Wade wrote:

I've been trying to configured a Synology NAS to run my personal elog with a reverse proxy to the outside world.  The best way seems to be running Elog in a Docker instance and then running a separate connected Docker running a nginx-proxy (in this case jwilder/nginx-proxy). This second container manages the certificates to letsencrypt and mapping URL requests to relevant containers so that connection is secured properly.  

It worked great in the initial test. However, I have an issue with authentication.  When I password protect the elog it goes to a login page.  When I give an correct password it loops back to the login page (incidentally when I give an incorrect password it gives an 'Invalid user name or password!' warning).  So I know that its getting the correct password but there is some issue that is resetting or ignoring the authentication.  I am never able to actually get to the protected content. 

Does anyone have any experience in using Nginx to setup a secure reverse proxy? Any insights into why this would mess with the authentication of elog?

 

Side note: I have tried using Apache to do the same and authentication worked fine.  But the pre-canned jwilder/nginx-proxy docker manages all the certificates automatically and seamlessly and allows me to have multiple services running on the same outward facing port on my router.  There is no equivalent (as far as I know) that uses Apache for proxying with letsencrypt​.

 

 

 

ELOG V3.1.5-3fb85fa6