docs(config): simplify the simplified nginx example and update the advanced one

This commit is contained in:
Fabrice Mouhartem 2026-08-28 17:09:29 +02:00
parent e1e038da8d
commit e7173f5ec3
No known key found for this signature in database
2 changed files with 13 additions and 6 deletions

View File

@ -8,6 +8,17 @@
# installation (http server by the Nodejs process). If you are using CryptPad
# in production and require professional support please contact sales@cryptpad.fr
# CryptPad possesses several nodes that can answer websocket requests. The
# following allows nginx to load-balance between them.
# The different `server` corresponds to the location of the different front
# nodes specified in your CryptPad `config/infra.js` file. If you change this
# setting, dont forget to update the following list of servers
# The following works with config/infra.example.js:
upstream fronts {
server localhost:3010;
server localhost:3011;
}
server {
listen 80;
listen [::]:80;
@ -202,7 +213,7 @@ server {
# Websocket traffic still needs to be handled by the main process, which means it needs
# to be hosted on a different port. By default 3003 will be used, though this is configurable
# via config.websocketPort
proxy_pass http://localhost:3003;
proxy_pass http://fronts;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View File

@ -14,10 +14,6 @@
# nodes specified in your CryptPad `config/infra.js` file. If you change this
# setting, dont forget to update the following list of servers
# The following works with config/infra.example.js:
upstream fronts {
server localhost:3010;
server localhost:3011;
}
server {
listen 80;
@ -89,7 +85,7 @@ server {
}
location ^~ /cryptpad_websocket {
proxy_pass http://fronts;
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;