Detailed explanation of the pitfalls of Apache domain name configuration

Detailed explanation of the pitfalls of Apache domain name configuration

I have never used apache. After I started working, I have always used nginx (not operation and maintenance). Recently, a small project of a friend of mine had some problems. I came into contact with apache.

First, configure the domain name and listen to port 889

Step 2: Restart Apache

/www/server/apache/bin/apachectl restart

The third step is to access it with an external browser.

Step 4. Identify the cause

1. Access the server locally using curl localhost:889, and the connection is refused

2. Check the port usage lsof -i:889

3. Query the monitoring netstat -tnl.

Monitoring is normal

4. I thought that the server port might not be open, so I used firewall-cmd --list-ports to check the open ports.

No port 889

5. Take centos7 opening port 889 as an example:

Adding Ports

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

Refresh Rules

firewall-cmd --reload

View the specified port

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

Delete the specified port

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

View all open ports

firewall-cmd --list-ports

6. In the end, it still doesn't work, because on Alibaba Cloud, the dedicated network limits the port, so you have to set it up

If you have a friend like me who is new to this problem, you can deal with it like this

This is the end of this article about the pitfalls of Apache domain name configuration. For more relevant content about Apache domain name configuration, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to implement web stress testing through Apache Bench
  • How to install apachebench separately in CentOS environment
  • Spring Cloud integrates Apache-SkyWalking to implement link tracking
  • Apache Shrio security framework implementation principle and example explanation
  • Detailed description and usage examples of Apache Commons tool classes in Java's commonly used class library
  • Tutorial on installing Apache 2.4.41 on Windows 10
  • Apache Bench stress testing tool implementation principle and usage analysis

<<:  Solve the problem that element edit form el-radio cannot be selected after echoing

>>:  Detailed steps to configure my.ini for mysql5.7 and above

Recommend

JavaScript implements the protocol example in which the user must check the box

In js, set the user to read a certain agreement b...

JavaScript canvas realizes dynamic point and line effect

This article shares the specific code for JavaScr...

Use HTML and CSS to create your own warm man "Dabai"

The final result is like this, isn’t it cute… PS:...

Analyze Tomcat architecture principles to architecture design

Table of contents 1. Learning Objectives 1.1. Mas...

In-depth study of MySQL multi-version concurrency control MVCC

MVCC MVCC (Multi-Version Concurrency Control) is ...

Two methods to implement Mysql remote connection configuration

Two methods to implement Mysql remote connection ...

A good way to improve your design skills

So-called talent (left brain and right brain) Tha...

Vue project implements left swipe delete function (complete code)

Achieve results The code is as follows html <t...

Introduction to RHCE bridging, password-free login and port number modification

Table of contents 1. Configure bridging and captu...

How to create a simple column chart using Flex layout in css

The following is a bar chart using Flex layout: H...

MySQL trigger definition and usage simple example

This article describes the definition and usage o...

Two ways to implement HTML to randomly drag content positions

Test: Chrome v80.0.3987.122 is normal There are t...

Mysql experiment: using explain to analyze the trend of indexes

Overview Indexing is a skill that must be mastere...

Use iptables and firewalld tools to manage Linux firewall connection rules

Firewall A firewall is a set of rules. When a pac...