access.log not functioning as expected when return code is 200 — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberLoader

access.log not functioning as expected when return code is 200

Here is the configuration for the server-wide access log
/usr/local/lsws/logs/access.log:

accessLog logs/access.log {
rollingSize 10M
keepDays 30
compressArchive 0
logReferer 1
logUserAgent 1
logFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"
}


When the return code is 404 (and other errors), the data in the access.log is complete. It includes which account, referrer, user-agent etc. Here are examples:

"54.191.137.17 - - [24/Nov/2020:09:25:41 -0600] "POST /product/door-hangers/wp-load.php?mwprid=5fbd25f5c5a130.14135430 HTTP/1.1" 404 1236 "https://carrmamacos.printsafe.net/product/door-hangers/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36"
"194.5.52.24 - - [24/Nov/2020:09:28:38 -0600] "GET //wp-includes/wlwmanifest.xml HTTP/1.1" 404 1236 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
"185.206.225.142 - - [24/Nov/2020:09:32:17 -0600] "GET /index.php?param1=assert&param2=print(md5(57575848371)); HTTP/1.1" 404 1236 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0"
"198.54.126.74 - - [24/Nov/2020:09:32:56 -0600] "POST /xmlrpc.php HTTP/1.1" 404 1236 "-" "Wordpress"
"13.66.139.146 - - [24/Nov/2020:09:39:39 -0600] "GET /product-tag/business-card/ HTTP/1.1" 404 705 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
"114.119.132.9 - - [24/Nov/2020:09:42:17 -0600] "GET /product-category/indooroutdoordisplays HTTP/1.1" 404 705 "-" "Mozilla/5.0 (Linux; Android 7.0;) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compatible; PetalBot;+https://aspiegel.com/petalbot)"


However, when the return code is 200, the access.log is always missing complete information. Here is an example:

"5.181.156.97 - - [24/Nov/2020:09:31:51 -0600] "-" 200 0 "-" "-"
"45.5.118.59 - - [24/Nov/2020:09:36:15 -0600] "-" 200 0 "-" "-"
"216.155.130.140 - - [24/Nov/2020:09:36:34 -0600] "-" 200 0 "-" "-"
"45.5.118.59 - - [24/Nov/2020:09:39:07 -0600] "-" 200 0 "-" "-"
"181.143.56.115 - - [24/Nov/2020:09:39:44 -0600] "-" 200 0 "-" "-"
"45.5.118.59 - - [24/Nov/2020:09:40:57 -0600] "-" 200 0 "-" "-"
"45.5.118.59 - - [24/Nov/2020:09:42:58 -0600] "-" 200 0 "-" "-"
"3.228.219.172 - - [24/Nov/2020:09:45:04 -0600] "-" 200 0 "-" "-"
"45.5.118.59 - - [24/Nov/2020:09:48:36 -0600] "-" 200 0 "-" "-"


Why is the access.log so empty for code 200?
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!