Add your first site
Have a terminal open next to this page: the steps are written to be typed along. Output printed on this page was produced by foundryp-media with the stock settings.
Requirements
- Editor access to a project
- Any laptop with a shell
- Some spare minutes
Steps
-
Add the site
foundryp-media site create site.example.net --origin 192.0.2.20adds the site on the edge. -
Try it before DNS
Before switching DNS, load the home page through the edge with
foundryp-media site check site.example.net. -
Switch DNS
Add a CNAME record from
siteto the name thatfoundryp-media site inforeports. -
Inspect the header
The second request should report
x-cache-status: HIT; the first one is often a miss.
sh
foundryp-media site create site.example.net --origin 192.0.2.20
foundryp-media site check site.example.net
foundryp-media site info site.example.net
curl -sI https://site.example.net/ | grep -i x-cache-status
Your server stays where it is, and the edge answers from cache whenever it can.
The x-cache-status header shows HIT or MISS on each response, the fastest way to see that caching works.