?
Solved

Find Log Files in Fedora Linux

Posted on 2011-05-03
8
Medium Priority
?
414 Views
Last Modified: 2012-05-11
Hello All,

    I have a virtual dedicated server from GoDaddy running Fedora.  We have a web company setting up a new website for the client.  I'm not a Linux expert at all but the web developer has requested log files for Apache and PHP as they are getting some errors.  My only access now is via SSH.  How can I grab those log files?  
0
Comment
Question by:bobohost
8 Comments
 
LVL 26

Expert Comment

by:lnkevin
ID: 35515253
You can use grep command as the following:

# grep ErrorLog /usr/local/etc/apache22/httpd.conf
# grep ErrorLog /etc/apache2/apache2.conf
# grep ErrorLog /etc/httpd/conf/httpd.conf

K
0
 
LVL 26

Expert Comment

by:lnkevin
ID: 35515269
Normally, this is the php log file location for RH and Fedora:

/var/log/httpd/error_log

K
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35515278
In linux all the log files resides in /var/log/ directory.
For apache webserver log file should be
/var/log/httpd.log
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 26

Expert Comment

by:lnkevin
ID: 35515360
>>For apache webserver log file should be
>>/var/log/httpd.log

Nope. You need to access to httpd directory and all of the web logs are there.

K

0
 
LVL 26

Accepted Solution

by:
lnkevin earned 2000 total points
ID: 35515464
I'm not a Linux expert at all ....

Since you say that I will give you some commands:

tail /var/log/httpd/error_log > /tmp/error_log
tail /var/log/httpd/error_log.1 > /tmp/error_log.1
......
tail /var/log/httpd/ssl_error_log > /tmp/error_log
tail /var/log/httpd/ssl_error_log.1 > /tmp/ssl_error_log.1

Your logs should be copied to /tmp so your can give them

K



0
 
LVL 6

Author Comment

by:bobohost
ID: 35516408
Thanks lnkevin those commands will help as I have no clue how to grab them.  I'll let you know how it goes.
0
 
LVL 26

Expert Comment

by:lnkevin
ID: 35516811
If they want to see the full logs, just replace tail with cat
Example: cat /var/log/httpd/error_log > /tmp/error_log
.....

K
0
 
LVL 10

Expert Comment

by:pclinuxguru
ID: 35517372
I can say from experience that GoDaddy puts the apache logs in your home folder. If your not finding them I can look at my own GoDaddy account and more than likely it will be in a similar place if you have logging turned on.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month17 days, 12 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question