Home  >  Q&A  >  body text

nginx - How to open port 80 in Mac OS IDEA

During the development process, port 80 needs to be used
The method of using nginx pfctl has failed
nginx cannot use port 80. Is there any other way to use port 80

给我你的怀抱给我你的怀抱2712 days ago697

reply all(3)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-16 17:09:05

    First check if port 80 is occupied

    lsof -nPiTCP -sTCP:LISTEN

    If it is not occupied, ports below 1024 require root permissions, so you need to add sudo when starting nginx

    reply
    0
  • 黄舟

    黄舟2017-05-16 17:09:05

    sudo service nginx start

    reply
    0
  • ringa_lee

    ringa_lee2017-05-16 17:09:05

    1, lsof -i:80 to check if it is occupied

    2. Enable root user http://jingyan.baidu.com/arti...

    reply
    0
  • Cancelreply