Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3750538
D3037.id7752.diff
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
D3037.id7752.diff
View Options
diff --git a/roles/webserver-core/nginx/config.sls b/roles/webserver-core/nginx/config.sls
--- a/roles/webserver-core/nginx/config.sls
+++ b/roles/webserver-core/nginx/config.sls
@@ -85,6 +85,15 @@
- makedirs: True
- mode: 644
+# -------------------------------------------------------------
+# Logs
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/var/log/www:
+ file.directory:
+ - group: web
+ - dir_mode: 711
+
# -------------------------------------------------------------
# vhost folder
#
diff --git a/roles/webserver-core/nginx/files/nginx.conf b/roles/webserver-core/nginx/files/nginx.conf
--- a/roles/webserver-core/nginx/files/nginx.conf
+++ b/roles/webserver-core/nginx/files/nginx.conf
@@ -14,7 +14,7 @@
user {{ nginx_options["www_user"] }} web;
worker_processes auto;
-error_log /var/log/nginx/error.log;
+error_log /var/log/www/error.log;
{% if "pid_path" in nginx_options -%}
pid {{ nginx_options["pid_path"] }};
@@ -28,7 +28,7 @@
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
+ access_log /var/log/www/access.log main;
# Optimizing how packets are sent
# Reference: https://thoughts.t37.net/nginx-optimization-understanding-sendfile-tcp-nodelay-and-tcp-nopush-c55cdd276765
diff --git a/roles/webserver-legacy/directories/init.sls b/roles/webserver-legacy/directories/init.sls
--- a/roles/webserver-legacy/directories/init.sls
+++ b/roles/webserver-legacy/directories/init.sls
@@ -12,11 +12,6 @@
- group: web
- dir_mode: 711
-/var/log/www:
- file.directory:
- - group: web
- - dir_mode: 711
-
{% for domains_group in pillar['web_domains'] %}
{% for domain in pillar['web_domains'][domains_group] %}
webserver_directory_{{ domain }}:
@@ -33,8 +28,3 @@
- dir_mode: 711
{% endfor %}
{% endfor %}
-
-/var/run/web:
- file.directory:
- - group: web
- - dir_mode: 711
diff --git a/roles/webserver-legacy/php-sites/php-fpm.sls b/roles/webserver-legacy/php-sites/php-fpm.sls
--- a/roles/webserver-legacy/php-sites/php-fpm.sls
+++ b/roles/webserver-legacy/php-sites/php-fpm.sls
@@ -28,8 +28,15 @@
# -------------------------------------------------------------
# Configuration : pools
+#
+# Sockets are created in /var/run/web/<site user>/php-fpm.sock
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+/var/run/web:
+ file.directory:
+ - group: web
+ - dir_mode: 711
+
{% for fqdn, site in pillar['web_php_sites'].items() %}
php-fpm_pool_{{ site['user'] }}:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 01:27 (21 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2250048
Default Alt Text
D3037.id7752.diff (2 KB)
Attached To
Mode
D3037: Align nginx directories
Attached
Detach File
Event Timeline
Log In to Comment