nginx configuration showing two pads, one hosted on a subdir and one on / #7161
jkbzh
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is a complement to the discussion I started about updating the nginx proxy setup in the wiki. You'll find here below an overall view of a configuration where you have a test pad hosted on the '/test' subdir and a production pad hosted on '/', both of them hosted on the server pad.example.org. I skipped some parts related to the specific server setup, such as ssl . All other nginx configuration parts related to etherpad fully. I tested this configuration.
Each pad is setup with two sections, one that handles socket.io/ for websocket requests and another one for all the other requests to the pad. Note that due to the way that nginx process location sections, the socket.io section must always precede the other section. For the same reason, the sections related to the pad hosted on '/' must be the last ones.
Finally, there's a specific setup for the HTTP Connection and Upgrade sections. Both of these headers are needed in HTTP/1.1 for a websocket upgrade (see mdn. Here I show a specific setup recommended by the nginx developers for websockets upgrade, where the HTTP Upgrade header is made dependent on the presence of the HTTP Connection: upgrade header and value, as required by the protocol.
Compared to what's in the wiki, there are two changes:
Beta Was this translation helpful? Give feedback.
All reactions