Mac OS X bound 80 port, without nginx tips

Source: Internet
Author: User

Tag:config    port forwarding     permissions    etc    this      Note     Request     Network file sharing     modify    

Mac OS X requires root privileges to bind port 80, but if you start eclipse or Tomcat with root, the various files created by the startup are root and cannot be deleted by ordinary users. To do this, we can do the network layer port forwarding through PFCTL, so that the connection to the native 80 port of the request, are forwarded to 9090 port; (Note that Mac OS uses 80 ports to do network file sharing, first off) modify/etc/pf.conf, use sudo vim/etc/pf . Conf?pf.conf is the order-strong requirement, so pay attention to the order of the added content [Java] View plain copy 1. Rdr-anchor "com.apple/*" rdr on Lo0 inet Proto TCP from all to 127.0.0.1 port, 127.0.0.1 port 9090? Add RDR on Lo0 i NET proto TCP from all to 127.0.0.1 port, 127.0.0.1 port 9090 to pf.conf file Rdr-anchor "com.apple/*" after this line. Lo0 through ifconfig see oneself that device binds is 127.0.0.1, Lo0 is the name of this network device. After modifying the pf.conf, execute the command and let the port forwarding take effect [plain] view plain copy 1.   sudo pfctl-d 2. 3.4.   sudo pfctl-f/etc/pf.conf 5. 6.7. sudo pfctl-e in Tomcat configuration, set the boot port to 9090 good so that only the normal permissions to start Tomcat on port 9090, access to local applications directly to access 80 port.

Mac OS X bound 80 port, without nginx tips

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.