Config seems ok
parent
e00313bb36
commit
791832f6d1
|
@ -13,3 +13,14 @@
|
||||||
- conf.d
|
- conf.d
|
||||||
- sites-available
|
- sites-available
|
||||||
- sites-enabled
|
- sites-enabled
|
||||||
|
|
||||||
|
- name: FILE | Follow Debian ;)
|
||||||
|
file: >
|
||||||
|
src="{{ nginx_etc_dir }}/fastcgi_params"
|
||||||
|
dest="{{ nginx_etc_dir }}/fastcgi.conf"
|
||||||
|
state=link
|
||||||
|
|
||||||
|
- name: COPY | Populate proxy_params
|
||||||
|
copy: >
|
||||||
|
content="proxy_set_header Host $http_host;\nproxy_set_header X-Real-IP $remote_addr;\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;"
|
||||||
|
dest="{{ nginx_etc_dir }}/proxy_params"
|
||||||
|
|
|
@ -45,8 +45,8 @@ http {
|
||||||
gzip_vary {{ nginx_http_gzip_vary }};
|
gzip_vary {{ nginx_http_gzip_vary }};
|
||||||
gzip_disable {{ nginx_http_gzip_disable }};
|
gzip_disable {{ nginx_http_gzip_disable }};
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include {{ nginx_etc_dir }}/conf.d/*.conf;
|
||||||
include /etc/nginx/sites-enabled/*;
|
include {{ nginx_etc_dir }}/sites-enabled/*;
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim:filetype=nginx
|
# vim:filetype=nginx
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
{% block template_upstream_location %}
|
{% block template_upstream_location %}
|
||||||
location ~ \.cgi$ {
|
location ~ \.cgi$ {
|
||||||
gzip off;
|
gzip off;
|
||||||
include /etc/nginx/fastcgi_params;
|
include {{ nginx_etc_dir }}/fastcgi_params;
|
||||||
fastcgi_pass unix:/var/run/fcgiwrap.socket;
|
fastcgi_pass unix:/var/run/fcgiwrap.socket;
|
||||||
fastcgi_index BackupPC_Admin;
|
fastcgi_index BackupPC_Admin;
|
||||||
fastcgi_param SCRIPT_FILENAME /usr/share/backuppc/cgi-bin$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME /usr/share/backuppc/cgi-bin$fastcgi_script_name;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block template_try_files %}
|
{% block template_try_files %}
|
||||||
include /etc/nginx/proxy_params;
|
include {{ nginx_etc_dir }}/proxy_params;
|
||||||
proxy_pass http://{{ item.upstream_name }};
|
proxy_pass http://{{ item.upstream_name }};
|
||||||
{% if item.proxy_params is defined and item.proxy_params is iterable %}
|
{% if item.proxy_params is defined and item.proxy_params is iterable %}
|
||||||
{% for param in item.proxy_params %}
|
{% for param in item.proxy_params %}
|
||||||
|
|
|
@ -149,8 +149,6 @@
|
||||||
location:
|
location:
|
||||||
'/hello':
|
'/hello':
|
||||||
- htpasswd: 'hello'
|
- htpasswd: 'hello'
|
||||||
- 'default_type "text/html; charset=UTF-8";'
|
|
||||||
- 'echo hello;'
|
|
||||||
- name: 'test-htpasswd-all.local'
|
- name: 'test-htpasswd-all.local'
|
||||||
template: '_base'
|
template: '_base'
|
||||||
htpasswd: 'hello'
|
htpasswd: 'hello'
|
||||||
|
@ -218,7 +216,10 @@
|
||||||
- name: -- Add HTML file --
|
- name: -- Add HTML file --
|
||||||
copy: dest="{{ item }}/index.html" content="Index HTML test OK\n"
|
copy: dest="{{ item }}/index.html" content="Index HTML test OK\n"
|
||||||
with_items: ['{{ nginx_root }}/test.local/public', '/var/tmp', '{{ nginx_root }}/test-htpasswd-all.local/public', '{{ nginx_root }}/test-ssl.local/public', '{{ nginx_root }}/test-ssl-predeployed.local/public']
|
with_items: ['{{ nginx_root }}/test.local/public', '/var/tmp', '{{ nginx_root }}/test-htpasswd-all.local/public', '{{ nginx_root }}/test-ssl.local/public', '{{ nginx_root }}/test-ssl-predeployed.local/public']
|
||||||
|
- name: -- Create directory --
|
||||||
|
file: path={{ nginx_root }}/test-htpasswd-all.local/public/hello state=directory
|
||||||
|
- name: -- Add HTML file hello --
|
||||||
|
copy: dest="{{ nginx_root }}/test-htpasswd-all.local/public/hello/index.html" content="hello\n"
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
# Simple vhosts tests
|
# Simple vhosts tests
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
|
|
Loading…
Reference in New Issue