Fix the nginx configuration.
This commit is contained in:
parent
cb51208520
commit
37f78f831c
|
@ -13,3 +13,23 @@ prometheus_loglevel: info
|
||||||
prometheus_http_port: 9090
|
prometheus_http_port: 9090
|
||||||
prometheus_opts: '--storage.tsdb.retention.time=120d'
|
prometheus_opts: '--storage.tsdb.retention.time=120d'
|
||||||
# --storage.tsdb.retention.size=512GB
|
# --storage.tsdb.retention.size=512GB
|
||||||
|
|
||||||
|
prometheus_nginx_letsencrypt_managed: true
|
||||||
|
prometheus_nginx_virthost_name: "{{ ansible_fqdn }}"
|
||||||
|
prometheus_nginx_server_name: "{{ ansible_fqdn }}"
|
||||||
|
prometheus_nginx_virthosts:
|
||||||
|
- virthost_name: '{{ prometheus_nginx_virthost_name }}'
|
||||||
|
listen: '{{ http_port }}'
|
||||||
|
server_name: '{{ prometheus_nginx_server_name }}'
|
||||||
|
server_aliases: ''
|
||||||
|
index: index.html
|
||||||
|
ssl_enabled: true
|
||||||
|
ssl_only: true
|
||||||
|
ssl_letsencrypt_certs: '{{ nginx_letsencrypt_managed }}'
|
||||||
|
root: '{{ nginx_webroot }}'
|
||||||
|
server_tokens: 'off'
|
||||||
|
proxy_standard_setup: True
|
||||||
|
locations:
|
||||||
|
- location: /
|
||||||
|
target: http://localhost:{{ prometheus_http_port }}
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,6 @@
|
||||||
---
|
---
|
||||||
prometheus_dir: 'prometheus-{{ prometheus_version }}.linux-amd64'
|
prometheus_dir: "prometheus-{{ prometheus_version }}.linux-amd64"
|
||||||
prometheus_file: '{{ prometheus_dir }}.tar.gz'
|
prometheus_file: "{{ prometheus_dir }}.tar.gz"
|
||||||
|
|
||||||
nginx_letsencrypt_managed: True
|
nginx_letsencrypt_managed: "{{ prometheus_nginx_letsencrypt_managed }}"
|
||||||
nginx_use_common_virthost: True
|
nginx_virthosts: "{{ prometheus_nginx_virthosts }}"
|
||||||
nginx_virthosts:
|
|
||||||
- virthost_name: '{{ ansible_fqdn }}'
|
|
||||||
listen: '{{ http_port }}'
|
|
||||||
server_name: '{{ ansible_fqdn }}'
|
|
||||||
server_aliases: ''
|
|
||||||
index: index.html
|
|
||||||
ssl_enabled: True
|
|
||||||
ssl_only: True
|
|
||||||
ssl_letsencrypt_certs: '{{ nginx_letsencrypt_managed }}'
|
|
||||||
root: '{{ nginx_webroot }}'
|
|
||||||
server_tokens: 'off'
|
|
||||||
proxy_standard_setup: True
|
|
||||||
locations:
|
|
||||||
- location: /
|
|
||||||
target: http://localhost:{{ prometheus_http_port }}
|
|
||||||
|
|
Loading…
Reference in New Issue