In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the solution of not being able to access the web page after the launch of apache. I hope you will get something after reading this article. Let's discuss it together.
Solution:
First of all, we need to make sure that the remote Linux system has been installed, we use xshell remote SSH to log in to the Linux system, and we also need to make sure that apache has been installed using commands such as yum, and then we begin to conduct troubleshooting analysis.
In order to remotely access the web page of the server, we first need to make sure that the service httpd of apache is already running, and we use the command to check the status of the corresponding service:
Service httpd status
If it is running as shown in the figure, it means that the service is enabled, otherwise we need to use the command to pull up the httpd service:
Service httpd start
Then we need to judge the status of SELinux. SELinux is a security policy service under Linux system. However, because the configuration is complex and it has a great impact on system services and access operations, if it is not closed, it may cause some abnormal conditions. Therefore, we need to use commands to determine whether SELinux has been closed:
Sestatus
If the disabled is already shown as shown in the figure, it means it has been closed, otherwise we need to use the command to temporarily shut down the policy service:
Setenforce 0
Then we need to determine whether port 80 is occupied by other programs and check it with the following command:
Netstat-lnp | grep 80
If port 80 is used by httpd as shown in the figure, it is OK, otherwise we need to correct the operation, so we will not elaborate on it here.
Then we can first check whether the system firewall is enabled. When other services are normal, the high probability that the web page cannot be accessed is caused by not configuring the firewall correctly. Therefore, we first use the following command to judge the status of the firewall.
Service iptables status
If the following figure shows that the firewall of the system is running, in order to do a simple exclusion check, we can try to turn off the firewall first, and then turn on the reconfiguration after confirming that it is the firewall.
Service iptables stop
After turning off the firewall, I found that I could access it normally. After confirming the root cause, we need to restart the firewall for the sake of system security. Then we need to configure the firewall for the tcp network request to access port 80. We need to restart the firewall first.
Service iptables start
Then enter the command to configure the firewall and view the configured firewall policy
Iptables-I INPUT-p TCP-- dport 80-j ACCEPTservice iptables status
After completion, as shown in the figure, the configuration is complete, and the web page on the remote access server is already OK.
After reading this article, I believe you have a certain understanding of "the solution to the inability to access the web page after apache startup". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.