不会在 Amazon Linux 中重新加载 httpd.conf

问题描述

如何在 /etc/httpd/conf/httpd.conf 中反映修改

我遇到了麻烦……EC2 中的 Apache 无法正常工作。

我的 Amzon linux 版本在这里

$  cat /etc/system-release
Amazon Linux release 2 (Karoo)
$ sudo systemctl restart httpd.service
Job for httpd.service Failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

所以我没有检查状态。

$ systemctl status httpd.service

状态在这里

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─PHP-fpm.conf
   Active: Failed (Result: exit-code) since  2021-05-10
     Docs: man:httpd.service(8)
  Process: 2971 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited,status=1/FAILURE)
 Main PID: 2971 (code=exited,status=1/FAILURE)
   Status: "Reading configuration..."

 5月 10 13:00:00 ip-xxx-xx-xx-xx.ap-northeast-1.compute.internal httpd[2971]: AH00112: Warning: DocumentRoot [/var/www/stackflow/public] does not exist

我注意到了 DocumentRoot [/var/www/stackflow/public] 是错误的路径...

修改

/etc/httpd/conf/httpd.conf

<Directory "/var/www/stackoverflow/public">
    AllowOverride all
   #Require all denied
    Require all granted
</Directory>

DocumentRoot "/var/www/html"
$ sudo systemctl reload httpd.service
Job for httpd.service invalid.

更改似乎没有反映出来。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...