Merge pull request 'docs: Add Apache2 documentation' (#10078) from warrows/calckey:main into main

Reviewed-on: https://codeberg.org/calckey/calckey/pulls/10078
This commit is contained in:
Kainoa Kanter 2023-05-11 00:02:38 +00:00
commit ec5ad0ff41
2 changed files with 27 additions and 3 deletions

View file

@ -138,13 +138,24 @@ psql postgres -c "create database calckey with encoding = 'UTF8';"
For migrating from Misskey v13, Misskey v12, and Foundkey, read [this document](https://codeberg.org/calckey/calckey/src/branch/develop/docs/migrate.md). For migrating from Misskey v13, Misskey v12, and Foundkey, read [this document](https://codeberg.org/calckey/calckey/src/branch/develop/docs/migrate.md).
## 🍀 NGINX ## Web proxy
Choose between NGINX or Apache (we recommend NGINX)
### 🍀 NGINX
- Run `sudo cp ./calckey.nginx.conf /etc/nginx/sites-available/ && cd /etc/nginx/sites-available/` - Run `sudo cp ./calckey.nginx.conf /etc/nginx/sites-available/ && cd /etc/nginx/sites-available/`
- Edit `calckey.nginx.conf` to reflect your instance properly - Edit `calckey.nginx.conf` to reflect your instance properly
- Run `sudo cp ./calckey.nginx.conf ../sites-enabled/` - Run `sudo ln -s ./calckey.nginx.conf ../sites-enabled/calckey.nginx.conf`
- Run `sudo nginx -t` to validate that the config is valid, then restart the NGINX service. - Run `sudo nginx -t` to validate that the config is valid, then restart the NGINX service.
### Apache 2
- Run `sudo cp ./calckey.apache.conf /etc/apache2/sites-available/ && cd /etc/apache2/sites-available/`
- Edit `calckey.apache.conf` to reflect your instance properly
- Run `sudo a2ensite calckey.apache` to enable the site
- Run `sudo service apache2 restart` to reload apache2 configuration
</details> </details>
## 🚀 Build and launch! ## 🚀 Build and launch!

13
calckey.apache.conf Normal file
View file

@ -0,0 +1,13 @@
# Replace example.tld with your domain
<VirtualHost *:80>
ServerName example.tld
# For WebSocket
ProxyPass "/streaming" "ws://127.0.0.1:3000/streaming/"
# Proxy to Node
ProxyPass "/" "http://127.0.0.1:3000/"
ProxyPassReverse "/" "http://127.0.0.1:3000/"
ProxyPreserveHost On
# For files proxy
AllowEncodedSlashes On
</VirtualHost>