首页 > 解决方案 > 我无法访问 centos 8 中的 apache 服务器?

问题描述

centos 8无法访问apache服务器

  1. dnf 安装 httpd
  2. 防火墙-cmd --permanent --add-service=https
  3. 防火墙-cmd --reload

状态很好

[root@test ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2020-10-05 04:36:53 EDT; 1h 38min ago
     Docs: man:httpd.service(8)
 Main PID: 30730 (httpd)
   Status: "Running, listening on: port 80"
    Tasks: 213 (limit: 23565)
   Memory: 43.6M
   CGroup: /system.slice/httpd.service
           ├─30730 /usr/sbin/httpd -DFOREGROUND
           ├─30732 /usr/sbin/httpd -DFOREGROUND
           ├─30733 /usr/sbin/httpd -DFOREGROUND
           ├─30734 /usr/sbin/httpd -DFOREGROUND
           └─30735 /usr/sbin/httpd -DFOREGROUND

Oct 05 04:36:53 test.server systemd[1]: Starting The Apache HTTP Server...
Oct 05 04:36:53 test.server systemd[1]: Started The Apache HTTP Server.
Oct 05 04:36:53 test.server httpd[30730]: Server configured, listening on: port 80

主要问题是 http:// 在所有浏览器中都没有尝试过 <ERR_CONNECTION_TIMED_OUT>

标签: apachecentos

解决方案


在您的第 2 步中,您在防火墙上打开了 https 端口 443,因此端口 80 仍将被防火墙阻止


推荐阅读