Page 1 of 1

[Solved] Domoticz with Nginx (Raspian Buster) - Unable to connect remotely (with Basic Auth & x509)

Posted: Wednesday 28 August 2019 17:53
by Atea
Hi,

I was running Domoticz (stable 4.10717) with Nginx on Raspbian Stretch, with no major problem.

I did a fresh install with Raspbian Buster, had no problem to restore my backup (except for a few mischievous Zwave devices), everything was great until I installed and configure Nginx and tried to connect remotely : I'm stuck on the Basic-Auth login prompt.

- I tried the password locally and was able to login.
- I stopped Nginx and allowed Domoticz to started on port 443, I was then able to log in with Basic Auth.
- With Domoticz behind Nginx, if I switch from "Basic-Auth" to "Login page", I can log in.

I guess I'm going to use the login page for a while, but I don't see why this doesn't work anymore...

Any idea ?

Re: Domoticz with Nginx (Raspian Buster) - Unable to connect remotely (with Basic Auth)

Posted: Thursday 29 August 2019 13:24
by Antori91
Hello,
Did it work when using Raspbian Stretch? What is your nginx conf file?

Re: Domoticz with Nginx (Raspian Buster) - Unable to connect remotely (with Basic Auth)

Posted: Thursday 29 August 2019 16:46
by Atea
Hello,

It was working fine with raspbian Stretch.

My nginx conf file for Domoticz is the one from the old wiki page "Secure Nginx Proxy Setup" (not on the wiki anymore)
http://web.archive.org/web/201707240932 ... roxy_Setup

You already helped me a lot, because when I looked at the archive, I realized I forgot to comment this two lines when I tried to disable x509 authentification to debug :

Code: Select all

                #proxy_set_header       Authorization $ssl_client_s_dn;
                #proxy_hide_header      Authorization;
When I comment these two lines, it seems to work. So the problem is probably with my nginx conf.

I'm not sure anybody uses this anymore (the wiki page disappeared in 2017), I may have to do without.

Thanks!

Re: Domoticz with Nginx (Raspian Buster) - Unable to connect remotely (with Basic Auth)

Posted: Thursday 29 August 2019 17:14
by Atea
I did a small modification and I think it works! If anybody has the same problem : $ssl_client_s_dn format changed, I had to use $ssl_client_s_dn_legacy instead.