當我嘗試啓動NGINX時,我得到「nginx.service的作業失敗。有關詳細信息,請參閱'systemctl status nginx.service'和'journalctl -xn'。」這個錯誤怎麼回事? nginx
NGINX錯誤日誌:
2017/01/03 03:08:05 [emerg] 15144#0: unknown directive "index.php" in /etc/nginx/sites-enabled/default:33 2017/01/03 03:09:25 [emerg] 15214#0: unknown directive "index.php" in /etc/nginx/sites-enabled/default:33 2017/01/03 03:09:48 [emerg] 15224#0: unknown directive "index.php" in /etc/nginx/sites-enabled/default:33 2017/01/03 03:10:44 [emerg] 15237#0: unknown directive "index.php" in /etc/nginx/sites-enabled/default:33 2017/01/03 03:11:18 [emerg] 15253#0: unknown directive "index.php" in /etc/nginx/sites-enabled/default:33 2017/01/03 03:13:25 [emerg] 15321#0: unknown directive "index.php" in /etc/nginx/sites-enabled/default:33 2017/01/03 03:14:04 [emerg] 15345#0: unknown directive "index.html" in /etc/nginx/sites-enabled/default:33 2017/01/03 03:15:40 [emerg] 15369#0: unknown directive "index.php" in /etc/nginx/sites-enabled/default:35 2017/01/03 03:16:28 [emerg] 15393#0: unknown directive "index.php" in /etc/nginx/sites-enabled/default:37 2017/01/03 03:17:56 [emerg] 15421#0: unexpected "}" in /etc/nginx/sites-enabled/default:60 2017/01/03 03:18:25 [emerg] 15443#0: unexpected end of file, expecting ";" or "}" in /etc/nginx/sites-enabled/default:81 2017/01/03 03:19:14 [emerg] 15466#0: unexpected "}" in /etc/nginx/sites-enabled/default:80 2017/01/03 03:20:10 [emerg] 15489#0: unexpected "}" in /etc/nginx/sites-enabled/default:60 2017/01/03 03:22:06 [emerg] 15515#0: unexpected "}" in /etc/nginx/sites-enabled/default:60
默認聰: http://pastebin.com/APZCBJ5n
歡迎來到Stack Overflow。請在發佈問題前多加努力:如果您閱讀錯誤輸出,有一條線索:2017/01/03 03:08:05 [emerg] 15144#0:未知指令「index.php」在/ etc/nginx/sites-enabled/default:33 - 基本上它在/ etc/nginx/sites-enabled/default的第33行表示它找到了一些它不理解的東西。 – Mikkel