GuidesLanguage guides
Static sites
A static site is files only. nginx serves them on port 80.
A request for /about gets about.html.
1 / 3
A static site is files only. Ferry can build it first. Then nginx (nginx:alpine) serves the files on port 80. Create it with --type static.
Plain HTML
index.html
about.html
404.html
ferry up site --type static --followWith no build step, Ferry serves the first of these:
- The publish directory (
--publish-dir), if you set one. - The root, when it has an
index.html. - The first of
dist,build,out,public,_siteandsitethat contains anindex.html.
A site with a build step is on the next page.
What nginx does with the files
try_files $uri $uri/ $uri.html:/aboutgetsabout.html, and/docs/getsdocs/index.html.- An unknown path gets
404.htmlfrom the publish directory, if it has one. - gzip for text, CSS, JavaScript, JSON, XML and SVG.
- nginx never serves dotfiles (
.git,.env,.npmrc…). The exception is/.well-known/.