OSX - Start and Stoping of Nginx error -


i install nginx via home brew , when try start or stop following error

➜  ~  sudo nginx -s stop nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: no such file or directory) ➜  ~  sudo nginx nginx: [emerg] bind() 0.0.0.0:8080 failed (48: address in use) nginx: [emerg] bind() 0.0.0.0:8080 failed (48: address in use) nginx: [emerg] bind() 0.0.0.0:8080 failed (48: address in use) nginx: [emerg] bind() 0.0.0.0:8080 failed (48: address in use) nginx: [emerg] bind() 0.0.0.0:8080 failed (48: address in use) nginx: [emerg] still not bind() 

file structure

➜  ~  /usr/local/var/run ➜  run git:(master) ls nginx ➜  run git:(master) cd nginx ➜  nginx git:(master) ls client_body_temp fastcgi_temp     proxy_temp       scgi_temp        uwsgi_temp ➜  nginx git:(master) 

to check if nginx running

➜  ~  ps waux | grep nginx harshamv          963   0.0  0.0  2432772    656 s000  s+    1:32pm   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=.cvs --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn nginx 

when try run nginx following error.

➜  ~  nginx nginx: [alert] not open error log file: open() "/usr/local/var/log/nginx/error.log" failed (13: permission denied) 2015/07/02 13:39:44 [emerg] 1074#0: open() "/usr/local/var/log/nginx/access.log" failed (13: permission denied) 

there 1 case have met. if start nginx conf file, looks nginx -c my.conf, have stop nginx -s stop -c my.conf.

in my.conf file, may use pid /some_location/nginx.pid;, , generate pid file @ location, not more default location @ /usr/local/var/run/nginx.pid, , why cannot stop it.

i think when met such error, have option check ps -ef | grep nginx pid, @ least can kill manually.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -