1. The problem I’m having:
2. Error messages and/or full log output:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
3. Caddy version:
4. How I installed and ran Caddy:
a. System environment:
b. Command:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
c. Service/unit/compose file:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
d. My complete Caddy config:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
5. Links to relevant resources:
This week I learned about NGINX and CADDY and I liked the way Caddy sounds as far as HTTPS connection and what not. In any case I am having a lot of trouble trying to set this up.
I have caddy installed on my nas which I simply used these command that I found on caddy website
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
In any case this part worked smoothly. I then proceeded to edit the Caddyfiles and here is my Caddyfile
:80 {
# Set this path to your site's directory.
root * /usr/share/caddy
# Enable the static file server.
file_server
# Another common task is to set up a reverse proxy:
# reverse_proxy localhost:8080
# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}
xxx.duckdns.org {
reverse_proxy ip:port
}
once I ran this command I restarted caddy and I went to xxx.duckdns.org at least I think this is what I am suppose to do but nothing works.
Here is a bit more information as running a curl command as asked for on the website
curl localhost:2019/config/
{"apps":{"http":{"servers":{"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"ip:port"}]}]}]}],"match":[{"host":["xxx.duckdns.org"]}],"terminal":true}]},"srv1":{"listen":[":80"],"routes":[{"handle":[{"handler":"vars","root":"/usr/share/caddy"},{"handler":"file_server","hide":["/etc/caddy/Caddyfile"]}]}]}}}}}
My ip address is correct and the ports are well.
I setup my domain with goDaddy and put a CNAME with the
cname photos xxx.duckdns.org.
If anyone can help me please. These tutorial sometimes are hard to follow but I am doing my best trying to figure all this out.