How to query Apache logs using SQL statements in Linux
Linux has a notable feature. Under normal circumstances, you can analyze system logs to understand what is happening in your system or what is happening. Indeed, system logs a
-10-01T00:00:00‘ORDERBYsource;Example 2: Small to large displays the request size (bytes) processed by a single client.View Source print?SELECTsource,SUM(size),ASNUMBERFROMlogsGROUPBYsourceORDERBYNumberDESC;Example 3: Save the database as [filename] in the current directory.Save [FileName]This avoids the processing time used by the load command to parse the log.Example 4: Load the database after re-entering aSQL.restore [filename]Example 5: Returns the error condition recorded in the access log.
Linux notes: apache configuration and log-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Alibaba Cloud handled apache configuration today:
1. Set Environment Variables
2. Handling leeching Methods
3. Separate a
Article Title: Linux Server: Apache configuration and logs. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. Set Environment Variables
Linux under the Cronolog partition Apache log, big god mo shoot Bricks, rookie left a record, small white please silently reproduced. Not even the Linux login and VI edit, please close this page silently. Into the chaseDescription: The light green bottom for the Linux command, the other for the note description.Downloa
updated.$ Apt-Get check [enter]
パッケージをアップグレードしてみる$ apt-get upgrade [Enter]
[Y/n/?] When there are too many other users$ Y [enter]Setting up Linux-libc-dev success
Apacheをインストールする$ apt-get install apache2 [Enter]
[Y/n/?] When there are too many other users$ Y [enter]When there are already too many threads, there are already too many threads starting to parse, setting up apache2 then indicates th
After creating the Amazon CentOS7 Ami EC2 found that the Yum command was executed in order to install Apache.
From the following results, the Apache2.4.6 has been installed.
# yum Install httpdLoaded Plugins:fastestmirrorLoading mirror speeds from cached hostfile* base:www.ftp.ne.jp* epel:ftp.jaist.ac.jp* extras:www.ftp.ne.jp* rpmforge:ftp.riken.jp* updates:www.ftp.ne.jpPackage httpd-2.4.6-18.el7.centos.x
How to query Apache server logs using MySQL statements: mysqlapache
Linux has a notable feature. Under normal circumstances, you can analyze system logs to understand what is happening in your system or what is happening. Indeed, system logs are the first-hand resource requi
In Linux, Nginx logs are regularly cut and logs generated several days ago are deleted.
Nginx logs are classified into access logs. log and error. log, where access. log records users, pages, user browsers, ip addresses, and other access information. error. log records serve
Article Title: website log processing tool Awstats: Processing Multiple Apache logs. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
In linux
:30 21 * * * means 21:30 per night45 4 1,10,22 * * = 4:45 per month for 1, 10, 22ndnow is the official code that compresses the logs for one months and deletes them .Create a new. sh file under Logs's sibling directory for example: logzip.shContent:Echo"Please wait ..."m= ' date-d"1 months ago"+%y-%m ' #获取上个月的yyyy-date string in mm format m2= ' date-d"1months ago"+%y%m ' Index=0F= ' Ls/home/hls/apache-tomca
127.0.0.1
The last step is to update the configuration file, which can be done by executing the following command,
/Usr/share/awstats/wwwroot/cgi-bin/awstats. pl-config = bkjia.com-update
Check the awstat page
To test/check the awstat page, Open a Web browser and enter the following URL in the address bar,Https://bkjia.com/awstats/awstats.pl? Config = bkjia.com
Please note that we can also schedule a cron job to regularly update awstat. Example of a crontab
$ Crontab-e0 1 ***/usr/share/awstats
-l logs/access-% Y-% m-% d. log 86400 Prime; common This is simple. Just put it in. The error log is shown below.This section describes windows users. linux uses cronolog to separate apache logs.The cronolog tool can be run in linux or on a windows host. The installation method of
.jpg "width=" 650 "style=" Padding:0px;margin:0px;vertical-align:top;border: none; "/>Where commands are in absolute path, Rotatelogs is the split tool,%y%m%d time is split units, 86,400 seconds for one day. Setenv is custom, the following access log can invoke env, which means that files ending in gif, JPG, and so on are not recorded.Then we detect and load Apache from the new[Email protected] abc]#/usr/local/apache2/bin/apachectl-tsyntax ok[[email p
execute 301 for a permanent jump, 302 for a temporary jump, We usually use 301. After changing the configuration file we need to detect the syntax and reloadThen we also need to see if the LoadModule rewrite_module modules/mod_rewrite.so is loaded in the Apache configuration file, and if it is commented, then we need to reload it.[Email protected] ~]#/usr/local/apache2.4/bin/apachectl-m |grep rewriteRewrite_module (Shared) (loaded successfully)If mo
Regular Expression User Guide
10Linux system wget command for downloading files
11 Linux ps command practice
12. Functions of the df command you do not know in Linux
1320 Linux Command Interview Questions and answers
144 most popular Linux platform open-source Editor
Solution to errors in using direction keys in the 1
How to thoroughly Delete WDCP logs in linux: linuxwdcp
Both apache and nginx have default switch logs. One is normal access logs and the other is error logs,Directory in/Www/wdlinux/nginx-1.0.15/
On the Linux server, configure the WEB application logs to print to the specified file server environment as RedHatLinux, and run Apache + Tomcat on it, the container runs a small e-commerce website of our company. The log information in the original project is directly followed by Tom...
On the Linux server, configure
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.