0

I followed this post to install nginx and use it to serve another django app on webfaction- http://www.ravelrumba.com/blog/install-nginx-webfaction/ I had started nginx using sbin/nginx as mentioned in the post. I closed that ssh session, so server kept running. I now want to restart and to my utter frustration can't figure out how. Furthermore, I can't see any relevant logs, I checked /home/logs/user and /home/logs/frontend and nginx/logs and there are older files in there but nothing that seems continuously updating (my website is running and some actions are not working and I get 'page unavailable' error but none of these logs show anything. I have tried ps -ef | grep nginx to figure out nginx pid and restart but when I try to kill one of the nginx processes, it says permission denied.

sbin/nginx stop or start or restart doesn't work. It must be sounding pretty silly but have tried for hours now, would appreciate any help.

Also, tried the following-

[xxx@xxx nginx]$ sbin/nginx -s quit 
nginx: [error] open() "/home/xxx/webapps/nginx/logs/nginx.pid" failed (2: No such file or directory) 
[xxx@xxx nginx]$ sbin/nginx -s reload 
nginx: [error] open() "/home/xxx/webapps/nginx/logs/nginx.pid" failed (2: No such file or directory)
Eternity
  • 1
  • 1
  • 3

3 Answers3

3

I just do

$ cd ~/weapps/my-app-name
$ ./bin/restart

I also have this as a step in my capistrano (or mina) deployment scripts.

nathanvda
  • 49,707
  • 13
  • 117
  • 139
2

Restart nginx service in webfaction servers

[xxx@xxx nginx]$ sbin/nginx -p /home/xxx/webapps/myapp/nginx/ -s reload
romuloigor
  • 182
  • 1
  • 11
0

To restart nginx from any directory on webfaction:

ssh your_username.webfactional.com
$ $HOME/webapps/[app_name]/nginx/sbin/nginx -p $HOME/webapps/[app_name]/nginx/ -s reload
Morgan
  • 19,934
  • 8
  • 58
  • 84