Fediverse and Beyond!

With my continued efforts on my blog, I'm working on trying to get the whole Fediverse setup so people interested in my writing can tune in and follow. This comes the nature of Fediverse, and I'm currently now using WordPress for the main blog, this here, and for smaller thoughts, status updates, and just general chitter chatter, Friendica for the more simple shorter messages, a microblogger alternative to things like twitter was.

So Many Problems?

In trying to get all this working, I've been running into numerous troubles. Problems to which actually have yet found a solution for. When I add myself via WordPress's Friends/AcivityPub from my Friendica instance, I get errors. When I do the reverse from Friendica to WordPress, I get network failure issues, not network as in TCP/IP, but 'Fediverse' network issues, like it's having issues with the protocol stack of this all.

So, explaining the details of what I have here. This whole server runs at my home server cluster with Proxmox VE managing the infrastructure as Virtual Machines, 3 physical servers, about to be adding 2 more once I rip them out of Kubernetes, will be added as additional nodes just to have higher availability. Within these 3 physical machines are 3 webserver instances, web1, web2, and web3. In pair to those I have redis in redis1, redis2, and redis3, these are running in sentinel master/slave replication, but to back even those, I have HAProxy handling the connection and routing to redis (master node) and Web1-3, and also my tunnel to CloudFlare which allows me to run this all nicely and securely with a tunnel I can just stop if the need arises.

Now this is a pretty complex setup, most would think, and in honesty, it's not, not in the way I understand things at least. This is just a basic multi-node High Availability setup using a proxy server load balancer to handle things.

Where things seem to get complex is when it comes to the webserver itself. I run Nginx as my webserver primarily, but it seems this comes with lack of support for things like WordPress and Friendica which expect to make (bad) use of .htaccess files intended for Apache HTTPD. While it's not entirely bad, the very specific intended use of .htaccess slows things down from having actual good configuration within the webserver itself. And, of course, only Apache HTTPD even reads that file.

WebFinger, NodeInfo, and Host-Meta?

So in further research, I need my own handler for /.well-known/webfinger, /.well-known/nodeinfo, /.well-known/x-nodeinfo2 and /.well-known/host-meta ? Hmm, okay, so I tried that with a line very much like this in my WordPress nginx config:

location ~ ^/.well-known/(webfinger|nodeinfo|x-nodeinfo2|host-meta) {
    try_files $uri $uri/ /index.php?$args;
}

This, at least, looks right, and I got that from a resource that seemed to have an understanding of this, and actual known problems with ActivityPub and Nginx. But, once again, it seems to not actually be working, thus far.

Solutions?

At this time, I'm still working on solutions, and so I decided to open up the floor here with the issue, and see what I can get. Any comments? Any solutions? If you got any, leave a comment below!

-- Psi-Jack

Leave a Reply

Your email address will not be published. Required fields are marked *