Apache LogFormat show full domain name

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 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

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *