编程技术分享平台

网站首页 > 技术教程 正文

nginx错误汇总(nginx499报错)

xnh888 2024-09-19 06:22:45 技术教程 20 ℃ 0 评论

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

---

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

-----------------------------------------------

```

log_formatmain'$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环境下,错误内容来自浏览器、终端等。

3.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有问题,端口不正确。**

4. 500 Internal Server Error

改一下项目根路径


微信公众号,技术很有趣(ID:xiaoyaotan2016)

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表