“配置文件/etc/nginx/nginx.conf测试失败":我怎么知道为什么会这样? [英] "configuration file /etc/nginx/nginx.conf test failed": How do I know why this happened?

查看:4803
本文介绍了“配置文件/etc/nginx/nginx.conf测试失败":我怎么知道为什么会这样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是nginx菜鸟,正在ubuntu 12.04上使用有关nginx 1.1.19的教程.我有 nginx配置文件.

I'm an nginx noob trying out this this tutorial on nginx 1.1.19 on ubuntu 12.04. I have this nginx config file.

当我运行此命令时,测试失败:

When I run this command the test fails:

$ sudo service nginx restart
Restarting nginx: nginx: [crit] pread() "/etc/nginx/sites-enabled/csv" failed (21: Is a directory)
nginx: configuration file /etc/nginx/nginx.conf test failed

我怎么知道为什么nginx.conf测试失败?

How do I know why the nginx.conf test failed?

推荐答案

sudo nginx -t应该测试所有文件并返回错误和警告位置

sudo nginx -t should test all files and return errors and warnings locations

这篇关于“配置文件/etc/nginx/nginx.conf测试失败":我怎么知道为什么会这样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