You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+49-1
Original file line number
Diff line number
Diff line change
@@ -401,8 +401,56 @@ The use of environment variables allow you to provide over-rides to default sett
401
401
| `DEBUG` | This defaults to `no` and can however be set to `yes` by simply defining the global variable as such.
402
402
403
403
404
-
## Development Environment
404
+
## Nginx Overrides
405
+
406
+
The 2 files you can override are:
407
+
1.`/etc/nginx/location-override.conf` which is included within all of the Apprise API NginX `location` references.
408
+
1.`/etc/nginx/server-override.conf` which is included within Apprise API `server` reference.
409
+
410
+
### Authentication
411
+
Under the hood, Apprise-API is running a small NginX instance. It allows for you to inject your own configuration into it. One thing you may wish to add is basic authentication.
412
+
413
+
Below we create ourselves some nginx directives we'd like to apply to our Apprise API:
414
+
```nginx
415
+
# Our override.conf file:
416
+
auth_basic "Apprise API Restricted Area";
417
+
auth_basic_user_file /etc/nginx/.htpasswd;
418
+
```
419
+
420
+
Now let's set ourselves up with a simple password file (for more info on htpasswd files, see [here](https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/)
421
+
```bash
422
+
# Create ourselves a for our user 'foobar'; the below will prompt you for the pass
423
+
# you want to provide:
424
+
htpasswd -c apprise_api.htpasswd foobar
425
+
426
+
# Note: the -c above is only needed to create the database for the first time
427
+
```
405
428
429
+
Now we can create our docker container with this new authentication information:
Visit http://localhost:8000 to see if things are working as expected. If you followed the example above, you should log in as the user `foobar` using the credentials you provided the account.
446
+
447
+
You can add further accounts to the existing database by omitting the `-c` switch:
448
+
```bash
449
+
# Add another account
450
+
htpasswd apprise_api.htpasswd user2
451
+
```
452
+
453
+
## Development Environment
406
454
The following should get you a working development environment to test with:
0 commit comments