You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Build + Runtime**: Use a frontend framework (Node.js, PHP, Python, etc.) to build your application, then serve it with Nginx
24
15
25
-
<GroupCardsid="build-sections"emoji="🚀"heading="Know more about build environments for your Runtime"items={languages} />
16
+
The build phase is completely optional. If you already have built files, skip the build section and configure only the [runtime](#runtime-configuration).
26
17
27
18
If you just need to deploy your static content, use the [manual deploy](/nginx/how-to/trigger-pipeline#manual-deploy-using-zerops-cli) via Zerops CLI.
19
+
:::
20
+
28
21
29
22
## Add zerops.yaml to your repository
30
23
@@ -35,8 +28,11 @@ zerops:
35
28
# define hostname of your service
36
29
- setup: app
37
30
# ==== how to build your application ====
31
+
# OPTIONAL. If you need to build your static files using a framework,
32
+
# configure the build environment here. If you already have built files,
33
+
# you can skip this entire section and deploy directly to the runtime.
38
34
build:
39
-
# REQUIRED. Set the base technology for the build environment:
35
+
# REQUIRED (if using build). Set the base technology for the build environment:
40
36
base: nodejs@latest
41
37
42
38
# OPTIONAL. Set the operating system for the build environment.
@@ -53,7 +49,7 @@ zerops:
53
49
- npm i
54
50
- npm run build
55
51
56
-
# REQUIRED. Select which files / folders to deploy after
52
+
# REQUIRED (if using build). Select which files / folders to deploy after
57
53
# the build has successfully finished
58
54
deployFiles:
59
55
- dist
@@ -137,7 +133,7 @@ zerops:
137
133
- setup: app
138
134
# ==== how to build your application ====
139
135
build:
140
-
# REQUIRED. Sets the base technology for the build environment:
136
+
# REQUIRED (if using build). Sets the base technology for the build environment:
141
137
base: nodejs@latest
142
138
...
143
139
@@ -165,7 +161,7 @@ zerops:
165
161
- setup: app
166
162
# ==== how to build your application ====
167
163
build:
168
-
# REQUIRED. Sets the base technology for the build environment:
164
+
# REQUIRED (if using build). Sets the base technology for the build environment:
169
165
base: nodejs@latest
170
166
...
171
167
@@ -227,24 +223,24 @@ Each port has following attributes:
<td className="w-fit">Defines the port number. You can set any port number between <em>10</em> and <em>65435</em>. Ports outside this interval are reserved for internal Zerops systems.</td>
239
-
</tr>
240
-
<tr>
241
-
<td className="w-fit">protocol</td>
242
-
<td className="w-fit"><strong>Optional.</strong> Defines the protocol. Allowed values are <code>TCP</code> or <code>UDP</code>. Default value is <code>TCP</code>.</td>
243
-
</tr>
244
-
<tr>
245
-
<td className="w-fit">httpSupport</td>
246
-
<td className="w-fit"><strong>Optional.</strong> <code>httpSupport = true</code> is the default setting for TCP protocol. Set <code>httpSupport = false</code> if a web server isn't running on the port. Zerops uses this information for the configuration of <a href="/features/access">public access</a>. <code>httpSupport = true</code> is available only in combination with the TCP protocol.</td>
247
-
</tr>
232
+
<tr>
233
+
<td className="w-fit">port</td>
234
+
<td className="w-fit">Defines the port number. You can set any port number between <em>10</em> and <em>65435</em>. Ports outside this interval are reserved for internal Zerops systems.</td>
235
+
</tr>
236
+
<tr>
237
+
<td className="w-fit">protocol</td>
238
+
<td className="w-fit"><strong>Optional.</strong> Defines the protocol. Allowed values are <code>TCP</code> or <code>UDP</code>. Default value is <code>TCP</code>.</td>
239
+
</tr>
240
+
<tr>
241
+
<td className="w-fit">httpSupport</td>
242
+
<td className="w-fit"><strong>Optional.</strong> <code>httpSupport = true</code> is the default setting for TCP protocol. Set <code>httpSupport = false</code> if a web server isn't running on the port. Zerops uses this information for the configuration of <a href="/features/access">public access</a>. <code>httpSupport = true</code> is available only in combination with the TCP protocol.</td>
243
+
</tr>
248
244
</tbody>
249
245
</table>
250
246
@@ -450,28 +446,28 @@ Following attributes are available:
<td>Defines the port of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
<td>Defines the URL path of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so it always uses the localhost <code>127.0.0.1</code>. If you need to add a <code>host</code> to the request header, specify it in the <code>host</code> attribute.</td>
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so no https is required.<br/>If your application requires a https request, set <code>scheme: https</code></td>
<td>Defines the port of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
<td>Defines the URL path of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so it always uses the localhost <code>127.0.0.1</code>. If you need to add a <code>host</code> to the request header, specify it in the <code>host</code> attribute.</td>
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so no https is required.<br/>If your application requires a https request, set <code>scheme: https</code></td>
470
+
</tr>
475
471
</tbody>
476
472
</table>
477
473
@@ -507,20 +503,20 @@ Following attributes are available:
The command has access to the same <a href="/nginx/how-to/create#set-secret-environment-variables">environment variables</a> as your Nginx application.<br/>
521
-
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below.
The command has access to the same <a href="/nginx/how-to/create#set-secret-environment-variables">environment variables</a> as your Nginx application.<br/>
517
+
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below.
518
+
</td>
519
+
</tr>
524
520
</tbody>
525
521
</table>
526
522
@@ -566,28 +562,28 @@ Following attributes are available:
<td>Defines the port of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
<td>Defines the URL path of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so it always uses the localhost <code>127.0.0.1</code>. If you need to add a <code>host</code> to the request header, specify it in the <code>host</code> attribute.</td>
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so no https is required.<br/>If your application requires a https request, set <code>scheme: https</code></td>
<td>Defines the port of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
<td>Defines the URL path of the HTTP GET request.<br/>The readiness check will trigger a GET request on <code>{'http://127.0.0.1:{port}/{path}'}</code></td>
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so it always uses the localhost <code>127.0.0.1</code>. If you need to add a <code>host</code> to the request header, specify it in the <code>host</code> attribute.</td>
<td><strong>Optional.</strong> The readiness check is triggered from inside of your runtime container so no https is required.<br/>If your application requires a https request, set <code>scheme: https</code></td>
586
+
</tr>
591
587
</tbody>
592
588
</table>
593
589
@@ -622,20 +618,20 @@ Following attributes are available:
The command has access to the same <a href="/nginx/how-to/create#set-secret-environment-variables">environment variables</a> as your Nginx application.<br/>
636
-
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below.
The command has access to the same <a href="/nginx/how-to/create#set-secret-environment-variables">environment variables</a> as your Nginx application.<br/>
632
+
A single string is required. If you need to run multiple commands create a shell script or, use a multiline format as in the example below.
633
+
</td>
634
+
</tr>
639
635
</tbody>
640
636
</table>
641
637
@@ -660,4 +656,4 @@ zerops:
660
656
mv /outside/user /home/user
661
657
```
662
658
663
-
Read more about how the [readiness check works](/nginx/how-to/deploy-process#readiness-checks) in Zerops.
659
+
Read more about how the [readiness check works](/nginx/how-to/deploy-process#readiness-checks) in Zerops.
Copy file name to clipboardExpand all lines: apps/docs/content/nginx/how-to/customize-web-server.mdx
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,8 +85,19 @@ zerops:
85
85
86
86
6. [Trigger](/nginx/how-to/trigger-pipeline) the build & deploy pipeline.
87
87
88
-
### Built-in Prerender.io Support
88
+
## SEO & Prerender Support
89
89
90
-
The default Nginx configuration includes automatic prerender.io support for SEO optimization. When `PRERENDER_TOKEN` is set, Nginx will automatically serve pre-rendered content to search engines and social media crawlers.
90
+
Single Page Applications and JavaScript-heavy sites render content client-side, which most crawlers can't process—they see an empty page instead of your content. This affects traditional search engines, social media platforms, and AI tools like ChatGPT, Perplexity, and Claude.
91
91
92
-
See [environment variables](/nginx/how-to/env-variables#prerenderio-support) for configuration details.
92
+
### Built-in Prerender.io Integration
93
+
94
+
The default Nginx configuration includes automatic [Prerender.io](https://prerender.io) support. When enabled, it detects crawler requests (including AI crawlers) and serves them pre-rendered HTML while your users get the full interactive experience.
95
+
96
+
### Setup
97
+
98
+
To enable prerender support:
99
+
100
+
1. Set the `PRERENDER_TOKEN` environment variable with your Prerender.io token (see [environment variables](/nginx/how-to/env-variables#prerenderio-support))
101
+
2. Optionally set `PRERENDER_HOST` if using a custom prerender server
102
+
103
+
The Nginx configuration will automatically handle the rest—no additional configuration needed.
0 commit comments