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'
|
||||
$group = '_nginx'
|
||||
}
|
||||
$logdir = '/var/www/logs'
|
||||
}
|
||||
default: {
|
||||
$user = 'nginx'
|
||||
$group = 'nginx'
|
||||
$logdir = '/var/log/nginx'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ user <%= @user %>;
|
|||
worker_processes <%= @workers %>;
|
||||
worker_rlimit_nofile 1024;
|
||||
|
||||
error_log <%= @logdir %>/error.log;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
@ -10,6 +12,8 @@ http {
|
|||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
access_log <%= @logdir %>/access.log combined;
|
||||
|
||||
server_tokens off;
|
||||
|
||||
include conf.d/*.conf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue