Linux Server Error Log
Contents |
know where the log files are located, and what is contained in each and every log
Linux /var/log/messages
file. When your systems are running smoothly, take some time to learn how to check logs in linux server and understand the content of various log files, which will help you when there is a crisis
Linux Log Files Explained
and you have to look though the log files to identify the issue. /etc/rsyslog.conf controls what goes inside some of the log files. For example, following is the entry how to view logs in linux command line in rsyslog.conf for /var/log/messages. $ grep "/var/log/messages" /etc/rsyslog.conf *.info;mail.none;authpriv.none;cron.none /var/log/messages In the above output, *.info indicates that all logs with type INFO will be logged. mail.none,authpriv.none,cron.none indicates that those error messages should not be logged into the /var/log/messages file. You can also specify *.none, which indicates that none of the log messages will be logged. The following what is /var/log/messages are the 20 different log files that are located under /var/log/ directory. Some of these log files are distribution specific. For example, you'll see dpkg.log on Debian based systems (for example, on Ubuntu). /var/log/messages - Contains global system messages, including the messages that are logged during system startup. There are several things that are logged in /var/log/messages including mail, cron, daemon, kern, auth, etc. /var/log/dmesg - Contains kernel ring buffer information. When the system boots up, it prints number of messages on the screen that displays information about the hardware devices that the kernel detects during boot process. These messages are available in kernel ring buffer and whenever the new message comes the old message gets overwritten. You can also view the content of this file using the dmesg command. /var/log/auth.log - Contains system authorization information, including user logins and authentication machinsm that were used. /var/log/boot.log - Contains information that are logged when the system boots /var/log/daemon.log - Contains information logged by the various background daemons that runs on the system
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings
Linux Log Command
and policies of this site About Us Learn more about Stack Overflow how to view log files in linux the company Business Learn more about hiring developers or posting ads with us Unix & Linux Questions Tags Users
/var/log/syslog
Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes http://www.thegeekstuff.com/2011/08/linux-var-log-files/ a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top how to view php and server error logs? up vote 4 down vote favorite I am getting the WSOD now since editing settings.php; php.ini and .htaccess trying to update my site and I need to http://unix.stackexchange.com/questions/57441/how-to-view-php-and-server-error-logs see error logs to find out what is happening. Also how do you clear cache in command line? Any help appreciated although haven't had much lately I have to admit. error-handling share|improve this question asked Dec 3 '12 at 12:11 freja 1474618 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote First of all: The logs for apache are set in the httpd.conf file. And the logs for PHP (if any) are set in the php.ini file. For the case of PHP, you have to look at the php.ini file, and look for log_errors and error_log variables, that must have these values: log_errors = On error_log = /tmp/php_error.log the last value (/tmp/php_error.log) is just an example. It must be a path to a secure location where you want to store the logs. Make sure that: these two lines are not commented, i.e.: they cannot have any ; before them. after the edit is done, restart apache to load these values. share|improve this answer edited Dec 3 '12 at 16:12 answered Dec 3 '12 at 13:05 nozimica 640419
In submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean Community Menu Tutorials Questions Projects Meetups Main Site Sign Up Log In submit View All Results By: Sadequl Hussain Subscribe Subscribed Share Contents Contents We hope you find this tutorial helpful. In addition https://www.digitalocean.com/community/tutorials/how-to-view-and-configure-linux-logs-on-ubuntu-and-centos to guides like this one, we provide simple cloud infrastructure for developers. Learn more → 9 How To View and Configure Linux Logs on Ubuntu and Centos Posted Dec 17, 2013 166.4k views Logging Linux Basics CentOS Ubuntu Debian Introduction http://blog.codeasite.com/how-do-i-find-apache-http-server-log-files Linux system administrators often need to look at log files for troubleshooting purposes. In fact, this is the first thing any sysadmin would do. Linux and the applications that run on it can generate all different types of messages, which how to are recorded in various log files. Linux uses a set of configuration files, directories, programs, commands and daemons to create, store and recycle these log messages. Knowing where the system keeps its log files and how to make use of related commands can therefore help save valuable time during troubleshooting. In this tutorial, we will have a look at different parts of the Linux logging mechanism. Disclaimer The commands in this tutorial were tested in plain vanilla installations of CentOS logs in linux 6.4, Ubuntu 12 and Debian 7. Default Log File Location The default location for log files in Linux is /var/log. You can view the list of log files in this directory with a simple ls -l /var/log command. This is what I see in my CentOS system: [root@TestLinux ~]# ls -l /var/log total 1472 -rw-------. 1 root root 4524 Nov 15 16:04 anaconda.ifcfg.log -rw-------. 1 root root 59041 Nov 15 16:04 anaconda.log -rw-------. 1 root root 42763 Nov 15 16:04 anaconda.program.log -rw-------. 1 root root 299910 Nov 15 16:04 anaconda.storage.log -rw-------. 1 root root 40669 Nov 15 16:04 anaconda.syslog -rw-------. 1 root root 57061 Nov 15 16:04 anaconda.xlog -rw-------. 1 root root 1829 Nov 15 16:04 anaconda.yum.log drwxr-x---. 2 root root 4096 Nov 15 16:11 audit -rw-r--r-- 1 root root 2252 Dec 9 10:27 boot.log -rw------- 1 root utmp 384 Dec 9 10:31 btmp -rw-------. 1 root utmp 1920 Nov 28 09:28 btmp-20131202 drwxr-xr-x 2 root root 4096 Nov 29 15:47 ConsoleKit -rw------- 1 root root 2288 Dec 9 11:01 cron -rw-------. 1 root root 8809 Dec 2 17:09 cron-20131202 -rw-r--r-- 1 root root 21510 Dec 9 10:27 dmesg -rw-r--r-- 1 root root 21351 Dec 6 16:37 dmesg.old -rw-r--r--. 1 root root 165665 Nov 15 16:04 dracut.log -rw-r--r--. 1 root root 146876 Dec 9 10:44 lastlog -rw------- 1 root root 950 Dec 9 10:27 maillog -rw-------. 1 root root 4609 Dec 2 17:00 maillog-20131202 -rw------- 1 root roo
PHP Applications BUSINESS INTELLIGENCE Analysis Services Power BI Data Visualization SERVICES BUSINESS SERVICES IT Consulting & Advisory AGILE Project Management Customized Training DEVELOPMENT SERVICES Requirements Analysis Application Development & Management PRODUCTS SHAREPOINT Content Type Listing Data Room Document Library Listing RESOURCES RESEARCH & GUIDES Blog eBooks CLIENTS Liquid Planner Login ABOUT CODEASITE Our Team Our Approach Our Partners Blog Monday, 02 March 2009 02:50 How do I find Apache http server log files? Written by Louise Fahys Be the first to comment! From : http://www.cyberciti.biz/faq/apache-logs/ There are two type of apache httpd server log files: Error Logs All apache errors / diagnostic information other errors found while serving requests are logged to this file. Location of error log is set using ErrorLog directive. If there is any problem, you should first take a look at this file using cat, grep or any other UNIX / Linux text utilities. This apache log file often contain details of what went wrong and how to fix it. Default error log file location: RHEL / Red Hat / CentOS / Fedora Linux Apache error file location - /var/log/httpd/error_log Debian / Ubuntu Linux Apache error log file location - /var/log/apache2/error.log FreeBSD Apache error log file location - /var/log/httpd-error.log To find exact apache log file location, you can use grep command:# grep ErrorLog /usr/local/etc/apache22/httpd.conf
# grep ErrorLog /etc/apache2/apache2.conf
# grep ErrorLog /etc/httpd/conf/httpd.conf Sample output: # ErrorLog: The location of the error log file.# If you do not specify an ErrorLog directive within a ErrorLog "/var/log/httpd-error.log" Access Logs Apache server records all incoming requests and all requests processed to a log file. The format of the access log is highly configurable. The location and content of the access log are controlled by the CustomLog directive. Default apache acc