immers-space / guppe

Federated social groups with ActivityPub, NodeJS, Express, and Mongodb
https://a.gup.pe
GNU Affero General Public License v3.0
195 stars 15 forks source link

nginx config #45

Closed Tealk closed 2 years ago

Tealk commented 2 years ago

Hello,

how can you use gup.pe behind a nginx proxy? I thought I can just use a proxy_pass http://localhost:4431/; and it would work but then I end up with 502 Bad Gateway

wmurphyrd commented 2 years ago

Will need add a config option for Guppe to run behind proxy. It'll need to do 3 things:

  1. Set the Express 'trust proxy' mode
  2. Serve over http instead of https
  3. Don't try to start up the auto-certificate generator

An example of implementing this in another activitypub-express based project: https://github.com/immers-space/immers/pull/40/files

Tealk commented 2 years ago

thank you for the quick reply

means I have to apply all the changes indicated there?

wmurphyrd commented 2 years ago

These changes should be added here in the main guppe repo to open this feature to everyone. If you're game, I'd gladly accept a pull request with them. If not, I will find some time to do it

Tealk commented 2 years ago

I'll have a look but I'm not sure if I have the skills for it.

wmurphyrd commented 2 years ago

Proxy mode is available now, docs: https://github.com/wmurphyrd/guppe#optional-configuration