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
|
port: 8081
|
||||||
server_name: localhost
|
server_name: localhost
|
||||||
error_page: /usr/share/nginx/html
|
error_page: /usr/share/nginx/html
|
||||||
|
root: /usr/share/nginx/html
|
||||||
https_redirect: false
|
https_redirect: false
|
||||||
autoindex: false
|
autoindex: false
|
||||||
ssl:
|
ssl:
|
||||||
|
@ -163,6 +163,7 @@ nginx_http_template:
|
|||||||
port: 8081
|
port: 8081
|
||||||
server_name: localhost
|
server_name: localhost
|
||||||
error_page: /usr/share/nginx/html
|
error_page: /usr/share/nginx/html
|
||||||
|
root: /usr/share/nginx/html
|
||||||
https_redirect: false
|
https_redirect: false
|
||||||
autoindex: false
|
autoindex: false
|
||||||
ssl:
|
ssl:
|
||||||
|
@ -56,13 +56,15 @@ server {
|
|||||||
listen {{ item.value.port }};
|
listen {{ item.value.port }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
server_name {{ item.value.server_name }};
|
server_name {{ item.value.server_name }};
|
||||||
{% if item.value.autoindex is defined and item.value.autoindex %}
|
{% if item.value.root is defined and item.value.root %}
|
||||||
autoindex on;
|
root {{ item.value.root }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.value.https_redirect is defined and item.value.https_redirect %}
|
{% if item.value.https_redirect is defined and item.value.https_redirect %}
|
||||||
return 301 https://{{ item.value.server_name }}$request_uri;
|
return 301 https://{{ item.value.server_name }}$request_uri;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if item.value.autoindex is defined and item.value.autoindex %}
|
||||||
|
autoindex on;
|
||||||
|
{% endif %}
|
||||||
{% if item.value.reverse_proxy is defined %}
|
{% if item.value.reverse_proxy is defined %}
|
||||||
{% for location in item.value.reverse_proxy.locations %}
|
{% for location in item.value.reverse_proxy.locations %}
|
||||||
location {{ item.value.reverse_proxy.locations[location].location }} {
|
location {{ item.value.reverse_proxy.locations[location].location }} {
|
||||||
|
@ -9,4 +9,3 @@
|
|||||||
nginx_unit_enable: true
|
nginx_unit_enable: true
|
||||||
nginx_unit_modules:
|
nginx_unit_modules:
|
||||||
- unit-php
|
- unit-php
|
||||||
- unit-perl
|
|
||||||
|
Loading…
Reference in New Issue
Block a user