nginx: Add default error and access logs
This commit is contained in:
parent
a9b7e9a72e
commit
4d7fcc9e65
2 changed files with 6 additions and 0 deletions
|
@ -13,10 +13,12 @@ class nginx(
|
||||||
$user = '_nginx'
|
$user = '_nginx'
|
||||||
$group = '_nginx'
|
$group = '_nginx'
|
||||||
}
|
}
|
||||||
|
$logdir = '/var/www/logs'
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
$user = 'nginx'
|
$user = 'nginx'
|
||||||
$group = 'nginx'
|
$group = 'nginx'
|
||||||
|
$logdir = '/var/log/nginx'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@ user <%= @user %>;
|
||||||
worker_processes <%= @workers %>;
|
worker_processes <%= @workers %>;
|
||||||
worker_rlimit_nofile 1024;
|
worker_rlimit_nofile 1024;
|
||||||
|
|
||||||
|
error_log <%= @logdir %>/error.log;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
worker_connections 1024;
|
||||||
}
|
}
|
||||||
|
@ -10,6 +12,8 @@ http {
|
||||||
include mime.types;
|
include mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
access_log <%= @logdir %>/access.log combined;
|
||||||
|
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
|
|
||||||
include conf.d/*.conf;
|
include conf.d/*.conf;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue