) [client 218.19.140.242] record the IP address of the client
4) File does not exist:/home/htmlfile/tradedata/favicon. ico first describes the error. for example, if the client accesses a file that does not exist or has a path error, the error 404 is returned.
II. practical log analysis script
After learning about the definitions of logs, I will share some log analysis scripts posted on the Internet.
1
-glibc-2.3.6-296746] #./install. sh
[Root @ lly ~] # Tar zxvf awstats-7.0.tar.gz-C/usr/local/src/
[Root @ lly ~] # Mkdir/etc/awstats is used to store the configuration file for site log analysis.
[Root @ lly ~] # Mkdir/var/lib/awstats is used to store Log Data Information
[Root @ lly ~] # Cd/usr/local/src/awstats-7.0/
[Root @ lly awstats-7.0] # cd/usr/local/src/awstats-7.0/tools/
[Root @ lly tools] # vim
Apache log records, records for later check, part excerpt from Apache Chinese manual, translation Jin BuA typical record format is as follows:LogFormat "%h %l %u %t \"%r\" %>s %b" commonCustomLog logs/access_log commonIt defines a particular record format string and gives it an alias common , where the "%" indicates that the server is replaced with some informati
Apache Default Site Directory settings
The Apache Default Web site Directory is in/var/www/html, we now want to change the site directory to/home/wwwroot/web1/htdocs, the following actions
To create a directory:Cd/homemkdir wwwrootCD Wwwrootmkdir Web1CD Web1mkdir HtdocsTouch index.php
Operation Steps:
1, vi/etc/httpd/conf/httpd.confFind the DocumentRoot "/var
pictures.Agent IP and real client IP are recorded in Apache logBy default, the log log format is:Logformat "%h%l%u%t \"%r\ "%>s%b \"%{referer}i\ "\"%{user-agent}i\ "" combined, where%h is the IP of the record visitor, if there is a layer of proxy in the front of the web, then this%h is actually the IP of the proxy mac
First, the Apache log is recorded by date
Found in the Pache configuration fileErrorLog Logs/error_logCustomlog Logs/access_log Common
Linux System configuration methods:
Change it toErrorLog "| /usr/local/apache/bin/rotatelogs/home/logs/www/%y_%m_%d_error_log 86400 480″Customlog "| /usr/local/apache/bin/rotatelogs/h
One, Apache log segmentationWith the increasing access to the Web site, by default, the Apache server generates a single log file will be more and more large, if the log is not split, then the
describes the error. For example, if the client accesses a file that does not exist or has a path error, the Error 404 is returned.
Ii. Practical log analysis script
After learning about the definitions of logs, I will share some log analysis scripts posted on the Internet.
1. view the number of apache Processes
Ps-aux | grep httpd | wc-l
2. Analyze the
Why do you want to split the log?
With the increase of website access, the log files generated by the Web server will become larger, if not split management, a single log file will become unusually large, not conducive to the comprehensive analysis of the log, monit
Preface
The first two articles talk about Aapche's access control and log analysis, this article will focus on Apache web optimization, such as: page compression, Web page caching.In the process of using Aapche as a Web server, we have to optimize the configuration
the eighth time zone, the difference is 480 minutes. 86400 indicates a day.Appendix rotatelogs descriptionRotatelogs logfile [rotationtime [offset] | [filesizeM]Option logfileThe reference name is the log file name. If logfile contains '%', it is considered as a string in strftime (3) format; otherwise, it is automatically added with the. nnnnnnnnnn Suffix in seconds. Both formats indicate the start time of the new log.RotationtimeInterval of
When configuring a Web server, we generally record the requested information and the information about the error.
ErrorLog "/home/zhangy/apache/www.test.com-error.log"Customlog "/home/zhangy/apache/www.test.com-access.log" common
With the above configuration, if you do not delete it regularly, I think these log files c
These days, due to the large differences in the statistical data of several different traffic statistical tools, I thought that we should analyze the apache access log, where the data should be the most authoritative. At the beginning, I wrote a simple analysis tool for emergency response and collected some simple data. The open-source Awstats should be a widely used and fully functional tool.
The installat
A. Log analysisIf the Apache installation uses the default configuration, two files will be generated in the/logs directory, respectively, Access_log and Error_log1). Access_logAccess_log for the access log, log all requests to the Apache server for access, its location and
[TOC]Apache user authentication 11.18 Apache user authentication
The user authentication function is when the user visits the website, needs to enter the user name password to be able to access. Some of the better total site and site backstage will be added user authentication, to ensure security.
1. Under the face of xavi.com site to do a full-site user authentication:vim /usr/local/apache2.4
ResourcesApache turn on logging, Access.logDescription of LogLevel instructions in Apache configuration fileApache Official document Apache logsAbout error LogWhen the project was tested on a test server today, a request returned a 500 status code, and the Web server was using Apache, and the
Apache, Nginx and other Web server log volume is huge, if not cut will lead to log files too large, not easy to clean up, and to log analysis collection work caused trouble. The following example is Apache
-wmp_4-s_4001790266.png "title=" 33.PNG "alt=" Wkiom1i-xaigfudxaaaawfvcwgu682.png-wh_50 "/>4. then, save the exit! Check the Apache configuration for errors, command:/usr/local/apache2/bin/apachectl –T ; Reload under Apache, command:/usr/local/apache2/bin/apachectl Graceful. 5. Log in to the Web page, refresh, and th
that the resulting log is passed to Rotatelogs, which is the tool for Apache's own cut logs. The function of-L is to calibrate the timezone to UTC, Beijing time. The last side of 86400, the unit is the second, meaning a day. The combined for double cited is the log format, which defines the log format in/usr/local/apache2/conf/httpd.conf.[[email protected] ~]# g
/3.1, NetBSD 1.5.2 platform.
All said that using the highest and latest security versions is critical to enhancing the security of the Apache Web server. Please the vast number of Apache server administrators to http://www.apache.org/dist/httpd/download patches to ensure that their Web server security!
Third, correctly
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.