Adjust Readme code blocks
This commit is contained in:
parent
022c1808ca
commit
52aacec792
22
README.md
22
README.md
|
@ -13,7 +13,7 @@ The `main` branch is [served](https://dao-governance-framework.gitlab.io/forum-l
|
||||||
|
|
||||||
For a more convenient local URL,
|
For a more convenient local URL,
|
||||||
|
|
||||||
add `forum.dev` as an alias for `127.0.0.1` in your `/etc/hosts` file.
|
Add `forum.dev` as an alias for `127.0.0.1` in your `/etc/hosts` file
|
||||||
|
|
||||||
Install [mkcert](https://github.com/FiloSottile/mkcert/#installation)
|
Install [mkcert](https://github.com/FiloSottile/mkcert/#installation)
|
||||||
|
|
||||||
|
@ -21,20 +21,28 @@ Install [nginx](https://nginx.org/en/docs/install.html)
|
||||||
|
|
||||||
Add the root CA for self-signed certificates
|
Add the root CA for self-signed certificates
|
||||||
|
|
||||||
|
```bash
|
||||||
mkcert -install
|
mkcert -install
|
||||||
|
```
|
||||||
|
|
||||||
Generate a certificate for `forum.dev`
|
Generate a certificate for `forum.dev`
|
||||||
|
|
||||||
|
```bash
|
||||||
mkcert forum.dev
|
mkcert forum.dev
|
||||||
|
```
|
||||||
|
|
||||||
Move the certificate to nginx config directory
|
Move the certificate to nginx config directory
|
||||||
|
|
||||||
|
```bash
|
||||||
sudo mkdir -p /etc/nginx/certs
|
sudo mkdir -p /etc/nginx/certs
|
||||||
sudo cp forum.dev{,-key}.pem /etc/nginx/certs/
|
sudo cp forum.dev{,-key}.pem /etc/nginx/certs/
|
||||||
|
```
|
||||||
|
|
||||||
Make your home directory readable to the webserver (hacky way):
|
Make your home directory readable to the webserver. One way to do this is to add the webserver daemon's user to your user group. The following command would work if your user's group has the same name as your user, and the webserver user is `www-data`:
|
||||||
|
|
||||||
chown a+r ~/
|
```bash
|
||||||
|
sudo groupmems --group $USER --add www-data
|
||||||
|
```
|
||||||
|
|
||||||
Configure `nginx` by adding a file `/etc/nginx/sites-available/forum_dev`, with content similar to the following:
|
Configure `nginx` by adding a file `/etc/nginx/sites-available/forum_dev`, with content similar to the following:
|
||||||
|
|
||||||
|
@ -55,14 +63,20 @@ server {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace `/home/ladd/dgf/forum-logic` with the path to this repository on your filesystem.
|
Replace `/home/ladd/dgf/forum-logic` with the path to this repository on your filesystem
|
||||||
|
|
||||||
Enable the site
|
Enable the site
|
||||||
|
|
||||||
|
```bash
|
||||||
sudo ln -s /etc/nginx/sites-available/forum_dev /etc/nginx/sites-enabled/
|
sudo ln -s /etc/nginx/sites-available/forum_dev /etc/nginx/sites-enabled/
|
||||||
|
```
|
||||||
|
|
||||||
Now restart `nginx` and the site should be available at https://forum.dev.
|
Now restart `nginx` and the site should be available at https://forum.dev.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl restart nginx
|
||||||
|
```
|
||||||
|
|
||||||
Note that browsers may cache assets, so after modifying source code, you may need to refresh your browser while holding `Shift` to bypass the browser cache.
|
Note that browsers may cache assets, so after modifying source code, you may need to refresh your browser while holding `Shift` to bypass the browser cache.
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|
Loading…
Reference in New Issue