caddy: send log to stdout for OVH LDP
This commit is contained in:
@@ -112,7 +112,6 @@ Urgemment:
|
|||||||
|
|
||||||
- Connexion à consul, ACL consul
|
- Connexion à consul, ACL consul
|
||||||
- Active backend checks
|
- Active backend checks
|
||||||
- Correction de la collecte des logs via OVH LDP
|
|
||||||
- Faire fonctionner le filtre dict2str via la collection Ansible
|
- Faire fonctionner le filtre dict2str via la collection Ansible
|
||||||
|
|
||||||
Fonctionnalités à ajouter:
|
Fonctionnalités à ajouter:
|
||||||
|
|||||||
@@ -40,9 +40,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
log waf {
|
log waf {
|
||||||
format json
|
format {{ site.log_format | default(caddy_sites_defaults.log_format) }}
|
||||||
include "http.handlers.waf"
|
include "http.handlers.waf"
|
||||||
|
{% if site.log_to_file | default(caddy_sites_defaults.log_to_file) %}
|
||||||
output file {{ caddy_log_dir }}/waf.log
|
output file {{ caddy_log_dir }}/waf.log
|
||||||
|
{% else %}
|
||||||
|
output stdout
|
||||||
|
{% endif %}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,8 +262,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
log {
|
log {
|
||||||
format json
|
format {{ site.log_format | default(caddy_sites_defaults.log_format) }}
|
||||||
|
level INFO
|
||||||
|
{% if site.log_to_file | default(caddy_sites_defaults.log_to_file) %}
|
||||||
output file {{ caddy_log_dir }}/site_{{ site.id }}.log
|
output file {{ caddy_log_dir }}/site_{{ site.id }}.log
|
||||||
|
{% else %}
|
||||||
|
output stdout
|
||||||
|
{% endif %}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ LimitNOFILE=1048576
|
|||||||
PrivateTmp=true
|
PrivateTmp=true
|
||||||
ProtectSystem=full
|
ProtectSystem=full
|
||||||
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
|
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
SyslogIdentifier={{ caddy_my_name }}
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -6,6 +6,11 @@ caddy_global_sites_defaults:
|
|||||||
site_redirect_from_aliases: true
|
site_redirect_from_aliases: true
|
||||||
|
|
||||||
|
|
||||||
|
# Log settings
|
||||||
|
log_to_file: false
|
||||||
|
log_format: "json"
|
||||||
|
|
||||||
|
|
||||||
# Proxy settings
|
# Proxy settings
|
||||||
proxy_lb_policy: "ip_hash" # random
|
proxy_lb_policy: "ip_hash" # random
|
||||||
# random_choose <n>
|
# random_choose <n>
|
||||||
|
|||||||
Reference in New Issue
Block a user