In Linux, port 80, port 8080, or port linux8080 is enabled.

Source: Internet
Author: User

In Linux, port 80, port 8080, or port linux8080 is enabled.

Only port 22 is enabled when the system is loaded. After Nginx + php + mysql is installed, the website cannot be accessed.

Iptables-L-n

Check the firewall settings and find that port 80 is not enabled

The Linux firewall is disabled by default. Either firewall is disabled or the port is opened to the firewall.

Disable firewall Name:

Service iptables stop (not recommended)

To open port 8080, follow these steps:

1. Modify the/etc/sysconfig/iptables file and add the following line:

-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 8080-j ACCEPT

Restart iptables

Service iptables restart

2. Restart the firewall. There are two methods to restart the firewall.

A) It takes effect after restart
Enable: chkconfig iptables on
Close: chkconfig iptables off

B) It takes effect immediately and becomes invalid after restart.
Enable: service iptables start
Disable: service iptables stop

Open a range of ports 3000 to 5000

-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 3000: 5000-j ACCEPT

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.