简体   繁体   English

为什么 nginx access.log 失败?

[英]Why is nginx access.log failing?

I try to use nginx on manjaro by typing up nginx on the terminal, but this comes up: open() "/var/log/nginx/access.log" failed (21: Is a directory) .我尝试通过在终端上输入 nginx 来在nginx上使用 nginx ,但这出现了: open() "/var/log/nginx/access.log" failed (21: Is a directory) I ran sudo nginx -t and sudo systemctl start nginx.service and they both said the same thing.我跑了sudo nginx -tsudo systemctl start nginx.service他们都说了同样的话。 Is there something I can do to remedy this issue?我能做些什么来解决这个问题吗? Also to add, I used systemctl status nginx.service and it says under Loaded: nginx.service and vendor preset were disabled.另外要补充的是,我使用了systemctl status nginx.service并在Loaded: nginx.servicevendor preset已禁用。 Is this important?这很重要吗?

You actually made access.log into a directory.您实际上将 access.log 放入了一个目录。 Try rm -rf /var/log/nginx/access.log and then nginx -t and restart NGINX afterwards尝试rm -rf /var/log/nginx/access.log然后nginx -t然后重新启动 NGINX

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM