Mac Nginx nginx: [emerg] mkdir() “/usr/local/var/run/nginx/client_body_temp“ failed ...

简介: Mac Nginx nginx: [emerg] mkdir() “/usr/local/var/run/nginx/client_body_temp“ failed ...

  • 在启动 Nginx 的时候报错:


nginx: [emerg] mkdir() "/usr/local/var/run/nginx/client_body_temp" failed (2: No such file or directory)


  • 错误原因:未找到 nginx 文件夹中的 client_body_temp 文件。


  • 打开路径 /usr/local/var/run, 如果 run 里面没有 nginx 文件夹则新建一个 nginx 文件夹,如果有或者新建了文件夹,那需要命令生成配置文件。


08cd6b19600a70c60ad4537406599592_8ce23112ed56a19177c6e29e4470b617.png

bc70d426de928f6d071aff22fee696c2_4fbf54945512f4fe3c05c849b364dee1.png



  • 运行命令: $ nginx 或者 $ sudo nginx 启动命令都行,sudo 是允许修改等等权限开放。


efd736d59b102c5dd6af5150d3ac5a2a_c76d284b8f85d415ce57c5c03bc9b85f.png


  • 如果重启服务器报错


  • nginx: [emerg] bind() to 0.0.0.0:8083 failed (48: Address already in use)

  • nginx: [error] open() “/usr/local/var/run/nginx.pid”

相关文章
|
7月前
|
关系型数据库 MySQL 应用服务中间件
Mac PHP-Nginx-Mysql 本地开发日常启动流程
Mac PHP-Nginx-Mysql 本地开发日常启动流程
42 1
|
7月前
|
开发框架 应用服务中间件 PHP
Mac Nginx 关联 php 详细配置以及常见错误
Mac Nginx 关联 php 详细配置以及常见错误
143 1
|
2月前
|
应用服务中间件 网络安全 nginx
解决nginx:[emerg]unknown directive ssl错误
解决nginx:[emerg]unknown directive ssl错误
135 0
|
7月前
|
应用服务中间件 nginx
Mac Nginx nginx: [error] open() “/usr/local/var/run/nginx.pid“
Mac Nginx nginx: [error] open() “/usr/local/var/run/nginx.pid“
59 1
|
2月前
|
应用服务中间件 nginx iOS开发
mac+alfred中的Workflow实现快速格式化nginx配置
mac+alfred中的Workflow实现快速格式化nginx配置
26 0
mac安装homebrew失败:Failed to connect to raw.githubusercontent.com port 443: Connection refused
mac安装homebrew失败:Failed to connect to raw.githubusercontent.com port 443: Connection refused
|
3月前
|
存储 应用服务中间件 nginx
【各种问题处理】nginx报错nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
【1月更文挑战第13天】【各种问题处理】nginx报错nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
|
3月前
|
应用服务中间件 nginx C++
nginx: [emerg] unknown directive “rtmp“ in ./../conf/nginx.conf:16
nginx: [emerg] unknown directive “rtmp“ in ./../conf/nginx.conf:16
|
4月前
|
iOS开发 MacOS
mac AnyConnect 连接报错 Posture Assessment Failed: Hostscan Initialize error.
mac AnyConnect 连接报错 Posture Assessment Failed: Hostscan Initialize error.
mac AnyConnect 连接报错 Posture Assessment Failed: Hostscan Initialize error.
|
6月前
|
应用服务中间件 网络安全 nginx
nginx开启ssl报错: [emerg] "server" directive is not allowed here ...
nginx开启ssl报错: [emerg] "server" directive is not allowed here ...
100 0