tid=34542&當啟動nginx時, service nginx start (restart) 出現連續5個相同錯誤:, L: d. B. c8 `$ o
[emerg] 5048#0: bind() to x.x.x.x:80 failed (98: Address already in use)
" g! M# ^! {4 [# G" ^0 d& ?$ y最後再給你出現
" ~8 a! G2 c8 n/ l[emerg] 5048#0: still could not bind(); A/ j/ \/ d5 Y- _& j0 }
重開機也沒用: W |$ ]3 s, ^ o# ] I
這個意謂"nginx或其他程序正在使用 port 80" , 可以指令 netstat -pan | grep ":80" 或
. k+ B. V9 W; a2 z: R$ ^9 Ofuser 80/tcp (fuser 指令可以參考 http://nixgeek.com/finding-out-what-process-is-listening-on-a-port-under-linux.html)
4 h. U$ e+ U- Q) N/ Z, z查看是誰占用 port 80,但nginx也沒占用(啟動不了當然不會占用)
_0 L6 Z ^3 J8 h/ Z. h, R; J- F8 K8 B
# ^% i/ Z% c# G: r) P1 m最後 fuser -k 80/tcp 刪除占用 port 80 的的所有程序(process)
3 P" B5 o3 k( h4 ]/ D Z然後 service nginx restart ======> OK
+ C% x: b. e1 s2 u2 ^3 W* Q% y/ ]2 P% p( O) ^( Y/ ]
|