linux - 不会在 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.
变化似乎没有体现出来。
解决方案
推荐阅读
- javascript - HTML onClick 函数更改 JavaScript 源
- java - Netbeans 插件 - 获取打开项目中每个类的行数
- docker - docker:无法连接到 Mac OS X 上的 Docker 守护进程
- php - 从sql php动态删除加载iterm
- ios - CocoaPods 在 Microsoft AppCenter for React Native 项目上安装失败
- javascript - 显示条件表行Angular JS
- r - 使用 R 中的过滤器函数一次创建多个数据帧
- appcelerator - Titanium Appcelerator Ti 媒体选择器小部件
- c# - Winforms ComboBox 在运行时添加一个行项目
- json - 将 JsObject 保存到 DynamoDB