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

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
Atea
Posts: 3
Joined: Wednesday 28 August 2019 17:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

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

Post 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 ?
Last edited by Atea on Thursday 29 August 2019 17:43, edited 1 time in total.
User avatar
Antori91
Posts: 136
Joined: Sunday 12 February 2017 17:12
Target OS: NAS (Synology & others)
Domoticz version: 4.10717
Location: France
Contact:

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

Post by Antori91 »

Hello,
Did it work when using Raspbian Stretch? What is your nginx conf file?
Domoticz High Availability Cluster: Synology Dz V4.10693 (Main) - Raspberry Dz V4.10717 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation
Atea
Posts: 3
Joined: Wednesday 28 August 2019 17:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

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

Post 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!
Last edited by Atea on Thursday 29 August 2019 17:44, edited 1 time in total.
Atea
Posts: 3
Joined: Wednesday 28 August 2019 17:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

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

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest