我刚刚在我的 AWS 实例(运行 Linux AMI)上将 Apache 更新到 2.4.3。更新完成后,Apache 崩溃并显示以下内容:
Starting httpd: AH00526: Syntax error on line 5 of /etc/httpd/conf.d/ssl.conf:
Cannot define multiple Listeners on the same IP:port
Run Code Online (Sandbox Code Playgroud)
我进入上述文件并注释掉第 5 行:#Listen 443,因为新文件httpd.conf包含已设置上述侦听器的行:
httpd.conf:
40 ...
41 #Listen 12.34.56.78:80
42 Listen 80
43 Listen 443
44
45 ...
Run Code Online (Sandbox Code Playgroud)
我的问题是,如果我在 VirtualHost 的配置文件中单独配置 SSL 证书,我可以注释掉 httpd/conf.d/ssl.conf 中的每一行吗?我的意思是,将其包括在内仍然很重要吗?为什么 Apache 2.4.3 设置Listen 443两次?
谢谢!
如果我的节点应用程序使用启动脚本,我的应用服务 Linux 实例会崩溃"start": "pm2 start server.js":
2019-04-15 11:36:34.432 ERROR - Container crime-digest__6ea5_0 for site crime-digest__6ea5 has exited, failing site start
2019-04-15 11:36:34.489 ERROR - Container crime-digest__6ea5_0 didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.
Run Code Online (Sandbox Code Playgroud)
容器日志只有上述错误。如果我只使用:"start": "node server.js",应用程序启动得很好。
我知道如果容器没有通过 8080 响应,则容器会停止,但我已将其process.env.PORT设置为服务器的端口,因此我无法弄清楚为什么 pm2 启动脚本会使容器崩溃。
process.env.PORT如果使用上面的启动脚本,我有一种不确定的感觉,因为在过程中有些混淆,但找不到任何调试它的方法,因为在容器崩溃后,我无法再通过 ssh 进入它来检查它。
我真的很感激任何建议,谢谢。
apache-2.4 ×1
azure ×1
azure-devops ×1
docker ×1
httpd.conf ×1
node.js ×1
port-443 ×1
ssl ×1
virtualhost ×1