Mini Shell

Direktori : /etc/nginx/ea-nginx/
Upload File :
Current File : //etc/nginx/ea-nginx/global-logging.tt

map $msec $msec_no_microseconds {
    ~([0-9]+)\. $1;
}

error_log /var/log/nginx/error.log [% logging.loglevel %];

log_format cp_combined '$server_name:$server_port $remote_addr - $remote_user [$time_local] '
    '"$request" $status $body_bytes_sent '
    '"$http_referer" "$http_user_agent"';

log_format cp_common '$server_name:$server_port $remote_addr - $remote_user [$time_local] '
    '"$request" $status $body_bytes_sent';

log_format cp_bytes_server '$msec_no_microseconds $request_length .\n$msec_no_microseconds $bytes_sent .';

[%- IF logging.piped_logs %]
# pipelog_format/pipelog is from module loaded in:
#   /etc/nginx/conf.d/modules/ngx_http_pipelog_module.conf

pipelog_format bytesvhost '$server_name $msec_no_microseconds $request_length .\n$server_name $msec_no_microseconds $bytes_sent .';

pipelog_format combinedvhost '$server_name:$server_port $remote_addr - $remote_user [$time_local] '
    '"$request" $status $body_bytes_sent '
    '"$http_referer" "$http_user_agent"';

pipelog "/usr/local/cpanel/bin/splitlogs --dir=/var/log/nginx/domains --main=[% hostname %] --suffix=-bytes_log" bytesvhost;
pipelog "/usr/local/cpanel/bin/splitlogs --dir=/var/log/nginx/domains --main=[% hostname %] --mainout=/var/log/nginx/access.log" combinedvhost;
[% ELSE %]
# access_log format can be set in WHM under 'Basic WebHost ManagerĀ® Setup'
access_log /var/log/nginx/access.log cp_[% logging.default_format_name %];
[% END -%]

[%- IF logging.enable_cache_log %]
log_format cp_cache_log '[$time_local] [Cache:$upstream_cache_status] [$host] [Remote_Addr: $remote_addr] - $remote_user - $server_name to: $upstream_addr: "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
access_log /var/log/nginx/cache.log cp_cache_log;
[%- END %]

Zerion Mini Shell 1.0