Today, found the picture verification code, always verify the wrong; The verification code picture is Call verification code system generation;The results looked at Nginx log access.logAppeared a lot at the same time, requested 2 times the picture verification code, and the request IP and agent is not the same;The situation is basically the same as: http://bbs.aliyun.com/simple/?t187538.html, and IP also c
found; Falling back on auto-configurationcreating temp directory/tmp/pv_day.root.20161228.022837.113256Running Step 1 of 1 ... Streaming final output from/tmp/pv_day.root.20161228.022837.113256/output ... "2016-12-27" 47783 "2016-12-26 " 299427Removing temp directory/tmp/pv_day.root.20161228.022837.113256 ...Standard input stdin mode, this way only accepts the first file # Python3 pv_day.py No configs found; Falling back on Auto-configurationcreating temp directory /tmp/pv_ Day.roo
:#Python3 top_10_spider.py access_all.log-20161227No Configs found; Falling back on auto-configurationcreating Temp directory/tmp/top_10_spider.root.20161228.091326.295972Running Step1 of 2... Running Step2 of 2... Streaming final output from/tmp/top_10_spider.root.20161228.091326.295972/output ...33542"Magpie-crawler"25880" Other"16578"Sogou web Spider"6383"Bingbot"3688"Baiduspider"1487"Yahoo! slurp"1096"Jikespider"731"Yisouspider"648"Baiduspider-image"470"Googlebot"Removing temp directory/tmp/
(1) Access_log is a Configuration item for the Ngx_http_log_module module. Syntax:access_log path [format [buffer=size] [gzip[=level] [flush=time] [if=condition]];Access_log off;Default:Access_log Logs/access.log combined;Context:http, server, location, if on location, limit_exceptNginx access_log and log_format configuration items:Log_format is used to define the log format and the name of the format. Lo
I have a daily cut on the server nginx log habit, so for every day to visit the major search engines, can always record some 404 page information, traditionally I just occasionally analyze the log, but for a lot of log information friends, manual to filter may not be an easy thing, This is not my own slowly research a
;}= = Match rule is, once the match is not executed, that is, allow 127.0.0.1 and 192.168.72.130 access; ==2. Testing the syntax and overloading the configuration[[emailprotected] vhost]# /usr/local/nginx/sbin/nginx -tnginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is oknginx: configuration file /
49, Nginx Anti-theft chain, nginx access control, Nginx parsing PHP-related configuration, nginx agentFirst, nginx anti-theft chainMust be combined with "do not log and expire" because
First, let's take a look at nginx log configurationLogs are advantageous for troubleshooting statistics. This article summarizes nginx log-Related configurations such as access_log, log_format, open_log_file_cache, log_not_found, log_subrequest, rewrite_log, and error_log.Nginx has a flexible logging mode. Each con
Mode one: Nginx cronolog log partition configuration document, according to the following method, split the Nginx access log every minute.1. nginx Log configuration access_log access_lo
Nginx default log is unified write to the installation directory under the log, access log is Access.log, error log is Error.log
And does not provide a configurable place, for the production environment, the
Nginx anti-theft chain first into the/usr/local/nginx/conf/vhost/directory, edit the configuration file vim Test.com.confvim test.com.conf then the contents of the following location ~ ^.+. (Gif|jpg|png|swf|flv|rar|zip|doc|pdf|gz|bz2|jpeg|bmp|xls) ${expires 7d; valid_referers None blocked Server_names . test.com; if ($invalid _referer) {return 403;} Access_log off
One: Nginx anti-theft chainAdd the following code in the server section of nginx.confLocation ~ ^.+. ( Gif|jpg|png|swf|flv|rar|zip|doc|pdf|gz|bz2|jpeg|bmp|xls) $ {Valid_referers None blocked Server_names taobao.com . baidu.com. google.com. cn . soso.com; The sites for these domain names are not hotlinking.if ($invalid _referer) {#return 403;Rewrite ^/http://www.example.com/nophoto.gif;}}Note: If location is already added to the previous configuration.
First, nginx anti-theft chain
The configuration is as follows and can be combined with the above configuration.
vim /usr/local/nginx/conf/vhost/test.com.conflocation ~* ^.+\.(gif|jpg|png|swf|flv|rar|zip|doc|pdf|gz|bz2|jpeg|bmp|xls)$ //location后面的*是忽略大小写{ expires 7d; valid_referers none blocked server_names *.test.com ; //白名单 if ($invalid_referer) { return 403; } acce
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.