mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
docs(config): simplify the simplified nginx example and update the advanced one
This commit is contained in:
parent
e1e038da8d
commit
e7173f5ec3
@ -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, don’t 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;
|
||||
|
||||
@ -14,10 +14,6 @@
|
||||
# nodes specified in your CryptPad `config/infra.js` file. If you change this
|
||||
# setting, don’t 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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user