Home >Backend Development >PHP Tutorial >Summary of using nginx
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)
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.