Separate logs within the same server for different server names?
Lucas Rolff
lucas at lucasrolff.com
Thu Jun 15 11:17:41 UTC 2017
http://nginx.org/en/docs/http/ngx_http_log_module.html
"The file path can contain variables (0.7.6+), but such logs have some constraints"
So yes, you can use things such as $host - but there will be a performance penalty.
On 15/06/2017, 13.02, "nginx on behalf of ST" <nginx-bounces at nginx.org on behalf of smntov at gmail.com> wrote:
>Hello,
>
>is it possible somehow to define separate logs within the same server{}
>for different server names (server_name one.org two.org;)?
>
>access_log /var/log/nginx$server_name/access.log;
>error_log /var/log/nginx$server_name/error.log;
>
>Thank you!
>
>_______________________________________________
>nginx mailing list
>nginx at nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx
More information about the nginx
mailing list