I've got a VPS account that I set up with lxadmin.
I've got a stats file at /home/http/tanguay.info/stats/ which is filling up extremely fast. Looking in it, I see that there are 1000s of entries with a referer that is obviously a spam site.
- How can I block requests from this site? (A friend logged in couple of weeks ago and did something with the iptables which seemed to block some of these requests, but I had to reboot and it looks like those changes are gone.)
- Since I didn't manually set up Apache (did it via lxadmin), I don't know where/why this stats file is being created? Where can I start looking?
- I asked a similar question and it was suggested I check /etc/logrotate.conf which looks like this:
But this seems to be effecting the following directory instead, which is another source of growing log files but not as acute at the moment:
It was also suggested that in the /etc/http/conf/http.conf I comment out the "ErrorLog" line, which I did many weeks ago and which had no effect on either of the log file directories above:
It was also suggested I change the /etc/logrotate.d/httpd
file and make it "size-based" instead of "time-based". Here is the file. How would I change it to "time-based":
But then I realize that this has nothing to do with the two directories of log files that I know about but yet a THIRD set of log files that are filling up:
How can I proceed from here to (1) get these THREE different directories of log files from filling up my VPS drive and (2) how to block those requests from spam sites with iptables?