关于nginx的安装

  今天倒腾nginx,当运用命令service nginx start 出现了这个:Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

  当然我运行了systemctl status nginx.servicejournalctl -xe,没大看懂,而且我ubuntu上都没有/etc/nginx的conf文件等等。于是谷歌了好久不停找办法,最终还是没解决。最后还是卸载了nginx重新安装了才好使。但卸载这里也有技巧,sudo apt-get --purge remove nginx这是清除一些配置文件的命令,还有不加--purge只是单纯的卸载nginx,

最终结果如下:

可谓是终于成功了,原先就算安装上了,打开http://localhost都是显示的403 forbidden。所以卸载nginx还有apache2等服务器时,个人认为是很有必要在remove前面加上--purge 将配置一并删除,最终保证软件的正确运行。

posted @ 2017-02-25 12:34  why_not_try  阅读(339)  评论(0编辑  收藏  举报