Creating HTTP routes
To create an HTTP route, run the command cf create-route <space_name> <domain_name> [--hostname <host_name>] [--path <path_name>]. The route creation requires the input of which space we wish to assign the route to and also the routes' domain. Optional to this command are the hostname and pathname, which describes a constructed URL address of the format <hostname_name.domain_name>/<path_name>. As we delve further into routes, you'll learn what and how these are used.
Running the cf create-route command without the optional hostname and path will only work for private domains. Note that a private domain must be defined first before you can create a route to the private domain. We can create the private domain using the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access