今天我执行了/use/local/nginx/conf/nginx.conf -t to nginx
,但它显示以下错误:
[root@ddqcsAPP ~]# /usr/local/nginx/conf/nginx.conf -t
/usr/local/nginx/conf/nginx.conf: line 3: worker_processes: command not found
/usr/local/nginx/conf/nginx.conf: line 9: pid: command not found
/usr/local/nginx/conf/nginx.conf: line 12: events: command not found
/usr/local/nginx/conf/nginx.conf: line 13: worker_connections: command not found
/usr/local/nginx/conf/nginx.conf: line 14: syntax error near unexpected token }'
/usr/local/nginx/conf/nginx.conf: line 14: }'
我最后一次记得我能成功地执行它。什么可能出错?
答案 0 :(得分:0)
这与Java无关。您正在尝试使用nginx配置检查选项,但您使用它是错误的。
您只需调用nginx -t
(nginx命令)来测试您的配置,而不是尝试运行实际的配置文件。 :)