Skip to content

Commit 38e0e9b

Browse files
pfefferleobenland
andauthored
Improve Docs (#1758)
Co-authored-by: Konstantin Obenland <[email protected]>
1 parent 9d7779d commit 38e0e9b

File tree

5 files changed

+60
-27
lines changed

5 files changed

+60
-27
lines changed

docs/how-to/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# How-To
2+
3+
This folder contains How-To guides for common problems or edge cases. If you miss a guide, please [open an issue](https://github.com/Automattic/wordpress-activitypub/issues/new/choose) or [submit a pull request](https://github.com/Automattic/wordpress-activitypub/pulls).

docs/how-to/reverse-proxy.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Handling reverse proxy setups with Apache
2+
3+
If you are using a reverse proxy with Apache to serve your site, you may find that followers are unable to follow your blog. This happens because the proxy rewrites the `Host` header to your server’s internal DNS name, which the plugin then uses to sign replies. However, remote servers expect replies to be signed with your public DNS name. To resolve this, you need to use the `ProxyPreserveHost On` directive to ensure that the external host name is passed through to the backend server.
4+
5+
If you are using SSL between the reverse proxy and the internal host, you may also need to set `SSLProxyCheckPeerName off` if the internal host does not present the correct SSL certificate. Be aware that this can introduce a security risk in some environments.
6+
7+
## Example
8+
9+
```apache
10+
<VirtualHost *:443>
11+
ServerName example.com
12+
ProxyPreserveHost On
13+
SSLProxyCheckPeerName off
14+
ProxyPass / http://localhost:8080/
15+
ProxyPassReverse / http://localhost:8080/
16+
</VirtualHost>
17+
```

docs/how-to/wordpress-in-a-subdir.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Using a subdirectory for your blog
2+
3+
For WebFinger to function properly, it needs to be mapped to the root directory of your blog’s URL.
4+
5+
## Apache
6+
7+
Add the following lines to the `.htaccess` file located in your site's root directory:
8+
9+
RedirectMatch "^\/\.well-known/(webfinger|nodeinfo)(.*)$" /blog/.well-known/$1$2
10+
11+
…where `blog` is the path to the subdirectory where your blog is installed.
12+
13+
## Nginx
14+
15+
Add the following lines to your `site.conf` file in the `sites-available` directory:
16+
17+
location ~* /.well-known {
18+
allow all;
19+
try_files $uri $uri/ /blog/?$args;
20+
}
21+
22+
Where `blog` is the path to the subdirectory where your blog is installed.
23+
24+
If your blog is installed in a subdirectory but you’ve set a different [wp_siteurl](https://wordpress.org/documentation/article/giving-wordpress-its-own-directory/), you don’t need the redirect — index.php will handle it automatically.

docs/readme.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
# The ActivityPub plugin documentation!
2+
3+
In this directory you will find the documentation for the ActivityPub plugin.
4+
5+
## How-To
6+
7+
If you need help, check out the [How-To section](./how-to) or use [the support forums on WordPress.org](https://wordpress.org/support/plugin/activitypub/).
8+

readme.txt

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== ActivityPub ===
22
Contributors: automattic, pfefferle, mattwiebe, obenland, akirk, jeherve, mediaformat, nuriapena, cavalierlife, andremenrath
3-
Tags: OStatus, fediverse, activitypub, activitystream
3+
Tags: fediverse, activitypub, indieweb, activity pub, activitystream, social web
44
Requires at least: 6.5
55
Tested up to: 6.8
66
Stable tag: 5.9.2
@@ -59,38 +59,20 @@ This plugin connects your WordPress blog to popular social platforms like Mastod
5959

6060
= What is "ActivityPub for WordPress" =
6161

62-
*ActivityPub for WordPress* extends WordPress with some Fediverse features, but it does not compete with platforms like Friendica or Mastodon. If you want to run a **decentralized social network**, please use [Mastodon](https://joinmastodon.org/) or [GNU social](https://gnusocial.network/).
62+
*ActivityPub for WordPress* adds Fediverse features to WordPress, but it is not a replacement for platforms like Friendica or Mastodon. If you're looking to host a decentralized social network, consider using [Mastodon](https://joinmastodon.org/) or [Friendica](https://friendi.ca/).
6363

64-
= What if you are running your blog in a subdirectory? =
64+
= Why "ActivityPub"? =
6565

66-
In order for webfinger to work, it must be mapped to the root directory of the URL on which your blog resides.
66+
The name ActivityPub comes from the two core ideas behind the protocol:
6767

68-
**Apache**
68+
* Activity: It is based on the concept of activities, like "Create", "Like", "Follow", "Announce", etc. These are structured messages (usually in [ActivityStreams](https://www.w3.org/TR/activitystreams-core/) format) that describe what users do on the network.
69+
* Pub: Short for publish or publication. It refers to the fact that this is a publish-subscribe (pub-sub) protocol — one user can "follow" another, and receive their published activities.
6970

70-
Add the following to the .htaccess file in the root directory:
71+
Put together, ActivityPub is a protocol for publishing and subscribing to activities, which enables decentralized social networking — where different servers can interact and users can follow each other across the Fediverse.
7172

72-
RedirectMatch "^\/\.well-known/(webfinger|nodeinfo)(.*)$" /blog/.well-known/$1$2
73+
= How do I solve… =
7374

74-
Where 'blog' is the path to the subdirectory at which your blog resides.
75-
76-
**Nginx**
77-
78-
Add the following to the site.conf in sites-available:
79-
80-
location ~* /.well-known {
81-
allow all;
82-
try_files $uri $uri/ /blog/?$args;
83-
}
84-
85-
Where 'blog' is the path to the subdirectory at which your blog resides.
86-
87-
If you are running your blog in a subdirectory, but have a different [wp_siteurl](https://wordpress.org/documentation/article/giving-wordpress-its-own-directory/), you don't need the redirect, because the index.php will take care of that.
88-
89-
= What if you are running your blog behind a reverse proxy with Apache? =
90-
91-
If you are using a reverse proxy with Apache to run your host you may encounter that you are unable to have followers join the blog. This will occur because the proxy system rewrites the host headers to be the internal DNS name of your server, which the plugin then uses to attempt to sign the replies. The remote site attempting to follow your users is expecting the public DNS name on the replies. In these cases you will need to use the 'ProxyPreserveHost On' directive to ensure the external host name is passed to your internal host.
92-
93-
If you are using SSL between the proxy and internal host you may also need to `SSLProxyCheckPeerName off` if your internal host can not answer with the correct SSL name. This may present a security issue in some environments.
75+
We have a **How-To** section in the [docs](https://github.com/Automattic/wordpress-activitypub/tree/trunk/docs/how-to) directory that can help you troubleshoot common issues.
9476

9577
= Constants =
9678

0 commit comments

Comments
 (0)