logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: newbie with horribly simple question about web server logs
Author
Hendrik



Joined: 05 May 2010
Posts: 7
Location: UK

PostPosted: Wed 05 May '10 19:42    Post subject: newbie with horribly simple question about web server logs Reply with quote

... sorry, my technical knowledge is so little that I probably will be unable to understand anything I am told here (most of the posts I have looked at here are way over my head) but if anyone can point me in the right direction, I would be very grateful.

I have been running a web site for over 10 years on a shared server, and when it started to run slow last year (someone else seemed to be using a lot of cgi requests) I took up my ISPs suggestion to move to a dedicated server, running Debian and Apache. The web site is working fine. I just would like to be able to access web server log files. These used to be available on the old shared server, but now the ISP has given me a dedicated server they say it is all up to me and won't help.

I use CuteFTP (although I also have WinSCP and Putty) and I can get to the var/log folder, which contains a few very small log files (auth.log, mail.log and kern.log) and also contains the folder apache2 that I have read is the default folder for the web server log files. CHMOD is 750. However when I click to access it, I get a '550 apache2: No such file or directory ' message.

I can see that I do not have permission to change the CHMOD. Is this something to do with logging on as root? (I do not know how to do that, although I have been given the password). And is the default install with Apache likely to include web logs, if only I could get to them? Or am I going to have to install something or make some command in order to make Apache start creating the log files?

If I could see the raw log files I would be more than happy. I have run raw logs through webaliser in the past.

Thanks for any pointers you can give

Hendrik


Last edited by Hendrik on Wed 05 May '10 19:48; edited 1 time in total
Back to top
a_jtim



Joined: 05 May 2010
Posts: 8

PostPosted: Wed 05 May '10 19:48    Post subject: Reply with quote

Hi Hendrik,
On my server (freebsd) the logs are in /usr/local/apache2/logs
Can you try that location? My logs are setup with read permission for everyone.

good luck,
--Tim
Back to top
Hendrik



Joined: 05 May 2010
Posts: 7
Location: UK

PostPosted: Wed 05 May '10 19:53    Post subject: Reply with quote

Hi Tim

I had a look on the /usr/local/ folder but there is no apache2 folder in there. I had a look inside the folders that were there, but did not see anything that looked like log files. Thanks for the suggestion though.

Hendrik
Back to top
a_jtim



Joined: 05 May 2010
Posts: 8

PostPosted: Wed 05 May '10 20:03    Post subject: Reply with quote

hi,
I should have read your message more carefully. You said you have the root password; can you login to the machine? oh, i see you have putty, so that shouldn't be a problem.

If you can, you can navigate to the /var/log/ directory and
sudo chmod 755 apache2

that will give read/execute access to everyone. 'execute' access on a directory means you can 'cd' into it.
Hopefully the log files inside it are already set to have read access.
Back to top
Hendrik



Joined: 05 May 2010
Posts: 7
Location: UK

PostPosted: Wed 05 May '10 20:17    Post subject: Reply with quote

Quote:
If you can, you can navigate to the /var/log/ directory and
sudo chmod 755 apache2


Sorry, said I was a complete newbie... I have heard about this su and sudo business, but do not really know how it works.

I can open the terminal screen using Putty... do I literally just type

sudo chmod 755 apache2

or are there more steps to it?

Sorry for the basic questions. This is all pretty scary stuff if you have never done it before!

hendrik
Back to top
a_jtim



Joined: 05 May 2010
Posts: 8

PostPosted: Wed 05 May '10 20:35    Post subject: Reply with quote

no problem, we've all had to learn this stuff sometime....
Yes, you just
(1) change to the parent directory that contains the apache2 folder,
(2) change its permissions so you can get inside,
(3) change into the apache2 directory and
(4) check the logfile permissions there. If they're rw-r--r--, you're fine, otherwise
(5) change the logfile permissions.

(1) cd /var/log
(2) sudo chmod 755 apache2
it will ask you for the password before it executes.
(3) cd apache2
(4) ls -l
(5) chmod 644 *

Then you should be able to read them (or download them with cuteftp).
good luck!
--Tim
Back to top
Hendrik



Joined: 05 May 2010
Posts: 7
Location: UK

PostPosted: Wed 05 May '10 20:55    Post subject: Reply with quote

cd /var/log works fine (just like those DOS commands I occasionally had to use all those years ago!)

However the sudo chmod 755 apache2 command does not. I get a message saying that 'Host has not answered for more than 15 seconds. Still waiting...' However nothing happens.

I have Debian (Lenny) on the server. Might it need a slightly different command do you think?

Hendrik
Back to top
Hendrik



Joined: 05 May 2010
Posts: 7
Location: UK

PostPosted: Wed 05 May '10 21:00    Post subject: Reply with quote

Maybe sudo is not installed.

I tried the su- command, both when in the var/log folder and also at the initial log in, but it does not seem to recognise this either.

Hmmm

I am busy searching Linux and Debian forums, but not found anything yet.

Hendrik
Back to top
a_jtim



Joined: 05 May 2010
Posts: 8

PostPosted: Wed 05 May '10 21:04    Post subject: Reply with quote

Hi Hendrik,
I'm not sure what's going on; I think you will need to get more help from your isp. Surely you must be paying for the service, this kind of support would usually be included with it (at least that's what I would expect).

sorry I couldn't help more.
--Tim
Back to top
Hendrik



Joined: 05 May 2010
Posts: 7
Location: UK

PostPosted: Wed 05 May '10 21:07    Post subject: Reply with quote

I am in console rather than Terminal, if that makes any difference.

When I initially try to open Terminal, I get the following message -

'Current SFTP-3 session does not support command you request. Separate shell session may be opened to process the command. Do you want to open separate shell session?

Note: the server must provide Unix-like shell and the shell must use same path syntax as current SFTP-3 session.'

When I click OK, the console opens.

Hendrik
Back to top
a_jtim



Joined: 05 May 2010
Posts: 8

PostPosted: Wed 05 May '10 21:20    Post subject: Reply with quote

That sounds like the ftp console I guess?
Yes, you need real shell access. I thought that's what you get when you use Putty. All the commands I talked about are unix shell commands.
Back to top
Hendrik



Joined: 05 May 2010
Posts: 7
Location: UK

PostPosted: Wed 05 May '10 23:01    Post subject: Reply with quote

Hi Tim

Thanks for the input.

I did a few things with Debian that I hadn't done before. So I guess I am still confused, but at a higher level... Which is all we can expect from life really!

Regards

Hendrik
Back to top


Reply to topic   Topic: newbie with horribly simple question about web server logs View previous topic :: View next topic
Post new topic   Forum Index -> Apache