add ngnix-status to config

add doc
This commit is contained in:
p5t2vspoqqw 2019-04-17 13:42:09 +02:00
parent d4f2cb91d7
commit deeefac84c
4 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# Configure Ngnix (optional, advanced)
By default, this playbook installs its own nginx webserver (in a Docker container) which listens on ports 80 and 443.
If that's alright, you can skip this.
## Using Ngnix status
This will serve a statuspage to the hosting machine only. Useful for monitoring software like [longview](https://www.linode.com/docs/platform/longview/longview-app-for-nginx/)
```yaml
matrix_nginx_proxy_nginx_status_enabled: true
```

View File

@ -43,6 +43,8 @@ When you're done with all the configuration you'd like to do, continue with [Ins
- [Serving your base domain using this playbook's nginx server](configuring-playbook-base-domain-serving.md) (optional)
- [Configure Ngnix (optional, advanced)](configuring-playbook-ngnix.md) (optional, advanced)
- [Using your own webserver, instead of this playbook's nginx proxy](configuring-playbook-own-webserver.md) (optional, advanced)
- [Setting up the REST authentication password provider module](configuring-playbook-rest-auth.md) (optional, advanced)

View File

@ -1,5 +1,7 @@
matrix_nginx_proxy_enabled: true
matrix_nginx_proxy_nginx_status_enabled: false
# We use an official nginx image, which we fix-up to run unprivileged.
# An alternative would be an `nginxinc/nginx-unprivileged` image, but
# those as more frequently out of date.

View File

@ -4,6 +4,15 @@ server {
server_tokens off;
{% if matrix_nginx_proxy_nginx_status_enabled %}
location /nginx_status {
stub_status on;
access_log off;
allow {{ ansible_default_ipv4.address }};
deny all;
}
{% endif %}
location /.well-known/acme-challenge {
{% if matrix_nginx_proxy_enabled %}
{# Use the embedded DNS resolver in Docker containers to discover the service #}