nginxコマンドでnginx が立ち上がらないです。
http://phiary.me/mac-nginx-install/ のページを参考にしながら環境構築をしています。
brew install nginx
でインストールできて、
nginx
とコマンドを打つと
nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use) nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use) nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use) nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use) nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use) nginx: [emerg] still could not bind()
とエラーが出ました。
sudo lsof -i -P | grep "LISTEN"
とコマンドを打つと
TeamViewe 66 root 8u IPv4 0x4e5a2xxxxxxxxxxx 0t0 TCP localhost:5940 (LISTEN) cupsd 250 root 8u IPv6 0x4e5a2f8xxxxxxxxxxx 0t0 TCP localhost:631 (LISTEN) cupsd 250 root 9u IPv4 0x4e5a2f86xxxxxxxxxxx 0t0 TCP localhost:631 (LISTEN) Adobe\x20 566 xoxo 10u IPv4 0x4e5a2xxxxxxxxxxx 0t0 TCP localhost:15292 (LISTEN) nginx 3211 xoxo 6u IPv4 0x4e5a2xxxxxxxxxxx 0t0 TCP *:8080 (LISTEN) nginx 3212 xoxo 6u IPv4 0x4e5a2fxxxxxxxxxxx 0t0 TCP *:8080 (LISTEN) launchd_s 6507 xoxo 7u IPv6 0x4e5a2xxxxxxxxxxx 0t0 TCP localhost:27753 (LISTEN) launchd_s 6507 xoxo 11u IPv6 0x4e5a2xxxxxxxxxxx 0t0 TCP localhost:27753 (LISTEN) LINE 19535 xoxo 10u IPv4 0x4e5a2fxxxxxxxxxxx 0t0 TCP localhost:10400 (LISTEN) GarageBan 78390 xoxo 22u IPv4 0x4e5a2xxxxxxxxxxx 0t0 TCP *:54554 (LISTEN) GarageBan 78390 xoxo 23u IPv6 0x4e5a2xxxxxxxxxxx 0t0 TCP *:54554 (LISTEN) pycharm 96801 xoxo 128u IPv4 0x4e5a2xxxxxxxxxxx 0t0 TCP localhost:6942 (LISTEN) pycharm 96801 xoxo 200u IPv4 0x4e5a2xxxxxxxxxxx 0t0 TCP localhost:63342 (LISTEN)
と出て:8080ポートはnginx が占有していることがわかりました。
だからなぜnginxコマンドが使えないのかわかりません。どのようにnginxコマンドでnginx を立ち上がらせたら良いでしょうか?
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。