updated nginx state
This commit is contained in:
parent
20b8969fa1
commit
f3b1890de2
@ -31,10 +31,6 @@ nginx-config-dir-{{ subdir }}:
|
|||||||
- service: nginx-service
|
- service: nginx-service
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
{#% for vhost in salt['file.find']( nginx.config.dir+'/sites-enabled/',type='f') %#}
|
|
||||||
{#% do salt['file.remove'](vhost) %#}
|
|
||||||
{#% endfor %#}
|
|
||||||
|
|
||||||
{%- for key, vhost in nginx.vhosts.items() %}
|
{%- for key, vhost in nginx.vhosts.items() %}
|
||||||
nginx-sites-available-{{ key }}:
|
nginx-sites-available-{{ key }}:
|
||||||
file.managed:
|
file.managed:
|
||||||
|
22
states/nginx/templates/types/zabbix.j2
Normal file
22
states/nginx/templates/types/zabbix.j2
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
||||||
|
|
||||||
|
server {
|
||||||
|
include http;
|
||||||
|
server_name {{ vhost_name }};
|
||||||
|
return 301 https://$server_name$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
include https;
|
||||||
|
server_name {{ vhost_name }};
|
||||||
|
root {{ root_dir }};
|
||||||
|
|
||||||
|
index index.php index.html;
|
||||||
|
|
||||||
|
location ~ \.php?$ {
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_pass unix:{{ php_socket_file }};
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user