前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Nginx常见错误

Nginx常见错误

作者头像
城市中的游牧民族
发布2019-02-21 10:50:03
1.5K0
发布2019-02-21 10:50:03
举报
文章被收录于专栏:前端真相前端真相

以下错误产生于windows10 环境下,错误内容来自nginx错误日志error.log。


1.nginx: [emerg] unknown log format “main” in

log_format		main	'$remote_addr - $remote_user [$time_local] $request '
					'"$status" $body_bytes_sent "$http_referer" '
					'"$http_user_agent" "$http_x_forwarded_for" "$gzip_ratio"';

正常启动:signal process started

2.2018/08/24 17:42:10 [error] 8040#16604: OpenEvent(“Global\ngx_stop_19392”) failed (2: The system cannot find the file specified)

问题背景:执行自己编写的.bat脚本报出的问题。脚本代码如下:

d: 
cd nginx
nginx -s stop
start nginx

原因:nginx未启动就执行nginx -s stop命令。 解决方法:可以不解决,不影响nginx的正常启动,或者修改脚本。

以下错误产生于MacBook环境下,错误内容来自浏览器、终端等。

403 Forbidden

如果项目路径包含在Users/me下,使用chmod授权/Users/me即可。 参考链接:https://serverfault.com/questions/218583/403-forbidden-error-on-mac-osx-apache-and-nginx What are the permissions on /Users/me, /Use:s/me/Documents and /Users/me/Documents/workspace? All of the folders in the tree need to be readable by the nobody user.

另外,可能是前端配置的请求url有问题,端口不正确。

500 Internal Server Error

改一下项目根路径

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018年06月22日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 以下错误产生于windows10 环境下,错误内容来自nginx错误日志error.log。
  • 1.nginx: [emerg] unknown log format “main” in
  • 2.2018/08/24 17:42:10 [error] 8040#16604: OpenEvent(“Global\ngx_stop_19392”) failed (2: The system cannot find the file specified)
  • 以下错误产生于MacBook环境下,错误内容来自浏览器、终端等。
  • 403 Forbidden
  • 500 Internal Server Error
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档