Post by @stefano
@spook I was playing with @littlefedi_official, but I still have some difficulty getting it federated to major instances. But getting it running is very simple at least for testing. It's a single Go binary, and it can even generate its initial config template.
@chainq@mastodon.social @spook@pleroma.m68k.church @littlefedi_official@littleone.littlefedi.social Generally speaking, federation should be ok if the reverse proxy is configured correctly. The federation problems often appear because of reusing a domain previously used with another software (so key mismatch) or something wrong in the reverse proxy setup.
Are you using a single domain or split domain? (like social.example.com for littleFedi and example.com for the handles)
@stefano Thanks for trying to help.
I'm a beginner when it comes to self-hosting an instance. I never used another ActivityPub software on the given domain, so I doubt a key mismatch... But I don't know. How can I verify? It could be that I skipped some crucial steps in the setup. I'm trying to use split domains.
@stefano My reverse proxy is Apache 2. It already runs several other VirtualHosts, including several reverse proxies on the same host, and I don't really want to exchange it to nginx and redo the 15 different hosts it serves at this point. 😅
But it's also working really well in general for its other use cases - also as a reverse proxy. But again, it could be that I missed something while trying to "port" the nginx setup over.
@chainq@mastodon.social the split domain setup can be a bit tricky - but I'll try to give you some hints. Copying and pasting a message I sent to another friend some days ago, using apache:
Example: @alice@example.com, with LittleFedi at social.example.com. Apache and littleFedi run on the same machine.
littleFedi - merge into your existing config:
local_domain = "example.com"
web_domain = "social.example.com"
[http]
listen = "127.0.0.1:8080"
trusted_proxies = ["127.0.0.1/32", "::1/128"]
Apache - inside the existing HTTPS VirtualHost for social.example.com:
ProxyRequests Off
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
ProxyPass "/" "http://127.0.0.1:8080/" upgrade=websocket
ProxyPassReverse "/" "http://127.0.0.1:8080/"
Inside the existing HTTPS VirtualHost for example.com, before any catch-all proxy rule:
ProxyRequests Off
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
ProxyPass "/.well-known/webfinger" "http://127.0.0.1:8080/.well-known/webfinger"
ProxyPassReverse "/.well-known/webfinger" "http://127.0.0.1:8080/.well-known/webfinger"
ProxyPass "/.well-known/host-meta" "http://127.0.0.1:8080/.well-known/host-meta"
ProxyPassReverse "/.well-known/host-meta" "http://127.0.0.1:8080/.well-known/host-meta"
THis example requires Apache with proxy, proxy_http, headers and ssl enabled. Keep both domains’ existing certificate settings.
@stefano This is amazing, thanks again. I think the missing bit is the part which redirects from the main domain, so the handles could be found...
I was wondering how some underlying magic figures that out, while the actual instance runs on another domain, and without telling this the proxy explicitly somehow - well it obviously can't, it needs these redirects. But now it makes a lot more sense. I'll try this and report back.
@stefano We have liftoff! 🚀 🤩 It works now. I can now follow my self-hosted instance here, and the self-hosted instance can message/post to/follow this account. Amazing!
This indeed can be a source of confusion, because the "Getting Started" document says, new installations should use the split domains, but then gives no to little pointers what this kind of setup needs on the proxy. Or I missed it. 😅
Anyway, so glad it works now. Will play with it some more before putting it into "production".
@chainq@mastodon.social This is great news! Thank you for the feedback. And now...enjoy your instance!