The Web Access log (Access_log) records the access behavior of all external clients to the Web server, including important information such as the client IP, the access date, the URL resource accessed, the HTTP status code returned by the server, and so on.A typical Web Access
I. Install apache1.1 compile and install Apache Web Services650) this.width=650; "style=" border-bottom:0px;border-left:0px;border-top:0px;border-right:0px; "title=" image " Border= "0" alt= "image" Src= "Http://img1.51cto.com/attachment/201408/19/8809812_140843431723NF.png" height= "192"/ >--prefix: Specifies that the HTTPD service is installed in that directory, such as/USR/LOCAL/HTTPD--ENABLE-SO: Enable dynamic load module support, httpd with the a
relatively troublesome, but the idea is still all the two-level domain name requests to the same server processing, and then through the virtual host for different domain requests to assign different processing paths.1. Assign subdomains to the primary domain by the cloud resolution provider, and then bind the host IP to the sub-domain name.2. Modify the httpd.conf file to remove the comments in front of the Include conf/extra/httpd-vhosts.conf.3. Note All the content in the httpd-vhosts.conf f
I. Access control for HTTPD services
You can add access authorization to specific site directories, restrict client address restrictions, user authorization, and both control methods are applied to the directory area in the httpd.conf configuration file
1. Client Address Restrictions
Allows client access based on the host name or IP
time-wait sockets to be re-used for new TCP connections, which defaults to 0, which means shutdown;Net.ipv4.tcp_tw_recycle = 1Represents a quick recycle of time-wait sockets on a TCP connection, which defaults to 0, which means shutdown.Net.ipv4.tcp_fin_timeout = 30Indicates that if the socket is closed by a local requirement, this parameter determines when it remains in the fin-wait-2 state.Net.ipv4.tcp_keepalive_time = 1200Indicates the frequency at which TCP sends keepalive messages when Kee
mechanism is no longer supported in 2.4.
Test:
To set the VirtualHost logging mechanism:
Edit the virtualhost.conf file to add logging capabilities:
ServerName www.izyno.comDocumentRoot "/www/izyno.com"Customlog/var/log/httpd/izyno.com/access_log combined #添加日志记录, you'll need to create a new izyno.com file.Options NoneAllowOverride authconfigAuthType BasicAuthName "My Site."AuthUserFile "/ETC/HTTPD/.HTPASSWD"Require Valid-
Original: http://dason.blog.51cto.com/658897/505312
Apache Virtual Host configuration (multiple domains access multiple directories)
To facilitate the management of the virtual host, I decided to use one method, that is, to modify the httpd-vhosts.conf file.
The first step is to make the extension file httpd-vhosts.conf effective:1. Open apache/conf/httpd.conf F
Objective:
Combining Apache and Tomcat enables both Java Engineering and PHP engineering to share 80 ports, and when you visit a Web site, you don't need to add a port number to the address bar.
Environment Description:
Linux CentOS 32-bit
Apache 2.2.2
Tomcat 7.0.37
preparatory work:
Download mod_jk.so
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/
Open the link to find the appr
Apache Virtual Host configuration (multiple domain names to access multiple directories) in order to facilitate the management of the virtual host, I decided to use one method, that is, modify the httpd-vhosts.conf file. The first step is to make the extension file httpd-vhosts.conf effective:1. Open apache/conf/httpd.conf File2. Find # Include Conf/extra/httpd-v
Tags: Apache log jump authenticationMay 29 Task11.18 Apache user authentication11.19/11.20 Domain Jump11.21 Apache Access Log11.18 Apache user authenticationThe so-called user authentication is to enter the 80 port corresponding t
Access controlThe following is for Apache virtual host configurationSite access, limited to the specified IP. Only intranet login is allowed and no other address is allowed to log in.order definition sequence, deny first, then execute the following deny from all, and then do allow, and then do let from 127.0.0.1, which
Linux server load, process and other information can be viewed through the top command. And how does Apache behave in real-time? "Tail-f" log file? It's a good way, but it's too tired!So, thank Chris Elsworth for providing us with a apachetop command like the top command! Website address: http://www.webta.org/projects/apachetop/Apachetop can view the most recent time and
} ' log_file | Sort-n5. See which pages a certain IP has accessed:grep ^111.111.111.111 log_file| awk ' {print $1,$7} '6, remove the search engine statistics on the day of the page:awk ' {print $12,$1} ' log_file | grep ^\ "Mozilla | awk ' {print $} ' |sort | Uniq | Wc-l7. View June 21, 2009 14 O'Clock How many IP accesses are in this one-hour period:awk ' {print $4,$1} ' log_file | grep 21/jun/2009:14 | awk ' {print $} ' | Sort | Uniq | Wc-l8-------------------------------------------------[
("Tutorial-list", "Mongodb");$redis->lpush ( "tutorial-list" , "Mysql" ); //get stored data and output $arList = $redis ->lrange ( "tutorial-list" , 0 , 5 echo "Stored string in Redis" ; Print_r $arList ?> Execute the script with the output as:Connection to server sucessfullyStoredstringin redisredisMongodbMysql
Redis PHP Keys InstancePhpConnect to a local Redis service$redis= New Redis (); $redis ->connect (, 6379); "Connection to server sucessfully" ; //get data and
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
.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
Knowledge section1. Brief description:By modifying Apache's http.conf configuration file, you can provide client addresses, user authorization, and two access restrictions to the Apache service. This avoids security issues such as using the Awstats log Analysis system to obtain site access information.2, what is the cl
1, the number of IP direct output display:Cat Access_log_2011_06_26.log |awk ' {print $} ' |uniq-c|wc-l2, the number of IP output to the text display:Cat Access_log_2011_06_26.log |awk ' {print $} ' |uniq-c|wc-l > Ip.txtSummary: If a single access log is larger than 2G, the system load will rise when viewed with this c
as follows:
# Tsql-S SqlServer Server IP address-p port number-U user name-P Password
After you log in correctly, the following prompt appears:
>
Input
> Select * from table name; press ENTER
> Go; enter
The queried content is displayed.
0.2 Access Oracle through command lines
After InstantClient is installed, download a sqlplus (small) file and decompress it in the same directory. Add this directory to PA
Apache Log analysis can get a lot of useful information, now to try the most basic, get the most access to the top 10 IP address and number of visits.Since it is statistical, awk is essential, useful and efficient.The command is as follows:awk ' {a[$1] + = 1;} END {for (I in a) printf ("%d%s\n", a[i], i);} ' log file |
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.