Published

SUCCESSFUL Adventures in setting up ActivityPub + Webfinger on a Flywheel-hosted WordPress site

Updated 31 October 2023 at 2:45pm to edit the NGINX config and give a further explanation.

I gave up too soon!

Emerson from Flywheel did more digging in the Fastly cache documentation and realized that we could tweak the NGINX config to fully support content negotiation. He added a Vary header to the necessary URLs et voilà, everything started working properly. Now, courtesy of Matthias Pfefferle’s great WordPress plugins and Flywheel’s dogged help, you can follow this blog on Mastodon if you search for @blog@piperhaywood.com or https://piperhaywood.com/@blog.

For future reference, this is the NGINX config tweak that got ActivityPub and Webfinger working on Flywheel with their Fastly caching setup:

location ~* /.well-known/webfinger {
    default_type application/activity+json;
    add_header Vary Accept;
    include internal-proxy.conf;
}

location ~* / {
    add_header Vary Accept;
    include internal-proxy.conf;
}

It’s fairly self-explanatory, but essentially the first location block ensures that all Webfinger endpoints have a default content type of application/activity+json, adds a Vary HTTP header so that Flywheel’s caching via Fastly will cache different versions of the page depending upon the content type, and includes further configuration via an internal-proxy.conf file. The second location block ensures that all URLs across the site basically do all of the above, but no default content type is set. (TBH I feel like I might only need the second block… but at this point everything is working nicely so I’m not going to ask the kind souls at Flywheel to change the config yet again!)

Colin from Flywheel explained the internal-proxy.conf file to me in my far-too-long support ticket:

The internal-proxy.conf is indeed an internal file that has platform-specific rules. Some of this config file is just simple cache rules, excluding common paths, whereas other parts are potentially sensitive as they pertain to our load balancing and proxy configs.

So that’s it! You can follow this blog now on Mastodon, and all blog posts published after October 30th should show up.

Published

Adventures in setting up ActivityPub + Webfinger on a Flywheel-hosted WordPress site

Update: We got it working! Take a look at this post for more.


I recently moved my hosting from NFSN to Flywheel. NFSN had served me beautifully for years, very economically, but I just don’t have as much time for admin anymore and Flywheel’s managed WordPress hosting was a useful move to cut down on that stress.

Alongside the hosting move, I’ve been trying to set up the very talented Matthias Pfefferle’s ActivityPub and Webfinger WordPress plugins to get this site on Mastodon.

Unfortunately, Flywheel doesn’t seem to play super nicely with the plugins. Part of this is Flywheel’s NGINX configuration which they lock down tight with good reason. But the bigger sticking point is Flywheel’s full-page caching mechanism. Though their caching provider supports content negotiation, Flywheel itself does not. This causes issues where JSON can end up being cached instead of HTML on various pages, most notably the homepage. (Apologies if you saw a JSON blob when visiting this site recently!) We tried to get around this by forcing the content type on the homepage and Webfinger endpoints, but JSON was still served up on the homepage whenever a client sent through a header with Accept: application/activity+json.

For now, I’ve deactivated the plugins. I’m hoping that Flywheel might look in to supporting them more broadly, but that realistically depends on demand from their customers. For posterity since I hope to revisit this in the future 🤞, here is the discussion about all of the above within the Webfinger repo, including some tips from Matthias.

Flywheel’s support staff have been pretty fantastic through all of this and I’ve been really happy with the hosting thus far so I’m not tempted to move hosts (again) for this. Not yet at least!

Published

@piperhaywood.bsky.social

Finally went ahead and joined Bluesky, @piperhaywood.bsky.social (missed out on @piper, ah well). Thx for the code, Sam. 😘 Definitely not planning to leave Mastodon any time soon, but it felt like it was time to give it a go. IDK, Mastodon has started to feel… very pessimistically cynical? Understandable, but also exhausting. I probably need to refine my follows a bit, haven’t done that in a while.

I skimmed past a New Yorker headline earlier titled “Why The Internet Isn’t Fun Anymore”. And yeah, agreed, it’s definitely not as happy-go-lucky as it was in the past.

