"$request" を "$request_method $scheme://$host$request_uri $server_protocol" にする
If you want to log the full requested url, then my method is
log_format main '$http_x_forwarded_for - $remote_user [$time_local] ' '"$request_method $scheme://$host$request_uri $server_protocol" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $request_time';So splitting the $request into its constituent parts and popping $host in the middle. Also lets you see if the request is http or https.
...
This format has the advantage of being parseable by things that expect the standard format, like the filebeat nginx module and the grok patterns for logstash
Full record url in nginx log - Stack Overflow
Nginxアクセスログのフォーマットにホスト名を入れてLogwatchにも対応させる
nginxのログに絶対URLを出力する - 文系プログラマによるTIPSブログ
nginxの設定ミスで起こるHostヘッダフォージェリ - Qiita