PDA

View Full Version : Question About Dedicated Server


badboyz
05-11-2007, 02:53 AM
How do i check httpd loges in ssh?

anyone help me with this please

Wizardjv
05-11-2007, 03:09 AM
Go to:

/home/user/logs/domain.com/http

where 'user' is your actual user and 'domain.com' is one of your domains - you'll want to do this for each of the domains under your user

You can use the cd /home/user/logs/domain.com/http

command to get there thats where your logs are

badboyz
05-11-2007, 03:13 AM
No such file or directory

im getting this error when i type "the cd /home/user/logs/domain.com/http "on ssh

Wizardjv
05-11-2007, 03:17 AM
You have to replace user with your user name and domain.com with your domain name

like if user was bob and domain google.com

cd /home/bob/logs/google.com/http

get it now?

badboyz
05-11-2007, 03:18 AM
ya i did it before.

i typed "cd /home/badboyz/logs/mydomain.com/http"

it said No such file or directory:(


..
I have linux Dedicated Server

Wizardjv
05-11-2007, 03:22 AM
Well if your having problems getting the logs this way. You could just ftp to your server and grab them. You server may be setup different. But for most servers that is the default way to do it.

badboyz
05-11-2007, 03:24 AM
Well if your having problems getting the logs this way. You could just ftp to your server and grab them. You server may be setup different. But for most servers that is the default way to do it.

my site which was hosted on my server is going down lot of the time (not the server)i asked my server provider guy abut it and he said that its due to server overload and asked me to find file in httpd logs and ban those ip


MY server loads high

i am trying to do this

Wizardjv
05-11-2007, 03:36 AM
Ahh then you would want to do something like this. All the lines with code tags or the commands.

The main causes you will find are abuse from specific IPs or inefficient scripts. In the case where it is abuse you should be able to determine the cause if you specifically look at each of the access logs for your domains. Go to:

/home/user/logs/domain.com/http

where 'user' is your actual user and 'domain.com' is one of your domains - you'll want to do this for each of the domains under your user. Enter this command to see the IPs hitting the domain the most:

tail -10000 access.log| awk '{print $1}' | sort | uniq -c |sort -n

or for the whole log:

cat access.log| awk '{print $1}' | sort | uniq -c |sort -n

Which gives you something like this (I am just showing the bottom of the output):

364 65.214.44.72
436 64.172.17.3
657 204.74.126.70
1799 33.36.52.212
1847 66.249.66.167

If you find IPs that are connecting a lot first check to see who it is:


host ipaddy

replace ipaddy with says 66.249.66.167

so

host 66.249.66.167


Then you would block the ip addy connecting alot.

Maybe that will help if you can find the logs :)

badboyz
05-11-2007, 03:39 AM
the problem is when i type

(with my own user name and domain name)
/home/user/logs/domain.com/http

it says no such a file

MrPHD
05-11-2007, 03:59 PM
the problem is when i type

(with my own user name and domain name)
/home/user/logs/domain.com/http

it says no such a file
Hi, whats your Administration Panel? regards

badboyz
05-11-2007, 04:25 PM
you have msn id?

i found the problem

it sud be "vi/home/user/logs/domain.com/http"

but i see nothing on this folder