在 unbuntu 上编译源码安装 nginx ,安装后启动失败,错误信息如下
nginx[12285]: nginx: [emerg] mkdir() "/var/lib/nginx/tmp/client_body" failed (2: No such file or directory)
nginx[12285]: nginx: configuration file /etc/nginx/nginx.conf test failed
systemd[1]: nginx.service: Control process exited, code=exited status=1
systemd[1]: Failed to start A high performance web server and a reverse proxy server.
systemd[1]: nginx.service: Unit entered failed state.
systemd[1]: nginx.service: Failed with result 'exit-code'.
请问如何解决?
不是说了吗,找不到这个文件或目录,你去看一下有没有这个目录,没有的话创建一下就好了
用 mkdir -p /var/lib/nginx/tmp/client_body
命令创建文件夹就可以了