CloudPanel配置ActivityPub,让其他服务器用户可以直接关注WordPress博客
cd /etc/nginx/sites-enabled/sudo vim photos.heybran.tech.conf修改前的location ~ /.well-known配置。
server {
// ... existing rules
location ~ /.well-known {
auth_basic off;
allow all;
}
}
server {
// ... existing rules
}更新第一个server block的location ~ /.well-known配置,同时在下一个server block里面添加一个location ~ /.well-known/webfinger配置。
server {
// ... existing rules
location ~ /.well-known {
auth_basic off;
allow all;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080;
}
}
server {
// ... existing rules
location ~ /.well-known/webfinger {
try_files $uri $uri/ /index.php?$args;
}
}重启下nginx。
sudo systemctl reload nginx到网站后台/wp-admin/options-general.php?page=activitypub&tab=blog-profile设置账号前缀,比如:@[email protected]。
目前还没有测试发布一张照片是否可以成功在Mastodon显示,这个可以直接录制视频分享。