Skip to content

Instantly share code, notes, and snippets.

@ngsw
Created January 31, 2012 21:24
Show Gist options
  • Select an option

  • Save ngsw/1713005 to your computer and use it in GitHub Desktop.

Select an option

Save ngsw/1713005 to your computer and use it in GitHub Desktop.
nginx -t の 実行で pid ファイルが生成される
# nginx -V 2>&1 |grep --color '\-\-pid-path.*.pid'
(snip)
--pid-path=/var/run/nginx/nginx.pid
(snip)
# ls /var/run/nginx/nginx.pid
ls: cannot access /var/run/nginx/nginx.pid: そのようなファイルやディレクトリはありません
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# ls /var/run/nginx/nginx.pid
/var/run/nginx/nginx.pid
# ?(´・ω・`)?
# /etc/init.d/nginx status
nginx が停止していますが PID ファイルが残っています
# ?(´・ω・`)?
# /etc/init.d/nginx stop
nginx を停止中: [失敗]
# ??(´・ω・`)??
# ls /var/run/nginx/nginx.pid
ls: cannot access /var/run/nginx/nginx.pid: そのようなファイルやディレクトリはありません
# こういうものですか?
@ngsw
Copy link
Copy Markdown
Author

ngsw commented Jan 31, 2012

こういうもののようだ……
知りませんでした。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment