In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to view the error log of the Apache server on the Linux system", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to view the error log of the Apache server on the Linux system.
Apache error log location on debian,ubuntu or linux mint
Default error log
On debian-based linux, the default location of the system-wide apache error log is / var/log/apache2/error.log. The default location can be modified by editing the configuration file for apache.
Custom error log
To find the custom error log location, open / etc/apache2/apache2.conf with a text editor, and then look for the line that starts with errorlog, which specifies the location of the custom apache error log file. For example, the following lines can be found in the unmodified apache configuration file:
Errorlog ${apache_log_dir} / error.log
In this case, the location is configured using the apachelogdir environment variable, which is defined in / etc/apache2/envvars.
Export apache_log_dir=/var/log/apache2 $suffix
In practice, errorlog may point to any path in your linux system.
Use error logs customized by virtual hosts
If a virtual host is used in the apache web server, the errorlog directive may be specified in the virtual host container, in which case the system-wide error log location mentioned above will be ignored.
When virtual hosts are enabled, each virtual host can define its own custom error log location. To find out the error log location for a particular virtual host, you can open / etc/apache2/sites-enabled/.conf and look for the errorlog directive, which displays the error log file specified by the site.
Apache error log location on centos,fedora or rhel
Default error log
In red hat-based linux, system-wide apache error log files are placed at / var/log/httpd/error_log by default. This default location can be customized by modifying the apache configuration file.
Custom error log
To find out the custom location of the apache error log, open / etc/httpd/conf/httpd.conf with a text editor and look for serverroot, which shows the top level of the apache web server directory tree where the log files and configuration are located. For example:
Serverroot "/ etc/httpd"
Now look for the line at the beginning of errorlog, which indicates where the apache web server wrote the error log. Note that the specified position is the relative position of the serverroot value. For example:
Errorlog "log/error_log"
Combining the above two instructions, you can get the complete error log path, which is / etc/httpd/logs/errorlog by default. In the newly installed apache, this is a symbolic link to / var/log/httpd/errorlog.
In practice, errorlog may point to anywhere in your linux system.
Use error logs customized by virtual hosts
If you enable a virtual host, you can find the error log location of each virtual host by checking / etc/httpd/conf/httpd.conf (or any other file that defines the virtual host). Look for errorlog in the separate virtual host section. For example, in the virtual hosts section below, the location of the error log is / var/www/xmodulo.com/logs/error_log.
Serveradmin webmaster@xmodulo.com documentroot / var/www/xmodulo.com/public_html servername www.xmodulo.com serveralias xmodulo.com errorlog / var/www/xmodulo.com/logs/error_log customlog / var/www/xmodulo.com/logs/access_log here, I believe you have a deeper understanding of "how to view the error log of the Apache server on the Linux system". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.