Config seems ok

pull/14/head
Emilien Mantel 2016-03-05 15:36:25 +01:00
parent e00313bb36
commit 791832f6d1
5 changed files with 19 additions and 7 deletions

View File

@ -13,3 +13,14 @@
- conf.d
- sites-available
- 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"

View File

@ -45,8 +45,8 @@ http {
gzip_vary {{ nginx_http_gzip_vary }};
gzip_disable {{ nginx_http_gzip_disable }};
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
include {{ nginx_etc_dir }}/conf.d/*.conf;
include {{ nginx_etc_dir }}/sites-enabled/*;
}
# vim:filetype=nginx

View File

@ -25,7 +25,7 @@
{% block template_upstream_location %}
location ~ \.cgi$ {
gzip off;
include /etc/nginx/fastcgi_params;
include {{ nginx_etc_dir }}/fastcgi_params;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_index BackupPC_Admin;
fastcgi_param SCRIPT_FILENAME /usr/share/backuppc/cgi-bin$fastcgi_script_name;

View File

@ -7,7 +7,7 @@
{% endblock %}
{% block template_try_files %}
include /etc/nginx/proxy_params;
include {{ nginx_etc_dir }}/proxy_params;
proxy_pass http://{{ item.upstream_name }};
{% if item.proxy_params is defined and item.proxy_params is iterable %}
{% for param in item.proxy_params %}

View File

@ -149,8 +149,6 @@
location:
'/hello':
- htpasswd: 'hello'
- 'default_type "text/html; charset=UTF-8";'
- 'echo hello;'
- name: 'test-htpasswd-all.local'
template: '_base'
htpasswd: 'hello'
@ -218,7 +216,10 @@
- name: -- Add HTML file --
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']
- 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
# --------------------------------