ActivityPub and Nginx Proxy manager

Hi all,

Really struggling with Nginx proxy manager setup with ghosts ap.ghost.org’s server. I just can’t get it to work at all!

I’ve tried adding custom locations and advanced blocks to this but then I keep getting errors and my proxy going offline in npm…

I do wonder if part of my problem is that I have a www. in front of my domain (https://www.thephysiohub.uk) but that doesn’t explain why I can’t add the nginx blocks

Anyone going a working config or some instructions? I’ve trawled the forums but nginx proxy manager is a world to it’s own with custom configs I’m finding

The latest version of Ghost CLI should “just work” for creating this configuration. You might want to look at the template it’s using. Ghost-CLI/extensions/nginx/templates at main · TryGhost/Ghost-CLI · GitHub

nginx -t is a good way to test if you have a valid (if not necessarily useful) configuration.

1 Like

Sorry I should’ve made it clear - I’m using ghost docker and using nginx proxy manager which makes the config via a gui as a reverse proxy

Ah, sorry. Missed the ‘manager’ in there. :slight_smile: I got nothing!

I never heard Nginx Proxy Manager before but I quickly checked it. It seems like it doesn’t give you a chance to write your own nginx config, right? If it’s possible, please try to use the examples that @Cathy_Sarisky mentioned. Otherwise you may try to explain what you tried in Proxy Manager (with some screenshots) so we can understand how it works and maybe figure out the missing part.

Or, we’ll wait someone else who already uses Nginx Proxy Manager. :blush:

With Nginx Proxy Manager there shouldn’t be any difference to the normal nginx config that @Cathy_Sarisky linked to, you’ll just need to replicate the config in the UI instead. Here’s an example:

1 Like

there is problem with this static configuration
proxy_pass ``https://ap.ghost.org``;
nginx resolves it during its startup only.

As nice fix which I use with dns upstreams is to setup upstream as variable + resolver directive which force nginx to do dns resolution regularly e.g.

in my case

somewhere in server block or http or in location

resolver 1.1.1.1 8.8.8.8 valid=300s;
set $ghost_ap "https://ap.ghost.org";

and in locations

proxy_pass $ghost_ap;

I think I could propose it in PR in ghost cli repo to improve it just a little bit.