You’re saying that it says “nginx” somewhere on the 401 page?
My working caddy-file looks like this:
my-ip-address.duckdns.org {
header / {
Strict-Transport-Security "max-age=31536000; includeSubdomains"
X-XSS-Protection "1; mode=block"
X-Content-Type-Options "nosniff"
X-Frame-Options "SAMEORIGIN"
Referrer-Policy "same-origin"
}
proxy / 127.0.0.1:8123 {
websocket
transparent
}
}
@r1kkie Then something else is going on. Caddy wouldn’t say “nginx” on it’s error page, so you’re not getting to Caddy through that path. Are you running Nginx somewhere? Are you sure your router isn’t intercepting 80 and 443 for itself? Are you sure your ISP doesn’t block 80 and 443?
hello
i have installed Caddy add-on on my hass.io
But why have errors and can’t work ??
LOG:
Using built-in Caddy: Caddy 0.11.1 (unofficial)
**Running Caddy: /usr/sbin/caddy -conf /share/caddy/Caddyfile **
Activating privacy features… done.
https://xxxxx.duckdns.org:8888
WARNING: File descriptor limit 1024 is too low for production servers. At least 8192 is recommended. Fix with ulimit -n 8192
.
Better go the new route: Home Assistant Add-on: Caddy 2
If your config is simple, no need to create the /share/caddy/Caddyfile
Thank you.I just use caddy 2 add-on in my HA,and it work nice.
But I don’t know how to use two websites to proxy.I use HA of configuration.
If I want to have two websites,i must use Caddyfile,right???
Hi @smallfus,
Correct, with two websites, you will need a Caddyfile. Luckily, creating one is very simple.
Just place the following content into a file called Caddyfile
and store it under share/caddy/
. Don’t forget to exchange your data accordingly.
{
email [email protected]
}
yourdomain1.com {
reverse_proxy localhost:8123
}
yourdomain2.com {
reverse_proxy localhost:8123
}
Note: The above example is a Caddy 2 caddyfile!
The file could be simplified even further, but one after the other. For further help regarding Caddy 2, please don’t hesitate to raise them in the according topic here
OK,thank you.
Another question,
yourdomain1.com {
Above syntax,can I set port for listening
Like that
yourdomain1.com:8888 {
Yes, that is possible:
OK.thanks too much.
This server can install on Ubuntu??
My HA work on DOCKER,can I use caddy2 to make HA https??
Hello, everyone. Due to a lack of time I’ve decided to archive this add-on. I suggest migrating to the Caddy 2 add-on… You can read more in the README.
Thank you to everyone who has helped me support this add-on over the past few years.