note about possible location where to clone repo and put it earlier
note about apex domain and www
clarify that nginx config replacement must also occur in snippets
add loki and onions to example CSP snippets
add www. subdomain to example CSP snippets
add way to remove onion or lokinet from the CSP if not used
- If you have a .onion or .loki address, uncomment the block in /etc/nginx/sites-available/EXAMPLE.COM
If you have a .onion or .loki address:
- Uncomment the block in /etc/nginx/sites-available/EXAMPLE.COM
Edit/replace the following in your nginx config:
- "/path/to/jschan" with the path of your jschan root folder
- "example.com" with your domain name
- "example.onion" or "example.loki" with your tor or lokinet address
`sed` can be used to automate this process:
`sed` can be used to automate this process, for example:
```bash
$ sudo sed -i 's|/path/to/jschan|/path/to/your/install|g' /etc/nginx/sites-available/EXAMPLE.COM
$ sudo sed -i 's|/path/to/jschan|/path/to/your/install|g' /etc/nginx/snippets/*
$ sudo sed -i 's/example.com/your.example.com/g' /etc/nginx/sites-available/EXAMPLE.COM
$ sudo sed -i 's/example.com/your.example.com/g' /etc/nginx/snippets/*
# repeat the same for "example.onion" and "example.loki" with your addresses
```
If you don't use .onion or .loki address, remove the example domains from the content-security-policy snippet:
```bash
$ sudo sed -i 's/ wss:\/\/www.example.onion\/ wss:\/\/example.onion\///g' /etc/nginx/snippets/security_headers*
$ sudo sed -i 's/ wss:\/\/www.example.loki\/ wss:\/\/example.loki\///g' /etc/nginx/snippets/security_headers*
```
- Make sure the sites enabled folder is included by `/etc/nginx/nginx.conf` (in debian nginx package this is already done)
@ -83,7 +96,7 @@ If you plan on using hcaptcha or google recaptcha, you will need to modify the c
If you use cloudflare, please read [these](https://support.cloudflare.com/hc/en-us/articles/200170786-Restoring-original-visitor-IPs-Logging-visitor-IP-addresses-with-mod-cloudflare-) [articles](https://support.cloudflare.com/hc/en-us/articles/200168236-Configuring-Cloudflare-IP-Geolocation) to setup proper IP forwarding and geolocation headers. Similar steps would apply to other CDNs/reverse proxies.
**7. Clone this repo, browse to the folder and set some things up**
**7. Get the backend setup & running**
```bash
# copy example secrets file and edit it to fill out the details