Add root parameter to server context (#104)
* Add root parameter to server context * Update NGINX Unit test playbook
This commit is contained in:
parent
f29d9c33f0
commit
171b7d0cce
@ -332,6 +332,7 @@ nginx_http_template:
|
||||
port: 8081
|
||||
server_name: localhost
|
||||
error_page: /usr/share/nginx/html
|
||||
root: /usr/share/nginx/html
|
||||
https_redirect: false
|
||||
autoindex: false
|
||||
ssl:
|
||||
|
@ -163,6 +163,7 @@ nginx_http_template:
|
||||
port: 8081
|
||||
server_name: localhost
|
||||
error_page: /usr/share/nginx/html
|
||||
root: /usr/share/nginx/html
|
||||
https_redirect: false
|
||||
autoindex: false
|
||||
ssl:
|
||||
|
@ -56,13 +56,15 @@ server {
|
||||
listen {{ item.value.port }};
|
||||
{% endif %}
|
||||
server_name {{ item.value.server_name }};
|
||||
{% if item.value.autoindex is defined and item.value.autoindex %}
|
||||
autoindex on;
|
||||
{% if item.value.root is defined and item.value.root %}
|
||||
root {{ item.value.root }};
|
||||
{% endif %}
|
||||
{% if item.value.https_redirect is defined and item.value.https_redirect %}
|
||||
return 301 https://{{ item.value.server_name }}$request_uri;
|
||||
{% endif %}
|
||||
|
||||
{% if item.value.autoindex is defined and item.value.autoindex %}
|
||||
autoindex on;
|
||||
{% endif %}
|
||||
{% if item.value.reverse_proxy is defined %}
|
||||
{% for location in item.value.reverse_proxy.locations %}
|
||||
location {{ item.value.reverse_proxy.locations[location].location }} {
|
||||
|
@ -9,4 +9,3 @@
|
||||
nginx_unit_enable: true
|
||||
nginx_unit_modules:
|
||||
- unit-php
|
||||
- unit-perl
|
||||
|
Loading…
Reference in New Issue
Block a user