Nginx 常见问题

来源:互联网 发布:大数据开发工程师面试 编辑:程序博客网 时间:2024/05/25 21:34

如何判断nginx是否启动成功

 输入命令 tasklist /fi "imagename eq nginx.exe"   看到以下信息说明启动成功了


 端口占用问题

 我的配置文件里服务侦听的是 80 端口,由于机器上部署了IIS,80端口被默认站点占用,把站点关闭就可以了,这个问题在错误日志里记录是这样的。

 

2015/01/15 10:44:12 [emerg] 8800#5988: bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)

 

碰到类似的错误,请确认端口是否被占用或被防火墙屏蔽

 

Nginx所在目录有中文

错误日志大致输出一下内容

2015/01/15 11:55:55 [emerg] 5664#8528: CreateFile() "E:\软件\nginx-1.7.8/conf/nginx.conf" failed (1113: No mapping for the Unicode character exists in the target multi-byte code page)

启用缓存时报错

2015/01/15 17:26:50 [emerg] 17068#20356: shared zone "cache_one" has no equal addresses: 02CF0000 vs 02A200002015/01/15 17:26:50 [alert] 11536#11228: worker process 17068 exited with code 1

我一直没有找到解决的方法,有人说重启服务,或者缓存设置大一点就可以了,我试了一下没有用的,只能认为windwos下无解了。

: The cache and other modules which require shared memory support do : not work in Windows Vista and later due to address space layout : randomization being enabled in these Windows versions.
参考链接:http://serverfault.com/questions/597242/having-problems-setting-up-ssl-with-nginx
0 0
原创粉丝点击