Home  >  Article  >  Backend Development  >  Summary of using nginx

Summary of using nginx

WBOY
WBOYOriginal
2016-07-28 08:27:481521browse

Follow this article at http://cxshun.iteye.com/blog/1535188 and do it again today
Some problems occurred:

1 CreateDirectory() “D:Program Filesnginx-1.11.2/temp/client_body_temp” failed (3: The system cannot find the path specified)
Reason: It seems that there is no permission to create the folder, which is ominous (you can help create it)
Solution: In the http { } of the nginx.conf configuration file, add the following three lines (make sure there is a corresponding folder under your temp folder)

<code> client_body_temp_path temp/client_body_temp;
    proxy_temp_path temp/proxy_temp;
    fastcgi_temp_path temp/fastcgi_temp;</code>

2 CreateFile() "D:nginx-1.11.2/ html/favicon.ico” failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: “GET /favicon.ico HTTP/1.1”, host: “localhost”, referrer: "http://localhost/"
Reason: ominous
Solution: Close the log when favicon.ico does not exist

<code>location = /favicon.ico {
log_not_found <span>off</span>;
access_log <span>off</span>;
}</code>

3 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ) while connecting to upstream, client: 127.0.0.1, server: localhost, request: “GET /tomcat.css HTTP/1.1”, upstream: “http://[::1]:8080/tomcat.css“, host : “localhost”, referrer: “http://localhost/”
The speed is slow and the above error occurs
Reason: ominous
Solution: Change localhost to ip
Or add 127.0.0.1 localhost

to the hosts file and set the connection time
proxy_connect_timeout 300; #nginx connection timeout with the backend server (proxy connection timeout)
proxy_send_timeout 300; #Backend server data return time (proxy send timeout)
proxy_read_timeout 600; #After the connection is successful, the backend server response time (proxy reception timeout)

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above has introduced a summary of the use of nginx, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Nginx reverse proxyNext article:Nginx reverse proxy