0

Okay, so I had nginx 1.4.6 running on ubuntu 13.10 without any problems.

I tried to update nginx to 1.6.0 via this url (http://leftshift.io/upgrading-nginx-to-the-latest-version-on-ubuntu-servers)

Now nginx is not running and not willing to start (no reaction at all). nginx -v gives "nginx: command not found" as a result. So looks like nginx can't be found.

I looked around here and on other sites, but wasn't able to find the solution. So, if anyone can.. plz do..

John Doe
  • 557
  • 1
  • 6
  • 16
  • Are you sure you have a path for nginx? – cbass Jan 14 '15 at 11:17
  • **echo $PATH** gives me: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games". But how to check or set a path for nginx? – John Doe Jan 14 '15 at 11:23
  • Result: "nginx: /etc/nginx /usr/share/nginx". So should I then do **PATH=/etc/nginx/:$PATH"** or **PATH=/usr/share/nginx/:$PATH"** ? – John Doe Jan 14 '15 at 11:41
  • Is that the one you will be running? Because like you two installations of nginx right now. Try sudo /usr/share/nginx and see if you instance is running. – cbass Jan 14 '15 at 11:43
  • As far as I can recall, I always worked in **/etc/nginx/**. "sudo /usr/share/nginx" & "sudo /etc/nginx" result in . – John Doe Jan 14 '15 at 12:20
  • Btw, "nginx -v" gives and "nginx -t" gives a succesfull test for . But all commands with "service nginx ..." (like start, stop & status) are not responsive. – John Doe Jan 14 '15 at 12:57
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/68815/discussion-between-cbass-and-john-doe). – cbass Jan 14 '15 at 13:31
  • This question is off-topic for Stack Overflow as it does not appear to be about programming. – AStopher Mar 10 '15 at 09:47

1 Answers1

0

As this was a server without any active tools or software I decided to remove and reinstall nginx. I used this answer: How can I restore /etc/nginx?

QUOTE:

To recreate it, first uninstall using purge to remove even configuration files and records:

sudo apt-get purge nginx nginx-common nginx-full

then reinstall:

sudo apt-get install nginx

After these two commands, nginx was up and running again. I can now use my backup to upload the predefined .vhosts files to sites-enabled again.

Community
  • 1
  • 1
John Doe
  • 557
  • 1
  • 6
  • 16