0

I have a VPS running my nodeJS app, with Nginx as reverse proxy. The VPS has installed as default Apache. Often my app stops working, i check my vps through ssh and i try to restart nginx:

service nginx restart

But i got the error:

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

Looking for a solution in Stack Overflow i found this post: Nginx: Job for nginx.service failed because the control process exited where an answer says that i need to stop apache, so i write in console:

sudo killall apache2
service nginx restart

And then works fine!! But for some reason apache2 starts running on its own now and then. Is there a way to fix this?? Thanks in advance.

sonEtLumiere
  • 4,461
  • 3
  • 8
  • 35
  • Did you run the commands the error suggested? The output of those is often helpful in solving such issues. – virullius Feb 16 '21 at 18:07

1 Answers1

0

It sounds like you needs to disable the apache2 service and enable the nginx service.

systemctl stop apache2
systemctl disable apache2

systemctl enable nginx
systemctl start nginx
virullius
  • 939
  • 6
  • 17