But I still find it fun! Maybe even more fun in some ways? So many great people are carving out their own niches online (by that, I mean personal sites or newsletters), and that’s where the real fun lies.

In other words: it’s all about RSS, baby! A place to really nurture your braincells away from any prying eyes or algorithms, where you can follow and unfollow with abandon without wondering, “well if I unfollow, are they gonna think insert-ridiculous-worry?”

And I’ve been hearing unexpected folks talking about RSS, family members and that sort of thing. Whisper it: is RSS becoming mainstream? 🤞 A girl can dream.

Will Bluesky also spark that joy? I’m skeptical. Mastodon is close but isn’t *quite* up there with RSS for me. We’ll see!

Published

Interested in an instance

So Mastodon’s getting a lot of love! If Musk’s Twitter purchase is what ends up making Mastodon a mainstream thing, then hey, silver linings I guess?

I’ve been on since 2019 as @piper@vis.social but other than a brief flurry of activity, I haven’t used it loads. The main problem was the classic “it’s not where my closest friends are”. The other issue is that I would normally enjoy browsing this sort of thing on my phone, and I didn’t love any of the apps available for iOS. That may have changed, I need to investigate.

But part of it was also that the majority of the conversation on the vis.social server wasn’t quite what I would normally engage with. At the time it was definitely the closest to my preferred content out of all of the instances I could find. But a lot of it is slightly too niche for me or over my head a bit.

At any rate, I’m going to stick with vis.social for the time being since they seem like a lovely bunch. I’m also going to start contributing financially; these things cost money because they’re not financially supported by selling our data! But I’m definitely interested in starting my own instance at some point.

For when that eventually comes around, see Simon Willison’s 5 Nov post about Mastodon, and Darius Kazemi’s unbelievably thorough runyourown.social.

It’ll be interesting to see how significant this move to Mastodon is ultimately… SB and I were talking about it and he made the very good point that it really needs to turn in to something like email at some point, something that people see as so basic that companies like Apple and Microsoft start offering Mastodon clients baked in to their operating systems by default. I think that’s probably right, or at least it would be the clearest indication that it’s here to stay.

Besides that, the vocabulary… It can be hard for people to wrap their heads around “federation”, “instances”, etc. Part of me was thinking, do people really even need to understand that? I mean an unbelievable number of people use email, but they don’t usually need to understand the difference between POP and IMAP and that sort of thing. I guess that comes down to solid email clients and providers smoothing over that abstraction though (return to point above about native Mastodon clients). We need better apps and better metaphors.

Published

“Political rewilding” vs. libertarianism, and attempting to escape the barrel with Mastodon

In a recent Guardian opinion piece, George Monbiot calls for “political rewilding” to fight against demagoguery.

At the moment, the political model for almost all parties is to drive change from the top down. […] I believe the best antidote to demagoguery is the opposite process: radical trust. To the greatest extent possible, parties and governments should trust communities to identify their own needs and make their own decisions.

Makes a ton of sense at first glance. But isn’t “political rewilding” just the best of libertarianism repackaged, the freedom of choice and voluntary association? I can understand why he didn’t use that word. The worst of libertarianism — civil liberties at all costs, at the expense of others, the earth, and more — has usurped the rest of it ideologically. “Libertarian” is to the left as “socialist” is to the right.

Related, but separate: in his article, Monbiot draws attention to Finland’s impressive (and seemingly successful) efforts to teach their populace how to spot fake news. In the CNN article he links to, the former secretary-general of the European Schools Kari Kivinen cautions that “it is a balancing act trying to make sure scepticism doesn’t give way to cynicism”.

That line hit home. Reading the news, parsing Twitter, fielding well-intended but misguided email forwards from loved ones. I’ve been living in the barrel for a while now, and it’s exhausting.

On the upside, I’ve joined Mastodon on the vis.social server. My handle is @piper@vis.social, and I’ve downloaded Toot! for iPhone since I like their stance against servers that spread hatred. I’m excited to give a smaller community a whirl, hopefully it will expose me to a more human and humane part of the social web.