2017-10-06 97 views
0

我在nginx服務器上部署了我的應用程序,並且我也使用基本的ngnix身份驗證。Url在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/儀表盤

請幫我

回答

0

您可以使用變量組合來獲得完整的URL

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