1. The problem I’m having:
Listen to every domain/ip on port 80, http
2. Caddy version:
v2.8.4
3. My complete Caddy config:
https://tomikjetu.me, https://www.tomikjetu.me {
reverse_proxy http://localhost:3000
route /api* {
reverse_proxy http://localhost:4000
}
}
https://widgetsgarden.com, https://www.widgetsgarden.com {
reverse_proxy http://localhost:3100
route /api* {
reverse_proxy http://localhost:4100
}
route /analytics* {
reverse_proxy http://localhost:4100
}
}
https://ftp.tomikjetu.me {
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Credentials true
Access-Control-Allow-Methods *
Access-Control-Allow-Headers *
defer
}
file_server browse {
}
root * /var/www/ftp
}
5. Links to relevant resources:
I have clients I want to host their websites on my server. I provide them with a guide how to add their dns records, but they can’t check it’s valid until I add the rule to my Caddyfile.
I’d like to add a fallback rule to port
:80 { respond "Hello form server" }
But this doesn’t seem to work as it’s automatically redirected to https.
I want it to work on any subdomains of tomikjetu, on the server ip and on any domains of my cients.
Example
Client links their dns to my server
They open their domain in the browser (http://whatever.com)
They see the response “Hello form server”
After they verified they’ve done it correctly I can later add a https rule.
Is this possible? Thank you!