Apache or openlitespeed CustomLog to log full URL
Log Format
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{Host}i%U%q"
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{Host}i%U%q" combined
%{Host}i%U%q
gives full url.
"162.158.174.99 - - [24/Sep/2023:09:53:06 +0200] "GET /reune.php?tvhiduj-98468ujp/ucgiu HTTP/1.1" 404 705 "-" "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.62 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" urlshortenerlink.com/reune.phptvhiduj-98468ujp/ucgiu"
find /usr/local/lsws/conf/vhosts/ -type f -name 'vhost.conf' -exec sed -i "s/.*CustomLog.*/ LogFormat '%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"' combined
&/g" {} \; successful.
Comments
Post a Comment