暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

处理nginx报错[emerg] CreateDirectory() "temp/client_body_temp"failed

巴韭特锁螺丝 2022-07-14
1010

1、nginx报错信息

    C:\nginx-1.8.1>nginx -t
    nginx: the configuration file C:\nginx-1.8.1/conf/nginx.conf syntax is ok
    nginx: [emerg] CreateDirectory() "C:\nginx-1.8.1/temp/client_body_temp" failed (3: The system cannot find the path specified)
    nginx: configuration file C:\nginx-1.8.1/conf/nginx.conf test failed

    2、问题解决

    nginx的文件夹新建temp文件夹 -> 新建client_body_temp文件夹启动nginx,解决问题。

    再次校验配置正常:

      C:\nginx-1.8.1>nginx -t
      nginx: the configuration file C:\nginx-1.8.1/conf/nginx.conf syntax is ok
      nginx: configuration file C:\nginx-1.8.1/conf/nginx.conf test is successful
      temp文件夹的作用
      temp中的文件夹是用户缓存的目录配置。
      client_body_temp 主要是用于控制用户上传,超过指定大小client_max_body_size时候,缓存的目录。
      proxy_temp 主要用户作后端代理http模式,超过指定大小proxy_temp_file_write_size,缓存的目录。
      fastcgi_temp, 和proxy_temp实际一样,只不过是在fastcgi的这种代理模式场景。

      文章转载自巴韭特锁螺丝,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

      评论