In Linux, how does a common user start a program using port 80?

Source: Internet
Author: User
As we all know, by default, only root users can use ports lower than 1024 in Linux, so our tomcat, apache, if a common user needs to use port 80 for nginx and other programs, a permissiondenied exception will be thrown. There are two solutions: 1. Use non-port 80 to start the program, and then use iptables as an end

As we all know, by default, only root users can use ports lower than 1024 in Linux.McIf a program such as at, apache, and nginx wants to use a common user to occupy port 80, it will throw the peRmIssion deniEd.

There are two solutions:

1. Use non-port 80 to start the program, and then use iptables for port forwarding.

2. Assume that the program to be started is nginx, so this can also be achieved.

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.