Skip to content

Commit f0cdec4

Browse files
authored
Describe how to set up preview/production domains (#510)
1 parent 6143c61 commit f0cdec4

File tree

2 files changed

+48
-9
lines changed

2 files changed

+48
-9
lines changed

docs/dedicated/akamai/cdn.md

+48-9
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,32 @@ the
1414
[Akamai docs](https://techdocs.akamai.com/property-mgr/docs/know-your-around)
1515
for more details.
1616

17+
### Domains
18+
19+
Before you configure the CDN for your API Gateway and Developer Portal, you will
20+
to decide how you would like your domains to be setup. Generally, you will
21+
provision two types of domains - a static domain for production and wildcard
22+
domains for preview environments.
23+
24+
For preview environments, you will use wildcard domains so that each environment
25+
(i.e. each Git branch) will have its own subdomain. For example, you might use
26+
`*.api.example.com` for the API gateway and `*.dev.example.com` for the
27+
developer portal. This will allow you to have URLs for each environment like
28+
`https://my-environment-123.api.example.com` and
29+
`https://my-environment-123.dev.example.com`.
30+
31+
For production, you will want to use friendly domains like `api.example.com` and
32+
`developers.example.com`. Some customers also choose to host environments like
33+
staging on custom domains as well. This is up to you, just let your Zuplo
34+
account manager know how you would like to set up your domains.
35+
36+
The setup for both configurations is the same, but the domain name and
37+
certificates will be different.
38+
1739
### Prerequisites
1840

1941
1. Provision the domains that you would like these CDNs to have and certificates
20-
for those domains. You will need a domain for the API gateway, as well as a
21-
domain for the dev portal.
42+
for those domains, according to the domain section.
2243
2. Request the Origin URLs for your API gateway and developer portal from your
2344
Zuplo account manager.
2445
3. Let your Zuplo account manager know what hostnames/domains you will be using
@@ -28,11 +49,19 @@ for more details.
2849

2950
This section guides you on how to configure your API Gateway CDN.
3051

31-
Add the API gateway domain you provisioned to the Property Hostname for the API
32-
Gateway CDN. See the Akamai docs on
52+
Add the API gateway domain(s) you provisioned to the Property Hostname for the
53+
API Gateway CDN. See the Akamai docs on
3354
[configuring HTTPS hostnames](https://techdocs.akamai.com/property-mgr/docs/serve-content-over-https).
3455

35-
Make the following behavior changes:
56+
An example of how you might configure your API Gateway CDN domains for your
57+
preview environment and your production environment is below.
58+
59+
![configure_multiple_hostnames](../../../public/media/managed-dedicated-akamai/multiple_hostname_domains.png)
60+
61+
In this example, the preview environment domain is the wildcard domain
62+
"\*.zuplo.apidemo.org", and the production domain is "ftest.zuplo.apidemo.org".
63+
64+
After configuring the CDN domains, make the following behavior changes:
3665

3766
1. Configure the Origin URL to point to the URL given to you by Zuplo for your
3867
API gateway. Ensure that the Forward Host Header is configured to be the
@@ -50,16 +79,26 @@ Make the following behavior changes:
5079

5180
This section guides you on how to set up the Developer Portal CDN.
5281

53-
Add a property hostname with a wildcard to your Developer Portal CDN, similar to
54-
below:
82+
Add the Developer Portal gateway domain(s) you provisioned to the Property
83+
Hostname for the API Gateway CDN. See the Akamai docs on
84+
[configuring HTTPS hostnames](https://techdocs.akamai.com/property-mgr/docs/serve-content-over-https).
85+
This is done similarly to your API gateway CDN hostname configuration, but with
86+
the domains you provisioned for your Developer Portal.
87+
88+
An example of how you might configure your Developer Portal CDN domains for your
89+
preview environment and your production environment is below.
90+
91+
![configure_multiple_hostnames](../../../public/media/managed-dedicated-akamai/multiple_hostname_domains.png)
5592

56-
![wildcard_domain](../../../public/media/managed-dedicated-akamai/dev_portal_cdn_wildcard_hostname.png)
93+
In this example, the preview environment domain is the wildcard domain
94+
"\*.zuplo.apidemo.org", and the production domain is "ftest.zuplo.apidemo.org".
5795

5896
Under the Default Rule page, add the following behaviors:
5997

6098
1. Configure the origin URL to be the URL given to be the one given to you by
6199
Zuplo for your Developer Portal. This will look similarly to how you
62-
configured it for your API Gateway CDN.
100+
configured it for your API Gateway CDN. Take note that the Forward Host
101+
header should also be set as the Origin Hostname.
63102

64103
2. Modify Incoming Request Header behavior, with the following fields: Action:
65104
Add, Select Header Name: Other, Custom Header Name: X-Forwarded-Host, Header
Loading

0 commit comments

Comments
 (0)