1. The problem I’m having:
I am wondering if I am allowed to specify double wildcard for caddy server context. I want to match any subdomain of any domain. I know I can do *.domain.tld, but I want to match any subdomain of any tld. I don’t have an easy way to test if this is allowed as this is in production and I want to make sure this will work
caddy: "http://*.*"
I also want to know if it is possible to match on url parts instead of domain name. For example below matches for domains phppointofsale.com and phppos.com, but I just watch the match on the path portion of url. Below is what I have now.
caddy: "http://*.phppointofsale.com/index.php/ecommerce/cron, http://*.phppos.com/index.php/ecommerce/cron, http://*.phppointofsale.com/index.php/ecommerce/manual_sync, http://*.phppos.com/index.php/ecommerce/manual_sync, http://*.phppointofsale.com/index.php/cron/*, http://*.phppos.com/index.php/cron/*, http://*.phppointofsale.com/PHP-Point-Of-Sale-Prev/index.php/ecommerce/cron, http://*.phppos.com/PHP-Point-Of-Sale-Prev/index.php/ecommerce/cron, http://*.phppointofsale.com/PHP-Point-Of-Sale-Prev/index.php/ecommerce/manual_sync, http://*.phppos.com/PHP-Point-Of-Sale-Prev/index.php/ecommerce/manual_sync, http://*.phppointofsale.com/PHP-Point-Of-Sale-Prev/index.php/cron/*, http://*.phppos.com/PHP-Point-Of-Sale-Prev/index.php/cron/*"
2. Error messages and/or full log output:
3. Caddy version:
v2.6.4 h1:2hwYqiRwk1tf3VruhMpLcYTg+11fCdr8S3jhNAdnPy8=
4. How I installed and ran Caddy:
docker caddy proxy (GitHub - lucaslorentz/caddy-docker-proxy: Caddy as a reverse proxy for Docker )
a. System environment:
ubuntu using docker
b. Command:
c. Service/unit/compose file:
production_php_point_of_sale_app:
logging:
driver: "local"
deploy:
mode: global
restart_policy:
condition: any
placement:
constraints: [node.labels.phppos_app == true]
labels:
caddy: "http://*.*"
caddy.reverse_proxy.trusted_proxies: "private_ranges"
caddy.reverse_proxy: "{{upstreams}}"
image: phppointofsale/production-app
build:
context: "production_php_point_of_sale_app"
restart: always
env_file:
- production_php_point_of_sale_app/.env
- .env
networks:
- app_network
- mail
d. My complete Caddy config:
This does not apply as this is a configuration question