网址未显示在ngnix日志中

时间:2017-10-06 08:09:34

标签: nginx logging

我在nginx服务器上部署了我的应用程序,我也在使用基本的ngnix身份验证。

我还在ngnix中自定义我的日志

log_format timed '$remote_addr - $remote_user [$time_local] '
                       '$status "$request" $http_host';

但是我需要在我的日志中提供完整的URL,从$ http_host它显示的IP就像“11.110.11.11:只有不是我的网址例如.11.110.11.11 / dashboard

请帮帮我

1 个答案:

答案 0 :(得分:0)

您可以使用变量组合来获取完整网址

log_format timed '$remote_addr - $remote_user [$time_local] '
                       '$status "$request" "$scheme://$http_host$request_uri"';
相关问题