31 lines
769 B
Markdown
31 lines
769 B
Markdown
|
# hostas2
|
||
|
|
||
|
A backend for your ActivityPub-enabled website
|
||
|
|
||
|
## Setup
|
||
|
|
||
|
For Nginx:
|
||
|
|
||
|
```bash
|
||
|
export HOSTAS_ROOT=/path/to/root
|
||
|
|
||
|
# Create the database
|
||
|
sudo php init.php
|
||
|
|
||
|
# Link the necessary components around the file system
|
||
|
ln -s $HOSTAS_ROOT/etc /etc/hostas
|
||
|
ln -s $HOSTAS_ROOT/etc/nginx.conf /etc/nginx/sites-enabled/example.net
|
||
|
ln -s $HOSTAS_ROOT/public /var/www/example.net
|
||
|
|
||
|
# Restart Nginx
|
||
|
sudo service nginx restart
|
||
|
|
||
|
# Generate the signing keys for activities
|
||
|
openssl genrsa -out $HOSTAS_ROOT/etc/keys/private.pem 2048
|
||
|
openssl rsa -in $HOSTAS_ROOT/etc/keys/private.pem -outform PEM -pubout -out $HOSTAS_ROOT/etc/keys/public.pem
|
||
|
|
||
|
# Create and set up the config
|
||
|
cp $HOSTAS_ROOT/etc/config.example.php $HOSTAS_ROOT/public/config.php
|
||
|
vim $HOSTAS_ROOT/public/config.php
|
||
|
```
|