160 lines
4.1 KiB
YAML
160 lines
4.1 KiB
YAML
# -*- coding: utf-8 -*-
|
|
# vim: ft=yaml
|
|
|
|
#server {
|
|
# server_name auto auto.chaos;
|
|
# listen 80 default_server;
|
|
# location / {
|
|
# return 301 http://$host/habpanel/index.html#/;
|
|
# }
|
|
#
|
|
# location /rest {
|
|
# proxy_redirect off;
|
|
# proxy_pass http://auto01:8080;
|
|
# }
|
|
# location ~ ^/(habpanel.*) {
|
|
# proxy_redirect off;
|
|
# proxy_pass http://auto01:8080/$1;
|
|
# }
|
|
#}
|
|
#server {
|
|
# server_name oha oha.chaos;
|
|
# listen 80;
|
|
#
|
|
# location / {
|
|
# proxy_redirect off;
|
|
# proxy_pass http://auto01:8080/;
|
|
# }
|
|
#}
|
|
nginx:
|
|
install_from_repo: False
|
|
server:
|
|
config:
|
|
events:
|
|
worker_connections: 100
|
|
servers:
|
|
managed:
|
|
default:
|
|
enabled: false
|
|
status:
|
|
enabled: true
|
|
config:
|
|
- server:
|
|
- server_name: _
|
|
- listen:
|
|
- '127.0.0.1:80'
|
|
- location /stub_status:
|
|
- stub_status: ''
|
|
proxy_openhab:
|
|
enabled: true
|
|
config:
|
|
- server:
|
|
- server_name: auto auto.chaos
|
|
- listen:
|
|
- '80 default_server'
|
|
- location /:
|
|
- return: 301 http://$host/habpanel/index.html
|
|
- location /habpanel/:
|
|
- proxy_redirect: 'off'
|
|
- proxy_pass: http://auto01:8080
|
|
- location /rest:
|
|
- proxy_redirect: 'off'
|
|
- proxy_pass: http://auto01:8080
|
|
proxy_openhab-admin:
|
|
enabled: true
|
|
config:
|
|
- server:
|
|
- server_name: oha oha.chaos
|
|
- listen:
|
|
- '80'
|
|
- location /:
|
|
- proxy_redirect: 'off'
|
|
- proxy_pass: http://auto01:8080
|
|
systemd:
|
|
service:
|
|
openhab2-prometheus-exporter:
|
|
Unit:
|
|
Description: OpenHAB Prometheus exporter
|
|
Wants: openhab.service
|
|
Service:
|
|
WorkingDirectory: /usr/local/bin
|
|
ExecStart: /usr/bin/gunicorn3 -w 2 --backlog 10 -b 0.0.0.0:9999 openhab2-prometheus-exporter:app
|
|
Restart: on-failure
|
|
User: openhab
|
|
Group: openhab
|
|
Install:
|
|
WantedBy: multi-user.target
|
|
Alias: openhab2-prometheus
|
|
|
|
# Obsolete
|
|
#haproxy:
|
|
# enabled: True
|
|
# overwrite: True
|
|
# global:
|
|
# stats:
|
|
# enable: True
|
|
# socketpath: /var/lib/haproxy/stats
|
|
# mode: 660
|
|
# level: admin
|
|
## Optional extra bind parameter, for example to set the owner/group on the socket file
|
|
# extra: user haproxy group haproxy
|
|
# ssl-default-bind-ciphers: ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384
|
|
# ssl-default-bind-options: no-sslv3 no-tlsv10 no-tlsv11
|
|
# user: haproxy
|
|
# group: haproxy
|
|
# chroot:
|
|
# enable: True
|
|
# path: /var/lib/haproxy
|
|
# daemon: True
|
|
# defaults:
|
|
# mode: http
|
|
# stats:
|
|
# - enable
|
|
# - uri: /admin?stats
|
|
# - realm: Haproxy\ Statistics
|
|
# - auth: admin1:AdMiN123
|
|
# errorfiles:
|
|
# 400: /etc/haproxy/errors/400.http
|
|
# 403: /etc/haproxy/errors/403.http
|
|
# 408: /etc/haproxy/errors/408.http
|
|
# 500: /etc/haproxy/errors/500.http
|
|
# 502: /etc/haproxy/errors/502.http
|
|
# 503: /etc/haproxy/errors/503.http
|
|
# 504: /etc/haproxy/errors/504.http
|
|
# resolvers:
|
|
# local_dns:
|
|
# options:
|
|
# - nameserver resolvconf 192.168.10.1:53
|
|
# - resolve_retries 3
|
|
# - timeout retry 1s
|
|
# - hold valid 10s
|
|
# listens:
|
|
# stats:
|
|
# bind:
|
|
# - 0.0.0.0:8998
|
|
# stats:
|
|
# enable: True
|
|
# uri: /admin?stats
|
|
# refresh: 20s
|
|
# frontends:
|
|
# frontend1:
|
|
# name: openhab
|
|
##http-request: redirect location /habpanel 301
|
|
# bind: '*:80'
|
|
# default_backend: openhab
|
|
# acls:
|
|
# - auto hdr_beg(host) -i auto
|
|
# - prefix path_beg /habpanel
|
|
# httprequests:
|
|
# - redirect code 301 location http://auto.chaos/habpanel/\# append-slash if auto !prefix
|
|
# backends:
|
|
# backend1:
|
|
# name: openhab
|
|
# balance: roundrobin
|
|
# servers: # append-slash if auto !prefix
|
|
# server1:
|
|
# name: auto01
|
|
# host: 127.0.0.1
|
|
# port: 8080
|
|
# check: check
|