activitypub-single-php-file/README.md

23 wiersze
1003 B
Markdown
Czysty Zwykły widok Historia

2024-02-12 21:21:05 +00:00
# ActivityPub Server in a Single PHP File
2024-02-12 21:08:34 +00:00
2024-02-12 21:21:05 +00:00
This is a single PHP file - and an `.htaccess file` - which acts as an extremely basic ActivityPub server.
2024-02-12 21:08:34 +00:00
## Getting started
2024-02-12 21:21:05 +00:00
This is designed to be a lightweight educational tool to show you the basics of how ActivityPub works.
2024-02-12 21:08:34 +00:00
2024-02-12 21:21:05 +00:00
There are no tests, no checks, no security features, no header verifications, no containers, no gods, no masters.
2024-02-12 21:08:34 +00:00
2024-02-12 21:21:05 +00:00
Edit the `.php` file to add a username, password, and keypair.
2024-02-12 21:08:34 +00:00
2024-02-12 21:21:05 +00:00
Upload the `.php` and `.htaccess` file to the *root* directory of your domain. For example `test.example.com/`. It will not work in a subdirectory.
2024-02-12 21:08:34 +00:00
2024-02-12 21:21:05 +00:00
Optionally, upload an `icon.png` as well to make the account look nice.
2024-02-12 21:08:34 +00:00
2024-02-12 21:21:05 +00:00
## How this works
2024-02-12 21:08:34 +00:00
2024-02-12 21:21:05 +00:00
* The `.htaccess` file transforms requests from `example.com/whatever` to `example.com/index.php?path=whatever`.
* The `index.php` file performs a specific action depending on the path requested.
* Log files are saved as .txt in the root directory.
* Post files are saved as .json in the `/posts` directory.