Get the App
SLTechnology News&Howtos  ›  Servers  › 

Explain the pitfalls of the apache configuration domain name in detail

Shulou Source: shulou.com Published: 2022-06-02 02:39:39 10月05日 Update

I haven't used apache. After I came out to work, it was always nginx (not operation and maintenance). Recently, there was something wrong with a small project of a friend. Contact with apache.

First。 Configure the domain name to listen on port 889

Step 2, restart apache

/ www/server/apache/bin/apachectl restart

The third step, access to the external web browser, can not be accessed.

Step four. Investigate the cause

1. Local curl localhost:889 access on the server, connection denied

two。 Check the usage of the port lsof-iRanger 889

3. Inquired about the listening netstat-tnl.

Monitoring is normal.

4. Think of the possibility that the server port is not open, use firewall-cmd-- list-ports to view the open port

There is no port 889

5. Take centos7 opening port 889 as an example:

Add Port

Firewall-cmd-- zone=public-- add-port=889/tcp-- permanent (--permanent takes effect permanently, and becomes invalid after restart without this parameter)

Refresh rules

Firewall-cmd-reload

View designated port

Firewall-cmd-zone=public-query-port=8080/tcp

Delete specified port

Firewall-cmd-zone=public-remove-port=8080/tcp-permanent

View all ports that have been opened

Firewall-cmd-list-ports

6. In the end, it doesn't work, because on Aliyun, the private network, the port is limited, and you have to set it up.

If a rookie friend like me encounters this problem, we can deal with it like this.

This is the end of this article on the detailed explanation of apache configuration domain name pit, more relevant apache configuration domain name content please search previous articles or continue to browse the following related articles hope that you will support more in the future!

Tags: Port open domain name configuration article monitor friend server question service browse no content reason parameter situation more useful browser web Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Docker Shulou Technology Apple NVidia