title: Full record url in nginx log
body: <p>We use following nginx site configure file in our production env.</p>
  
  <pre><code>log_format main '$http_x_forwarded_for - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" $request_time';
  
  
  
  server {
          root /srv/www/web;
          server_name *.test.com;
          access_log /var/log/nginx/xxx.test.com.access.log main;
  </code></pre>
  
  <p>Both "<a href="http://a.test.com/ping">http://a.test.com/ping</a>" and "<a href="http://b.test.com/ping">http://b.test.com/ping</a>" http request will be record in file xxx.test.com.access.log.</p>
  
  <p>But there is a problem, nginx don't store "domain name" in xxx.test.com.access.log.</p>
  
  <p>"<a href="http://a.test.com/ping">http://a.test.com/ping</a>" and "<a href="http://b.test.com/ping">http://b.test.com/ping</a>" share the same request "Get /ping".</p>
  
  <p>How can I record "a.test.com" or "b.test.com" in nginx log?</p>