2016-12-29 50 views
0

今天我執行/use/local/nginx/conf/nginx.conf -t to nginx,但它顯示了以下錯誤:後,我編輯了我的nginx的nginx.conf,並執行測試命令,命令沒有找到錯誤出現

[[email protected] ~]# /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

[根@ ddqcsAPP〜]#/usr/local/nginx/conf/nginx.conf -t /usr/local/nginx/conf/nginx.conf:行3:worker_processes:命令未找到 /usr/local/nginx/conf/nginx.conf:第9行:未找到pid:命令 /usr/local/nginx/conf/nginx.conf:第12行:events:command not found /usr/local/nginx/conf/nginx.conf:第13行:worker_connections:命令未找到 /usr/local/nginx/conf/nginx.conf:第14行:語法錯誤臨近令牌'}' /usr/local/nginx/conf/nginx .conf:第14行:'}' – somebody

+0

與java無關我想。 –

+0

}'/usr/local/nginx/conf/nginx.conf:line 14:}' – somebody

回答

0

這不是Java相關的。你正在嘗試使用nginx配置檢查選項,但是你錯誤地使用了它。

您應該簡單地調用nginx -t(nginx命令)來測試您的配置,而不是嘗試運行實際的配置文件。 :)

+0

是的!你說了一口!我使用錯誤的選項.thx! – somebody

相關問題