ConceptsServices
Public URLs
A web service or a static site gets a public URL from its name, the default domain and the public port.
A web service or a static site gets a public URL. The default domain is the base domain until you connect a domain of your own.
Examples
| Server settings | URL of a service named api |
|---|---|
Defaults (--base-domain localhost, proxy on :8080) | http://api.localhost:8080 |
--base-domain apps.example.com --proxy-addr 0.0.0.0:80 | http://api.apps.example.com |
Same, with HTTPS (--https-addr and --acme-email) | https://api.apps.example.com |
The URL has no port when the port is 80 or when HTTPS is on.
More hostnames
Each domain of the server serves the service. If you connect example.com to the server, the service also answers at api.example.com.
A custom domain is for one service:
ferry domains add api api.example.orgThe proxy sends all these hostnames to the service. See Networking, domains & TLS.
Use the --domain flag, or the dashboard.
--public-port changes the port that Ferry shows in URLs. An example: a router forwards a different port to the proxy.
Browsers resolve *.localhost to your own machine.