nginx使用小结

php中文网
发布: 2016-07-28 08:27:48
原创
1694人浏览过

今天照着 http://cxshun.iteye.com/blog/1535188 这篇文章 做个一遍
出现了一些问题:

1 CreateDirectory() “D:\Program Files\nginx-1.11.2/temp/client_body_temp” failed (3: The system cannot find the path specified)
原因:好像是没有权限创建文件夹具体不祥(解决你帮它创建)
解决:在nginx.conf配置文件的http { }内,增加以下三行语句(要确定你的temp文件夹下有对应的文件夹)

 client_body_temp_path temp/client_body_temp;
    proxy_temp_path temp/proxy_temp;
    fastcgi_temp_path temp/fastcgi_temp;
登录后复制

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/”
原因:不祥
解决:关闭favicon.ico不存在时记录日志

location = /favicon.ico {
log_not_found <span>off</span>;
access_log <span>off</span>;
}
登录后复制

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/”
速度慢还出现以上错误
原因:不祥
解决:将localhost 改成 ip
或者在 hosts 文件 加上 127.0.0.1 localhost

同时设置一下在连接时间
proxy_connect_timeout 300; #nginx跟后端服务器连接超时时间(代理连接超时)
proxy_send_timeout 300; #后端服务器数据回传时间(代理发送超时)
proxy_read_timeout 600; #连接成功后,后端服务器响应时间(代理接收超时)

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

以上就介绍了 nginx使用小结,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号