README: language tags and lead-ins for command blocks
This commit is contained in:
parent
0d2b96a825
commit
74aa0c0c13
1 changed files with 9 additions and 7 deletions
16
README.md
16
README.md
|
|
@ -49,7 +49,9 @@ No database is needed, and it runs on any PHP 8.1+ setup with nginx or Apache. I
|
||||||
|
|
||||||
1. **Register an OIDC client in tinyauth.** Add a client to the tinyauth env file. The client ID and secret must match `config.php` in step 2:
|
1. **Register an OIDC client in tinyauth.** Add a client to the tinyauth env file. The client ID and secret must match `config.php` in step 2:
|
||||||
|
|
||||||
```
|
Add these lines to the tinyauth env file:
|
||||||
|
|
||||||
|
```ini
|
||||||
TINYAUTH_OIDC_CLIENTS_TINYAUTHWEB_CLIENTID=tinyauth-web
|
TINYAUTH_OIDC_CLIENTS_TINYAUTHWEB_CLIENTID=tinyauth-web
|
||||||
TINYAUTH_OIDC_CLIENTS_TINYAUTHWEB_CLIENTSECRET=<a long random secret>
|
TINYAUTH_OIDC_CLIENTS_TINYAUTHWEB_CLIENTSECRET=<a long random secret>
|
||||||
TINYAUTH_OIDC_CLIENTS_TINYAUTHWEB_NAME=tinyauth-web
|
TINYAUTH_OIDC_CLIENTS_TINYAUTHWEB_NAME=tinyauth-web
|
||||||
|
|
@ -58,9 +60,9 @@ No database is needed, and it runs on any PHP 8.1+ setup with nginx or Apache. I
|
||||||
|
|
||||||
Restart tinyauth afterwards. You can also add the client from the tool's **New OIDC client** form once it's running.
|
Restart tinyauth afterwards. You can also add the client from the tool's **New OIDC client** form once it's running.
|
||||||
|
|
||||||
2. **Create `config.php`:**
|
2. **Create `config.php`** from the template:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cp config.example.php config.php
|
cp config.example.php config.php
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -68,9 +70,9 @@ No database is needed, and it runs on any PHP 8.1+ setup with nginx or Apache. I
|
||||||
|
|
||||||
3. **Point the web server at `public/`.** Use HTTPS. See `examples/nginx/` for complete server blocks.
|
3. **Point the web server at `public/`.** Use HTTPS. See `examples/nginx/` for complete server blocks.
|
||||||
|
|
||||||
4. **Install the sudo rule** (as root):
|
4. **Install the sudo rule** (as root). The second command checks the file for syntax errors:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
install -m 0440 sudoers/tinyauth-web.sudoers /etc/sudoers.d/tinyauth-web
|
install -m 0440 sudoers/tinyauth-web.sudoers /etc/sudoers.d/tinyauth-web
|
||||||
visudo -cf /etc/sudoers.d/tinyauth-web
|
visudo -cf /etc/sudoers.d/tinyauth-web
|
||||||
```
|
```
|
||||||
|
|
@ -79,14 +81,14 @@ No database is needed, and it runs on any PHP 8.1+ setup with nginx or Apache. I
|
||||||
|
|
||||||
5. **Let the web user edit the env file.** Keep the file owned by root, and make it writable by the web group only:
|
5. **Let the web user edit the env file.** Keep the file owned by root, and make it writable by the web group only:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
chgrp www-data /etc/tinyauth/tinyauth.env
|
chgrp www-data /etc/tinyauth/tinyauth.env
|
||||||
chmod 660 /etc/tinyauth/tinyauth.env
|
chmod 660 /etc/tinyauth/tinyauth.env
|
||||||
```
|
```
|
||||||
|
|
||||||
6. **Set the directory and file permissions** (as root). PHP runs as `www-data`, so it must be able to read the code and config and write `data/`. Create `data/` yourself, because the checkout is usually owned by your own user:
|
6. **Set the directory and file permissions** (as root). PHP runs as `www-data`, so it must be able to read the code and config and write `data/`. Create `data/` yourself, because the checkout is usually owned by your own user:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
install -d -o www-data -g www-data -m 0750 /path/to/tinyauth-web/data
|
install -d -o www-data -g www-data -m 0750 /path/to/tinyauth-web/data
|
||||||
chown root:www-data /path/to/tinyauth-web/config.php
|
chown root:www-data /path/to/tinyauth-web/config.php
|
||||||
chmod 640 /path/to/tinyauth-web/config.php
|
chmod 640 /path/to/tinyauth-web/config.php
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue