我正在尝试重新安装nginx,但我有这个
nginx -t
nginx: [alert] could not open error log file: open()
"/var/log/nginx/error.log" failed (2: No such file or directory)
2015/01/25 16:18:01 [emerg] 1400#0: open() "/etc/nginx/nginx.conf"
failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
如果我删除了所有nginx文件夹,如何安装和启动nginx?
答案 0 :(得分:18)
以 root 或<:p>登录
sudo su -
然后卸载nginx:
apt-get purge nginx nginx-common nginx-full
然后安装它:
apt-get install nginx
另一种方法是使用-H
运行sudo命令:
sudo -H apt-get purge nginx nginx-common nginx-full
sudo -H apt-get install nginx
答案 1 :(得分:9)
scope :most_recent, -> { order("created_at DESC").limit(5) }
答案 2 :(得分:1)
尝试
sudo aptitude purge nginx&amp;&amp; sudo aptitude安装nginx