Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11722436
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/shellserver/web-hosting/init.sls b/roles/shellserver/web-hosting/init.sls
index eb855b7..c733ed2 100644
--- a/roles/shellserver/web-hosting/init.sls
+++ b/roles/shellserver/web-hosting/init.sls
@@ -1,56 +1,52 @@
# -------------------------------------------------------------
# Salt — nginx configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Eglide
# Created: 2016-11-08
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
# -------------------------------------------------------------
# Nginx configuration files
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
nginx_config_files:
file.recurse:
{% if grains['os'] == 'FreeBSD' %}
- name: /usr/local/etc/nginx
{% else %}
- name: /etc/nginx
{% endif %}
- source: salt://roles/shellserver/web-hosting/files/{{ grains['id'] }}/nginx
- include_empty: True
- clean: False
- dir_mode: 755
- file_mode: 644
- - cmd.run:
- - name: nginx -s reload
- - onchanges:
- {% if grains['os'] == 'FreeBSD' %}
- - file: /usr/local/etc/nginx/nginx.conf
- {% else %}
- - file: /etc/nginx/nginx.conf
- {% endif %}
+ cmd.run:
+ - name: nginx -s reload
+ - onchanges:
+ - file: nginx_config_files
# -------------------------------------------------------------
# Nginx logs
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/var/log/www:
file.directory:
- user: root
- group: www-data
- dir_mode: 750
# -------------------------------------------------------------
# Site to serve when Host: header doesn't match a known vhost
#
# Typically, this occurs when a domain is configured in DNS,
# but not in nginx.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
unknown_domain_files:
file.recurse:
- name: /var/wwwroot/unknown_domains
- source: salt://roles/shellserver/web-hosting/files/{{ grains['id'] }}/wwwroot-unknown
- dir_mode: 755
- file_mode: 644
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Sep 18, 02:18 (20 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2989866
Default Alt Text
(2 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment