directory, nginx.conf the main profile, Nginx.conf.default as the profile template, index.html as the default Web page, Nginx is the startup command.650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/A6/wKioL1XqrZyDMa8rAAIUoVMCveQ525.jpg "title=" Qq20150905164632.png "alt=" Wkiol1xqrzydma8raaiuovmcveq525.jpg "/>The default Nginx port is 80, to see if there are other processes that occupy 80 port
Nginx Log recently a large number of access Favicon.ico unable to find 404 error log, small weave feel very affected server performance, for a high concurrent server each error will affect performance, so need to turn off access t
Log series-Nginx log analysis Nginx logs can be divided into two types: User access logs and Nginx error logs. Nginx error logs generally record PHP running errors. [Plain] error_log/us
Nginx log format and custom log Configuration
Nginx logs include access logs and error logs.
The access log records the users, pages, user browsers, ip addresses, and other
default, there are ready-made templates, ready-made key values, we need to do is just a new. my.cnf file in/var/lib/zabbix, which reads as follows:[Client]host=127.0.0.1port=1036User=rootPassword=rootWeb site Log MonitoringConfigure log formatWe assume that the Web server you are using is nginx, and we add a log forma
In any project, the log is a very important module, whether it is the problem of positioning or day-to-day information management, can not be separated from his
In Nginx, the Ngx_errlog_module module is dedicated to processing Nginx log information and is one of the Nginx c
1. configuring Nginx Automatic Log cutting is different from ApacheHTTPServer (Apache). Apache can redirect the log output through pipelines to enable automatic log cutting. Nginx in the current version has not been the same as Apache, using parameters such as % YY to create
Log Series-Nginx log analysis Nginx logs can be divided into two types: user access logs and Nginx error logs. Nginx error logs generally record PHP running errors. [Plain] error_log/us
Nginx log and monitoring
Address: http://nginx.com/resources/admin-guide/logging-and-monitoring/Logging and Monitoring
Log and monitoring
This section describes how to configure logging of errors and processed requests, as well as how to use the runtime monitoring service of NGINX and
The nginx log cutting script is automatically uploaded to the log server. 1 nginx is installed in yum mode. The system automatically generates the nginx log cutting plan task in/etc/logrotate. d/
Nginx has a very flexible logging mode. Each level of configuration can have its own independent access logs. The log format is defined by the Log_format command. The ngx_http_log_module is used to define the request log format.I. Detailed logging configuration1. Access_log InstructionsSyntax: access_log path [format [
A about Nginx log
We observe the nginx.conf in the Nginx installation directory
You can see similar information like this
#access_log Logs/host.access.log Main;
This indicates that the server, its access log file is Logs/host.access.log,
Format used for "main" format.
In
Nginx Anti-theft chainEdit a virtual host configuration filevim /usr/local/nginx/conf/vhost/test.com.confAdd the following in the configuration filelocation ~* ^.+\.(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
/usr/local/nginx/passwd.db; 7 ~]#nginx-t8 ~]#service Nginx Reload(2) Client-based access controlNginx Client-based access control is simpler than Apache, the rules are matched from top to bottom, if the match is stopped, no longer matches downFormat:Deny IP/IP segmentAllow
(web), and other machines cannot
Method: a proxy web server can be used for Internet access, and other machines can connect to it. Nginx
The Nginx configuration is as follows:
Server {
Resolver x. x;
Listen 82;
Location /{
Proxy_pass http: // $ http_host $ request_uri ;}}
Note: 1. there cannot be hostname2. there must be a resolver, that is, dns, that is, the
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.