What we're saying here about Apache's log is the thing about the access log! To prevent log files from being too large, we archive the logs on a daily basis!Vim/usr/local/apache2/conf/extra/httpd-vhosts.confOpen the virtual machine configuration file and remove the # number in front of the following two linesErrorlog "
In the Apache access log, all actions are logged by default. Includes some local static small pictures, so the log becomes bloated.At this point we can specify that the log of the specified file type is not logged, so that only the log
logresolveis a post-processing program that resolves an IP address in the Apache access log. To minimize the impact on the name server, Logresolve has an extremely autonomous internal hash table cache, so that each IP value is parsed only once when it is first read from the log file.This program obtains the
log analysis of Apache combined format After visiting the http://211.100.97.250/zabbix/today, I looked at the visit log to see what Let's take a look at the log format defined in the Apache configuration file:Customlog "Logs/access_log" combinedLogformat "%h%l%u%t \%r\"%>s%
Apache Log why not record Baidu Spider. This problem is believed that many beginners have basically met, the Apache log default is not to record Baidu Spiders, Google and the major search engine spider program, but only need to modify a place can solve the problem, now directly to the answer to write out:For example, o
1. See how many IP accesses are available on the day:awk ' {print '} ' log_file|sort|uniq|wc-l2. View the number of times a page has been accessed:grep "/index.php" Log_file | Wc-l3. See how many pages each IP visited:awk ' {++s[$1]} END {for (a in S) print a,s[a]} ' log_file4, the number of pages per IP access from small to large sort:awk ' {++s[$1]} END {for (a in S) print s[a],a} ' log_file | Sort-n5. See which pages a certain IP has accessed:grep
1. # vim/usr/local/apache2/conf/extra/httpd-vhosts.confModify the log file to:Errorlog "Logs/test.com-error_log" error logCustomlog "Logs/test.com-access_log" combined access log relative pathApache's Common log format definition:# vim/usr/local/apache2/conf/httpd.conf# The following directives define some format nickn
parenthesis inside a regular expression.Well, the cookie in the Nginx log is probably the way it is.ApacheNginx configuration on the network more articles, but Apache relatively few. Explain my method, the principle is the same, but there are some differences in grammar.Apache has preset a way to get a cookie field:%{varname}c, so it's relatively simple to configure.Edit the httpd.conf to find the followin
1. According to the Apache log, get the maximum number of concurrent records in the second day
tail-10000./demo.fdipzone.com_access_log.2014-01-16_01 | Cut-d "["-F 2 | awk ' {print $} ' | Sort | uniq-c | Sort-nr | Head
tail-10000./demo.fdipzone.com_access_log.2014-01-16_01 | Awk-f "[" ' {print $;} ' | awk ' {print $} ' | Sort | uniq-c | Sort-nr | Head
Run Result:
fdipzone@ubuntu:~$ tail-100000./demo.fd
#vim/usr/local/apache2/conf/extra/httpd-vhosts.confOpen two lines of comments (Errorlog and Customlog), generate access and errors corresponding to the log, of course, you can also modify the default generated file nameThen change the last face of Customlog to combined, because I use the combined type#apache1 Restart #重启一下apache服务Go to refresh the Web page (gener
This article is from the network security technology blog
Apache logs are generally stored in the/var/apache2 directory (for Windows, In the installation directory log folder)
If you change the log address, don't look at it...
========================================================== ========================================
The following is a
executed correctly12.2 Break,continue,exit Function (summary above)In the while and forBreak is used to exit the current loop statement, thinking that the loop endsContinue is used to exit the current loop hierarchy and continue the next loopExit user exits the script directly, not executing the shellDeveloping a shell script to temporarily configure multiple Ip,ip for the server is 192.168.116.150-192.168.116.160, but does not create 192.168.116.155#!/bin/bash#ip:192.168.116.150-192.168.116.16
Recently looking for information in this regard:
1, view the Apache process:PS aux | grep httpd | Grep-v grep | Wc-l
2, view TCP connections for port 80:Netstat-tan | grep "established" | grep ": 80″| Wc-l
3, through the log to view the number of IP connections, filter repeat:
Cat Access_log | grep "24/jul/2007″| awk ' {print $} ' | Sort | uniq-c | Sort-nr
4, the IP connection of the day the highest IP
1. Take access to the top 10 IP addressCat Access.log|awk ' {print '} ' |sort|uniq-c|sort-nr|head-10Cat Access.log|awk ' {counts[$ (11)]+=1}; END {for (URL in counts) print Counts[url], url} '2. Most visited files or pages, such as get top 10Cat Access.log|awk ' {print $11} ' |sort|uniq-c|sort-nr|head-103. Output transmission of the largest number of EXE files, in the analysis of the download station will be usedCat Access.log |awk ' ($7~/.exe/) {prin
httpdchkconfig --level 35 httpd on
Step Two: Configure and start httpd service 1. Establish a soft link for easy management of configuration files
ln -s /usr/local/httpd/conf/httpd.conf /etc/httpd.confvim /etc/httpd.conf ServerName www.benet.com //设置网站名称 Listen 192.168.10.10:80 //监听web服务器本机的IPV4地址 #Listen 80 //不监听本机IPV6地址2. Check the syntax of the configuration fileUse the Apachectl command with the "-t" option to check the configuration content and show "Syntax OK" stating
Server.
The middle layer coordinates the interaction and resources between the client layer and the database layer. The database layer is Oracle9i and can be accessed through Oracle Net.
The following is a detailed introduction.
1. Start the HTTP server on the server
Start HTTP server powered by Apache
2. Access the HTTP server through a browser
Generally, our port and protocol are set by def
Tomcat access log Source Code Analysis and Application
Tomcat logs can be divided into two types:
1. Access logs record the access time, source, data, and other relevant information (all information available for ServletRequest can be recorded );
2. The running log records t
minutes. 86400 is a 1-day representation.Attached rotatelogs InstructionsRotatelogs logfile [rotationtime [offset]] | [Filesizem]OptionsLogFileIt adds the base name to the log file name. If the logfile contains '% ', then it is treated as a format string for the strftime (3); otherwise, it is automatically appended with the. nnnnnnnnnn suffix in seconds. Both formats represent the time when the new log beg
Problem Description: Apache does not work properly after restarting the computer due to the deletion of the log below/private/var/log.The purpose of deleting log is: When the system is used for a long time, the log file occupies dozens of g of hard disk capacity.The result: Apache
The Web access log (access_log) records the access behaviors of all external clients to the Web server, including the Client IP address, access date, accessed URL resources, HTTP status codes returned by the server, and other important information.A typical Web access
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.