mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-02-24 09:03:29 +07:00
Nagios OK on FreeBSD
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% extends "_base.j2" %}
|
||||
|
||||
{% block root %}
|
||||
root /usr/share/nagios3/htdocs;
|
||||
root {{ nginx_nagios_root }};
|
||||
{% endblock %}
|
||||
|
||||
{% block template_try_files %}
|
||||
@@ -17,21 +17,27 @@
|
||||
}
|
||||
|
||||
location /stylesheets {
|
||||
alias /etc/nagios3/stylesheets;
|
||||
{% if nginx_nagios_stylesheets is defined %}
|
||||
alias {{ nginx_nagios_stylesheets }};
|
||||
{% endif %}
|
||||
expires 60d;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block template_upstream_location %}
|
||||
{% if ansible_distribution == 'Debian' %}
|
||||
location /cgi-bin/nagios3 {
|
||||
root /usr/lib;
|
||||
{% elif ansible_distribution == 'FreeBSD' %}
|
||||
location /cgi-bin {
|
||||
{% endif %}
|
||||
try_files $uri =404;
|
||||
{% if nginx_version.stdout | version_compare('1.6.1', 'lt') %}
|
||||
include fastcgi_params;
|
||||
{% else %}
|
||||
include fastcgi.conf;
|
||||
{% endif %}
|
||||
fastcgi_pass unix:/var/run/fcgiwrap.socket;
|
||||
fastcgi_pass unix:{{ nginx_fcgiwrap_sock }};
|
||||
fastcgi_param AUTH_USER $remote_user;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user