Use of basicauth

1. Caddy version (caddy version):

v2.4.6 h1:HGkGICFGvyrodcqOOclHKfvJC0qTU7vny/7FhYp9hNw=

2. How I run Caddy:

I run Caddy on a server (Macmini) with Ubuntu together with a domotica websolution (Domoticz). I want to use caddy to reverse proxy to Domoticz on port 443. But with a basicauth option so that I have to login and only me can use this. I have a domain and did a port forward to port 443 on this server.

a. System environment:

Ubuntu 20.04.3 LTS

b. Command:

sudo systemctl restart caddy.service

Paste command here.

c. Service/unit/compose file:

Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.

d. My complete Caddyfile or JSON config:

******.nl {
basicauth {
****** JDJhJDE0JDYxTnlaWE5sZjJUTU1VS1VQcUE1b3VKZ1Y2Yy8ydVhMYllSVjJUb3ljOEhFSmY2dk5VMXRH
}
reverse_proxy 192.168.2.3:443
tls internal
}

(In this list the password is on a new line. In my Caddyfile it is on the same line. I validate the Caddyfile by caddy validate).

Paste config here, replacing this text.
Use `caddy fmt` to make it readable.
DO NOT REDACT anything except credentials.
LEAVE DOMAIN NAMES INTACT.
Make sure the backticks stay on their own lines.

3. The problem I’m having:

Problem: I do not get the basicauth login screen. The reverse proxy goes straight to the web application (Domoticz ) without giving a loginscreen.

4. Error messages and/or full log output:

5. What I already tried:

I have tried also to install the apache2-utils but this didn’t help.

6. Links to relevant resources:

Your post is very difficult to read. Please follow the instructions in the template, your config should be within a code block so that it preserves whitespace and formatting.

1 Like

Sorry about that. As a new member the template was not that clear. I also hoped for a good hint for a solution. In the mean time I solved the problem. I was mixing up the portnumbers so that reverse proxy went straight to the server.

1 Like

The template says

Paste config here, replacing this text.

But you didn’t paste it there, you pasted it above that. I think the instructions are pretty clear. What specifically were you confused about?

Great! :+1:

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.