Apache LogFormat show full domain name

Written by Yujin Boby

Edit in WordPress

To show the full domain name in the Apache access log, you can use the following log format

LogFormat "%h %l %u %t \"%m https://%v:%p%U%q %H\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" sok_log

If you want to show the port also, use

LogFormat "%h %l %u %t \"%m https://%v%U%q %H\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" sok_log

To use this LogFormat for logging, edit Apache VirtualHost, add

CustomLog /path/to/access.log sok_log

See Apache