Behind nginx
Run Yard hosting behind nginx that holds ports 80 and 443.
Read Hosting behind another proxy first for the concepts.
When something fails, run yard hosting doctor: it is read-only and names
what to change.
Steps
- In the runner's Hosting settings choose TLS: Behind another proxy. The
runner listens on
127.0.0.1:8443. - Open the nginx tab of the generated config and copy it into a file in
nginx's
conf.d(orsites-enabled). It proxies*.apps.example.comandapps.example.comto the listen address and passesHoston. - Get a wildcard certificate with DNS-01 (
certbotwith your DNS provider's plugin) and pointssl_certificateat it. nginx -t && nginx -s reload, then Test route.
nginx on the host reaches 127.0.0.1:8443 directly, so no other address is
needed. If nginx runs in a container, the doctor names the network gateway to
use instead.