If selinux is not disabled, httpd cannot use non-80 or other default ports.

Source: Internet
Author: User

If selinux is not disabled, httpd cannot use non-80 or other default ports. In this case, the httpd port is changed to 9080, and the following prompt is displayed: [root @ haifeng ~] # Service httpd startStarting httpd: (13) Permission denied: make_sock: cocould not bind to address [::]: 9080 (13) Permission denied: make_sock: cocould not bind to address 0.0.0.0: 9080no listening sockets available, shutting downUnable to open logs [FAILED] solution: 1. Disable selinux by using setenforce 0 first. 2. Disable selinux in the configuration file/etc/selinux/config and/etc/sysconfig/selinux. the restart will take effect later. Tip: 1. Check whether port 9080 is occupied by other programs # netstat-anpt | grep 9080, not occupied. 2. Check the permission, 3. Check the selinux status # If the getenforce status is Enforcing, the configuration may not take effect. The configuration in/etc/sysconfig/selinux is disabled, and the configuration in/etc/selinux/config is disabled. Note: getenforce/setenforce view and set the current working mode of SELinux

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.