Forum Moderators: phranque
I have setup my first apache server recently and my log file is full of horrible things such as this:
67.15.62.* - - [20/Sep/2008:20:13:57 +0100] "GET /sqladmin/main.php HTTP/1.0" 404 1123
67.15.62.* - - [20/Sep/2008:20:13:57 +0100] "GET /sysadmin/main.php HTTP/1.0" 404 1123
67.15.62.* - - [20/Sep/2008:20:13:57 +0100] "GET /padmin/main.php HTTP/1.0" 404 1123
67.15.62.* - - [20/Sep/2008:20:13:58 +0100] "GET /phpmyadmin/main.php HTTP/1.0" 200 3374
I believe people are trying to get access to the server. Is there a way to prevent these connection attempts? I guess not ... but I need a bit of advice in terms of securing the server.
I have my website running on the machine and it needs to secured a minimum. When I setup apache (which was done via XAMPP), I blocked the access to my site via the server IP by creating a default virtualhost which leads to a website with no content at all. It seems to work but I am pretty sure there is a nicer way of doing this.
[edited by: jdMorgan at 2:27 pm (utc) on Sep. 21, 2008]
[edit reason] Obscured 'bad' IP address [/edit]
RewriteCond %{HTTP_HOST} ^12.34.56.78
RewriteRule .* - F However, I would normally consider instead redirecting to the correct domain, with a site-wide 301 redirect, one that preserves the requested path in the redirect.
In this case, since the requests are mostly malicious, use the code above to block access.