【发布时间】:2022-02-03 17:18:50
【问题描述】:
files:
"/home/ec2-user/vhost.conf":
mode: "000777"
owner: root
group: root
encoding: plain
content: |
NameVirtualHost *:80
<VirtualHost *:80>
ServerName api.domain.com
DocumentRoot "/var/app/current/api/"
<Directory "/var/app/current/api">
AllowOverride All
Require all Granted
</Directory>
</VirtualHost>
container_commands:
00_chmod:
command: "sudo chmod 777 /etc/httpd/conf.d/elasticbeanstalk"
01_rewrite:
command: "sudo mv -f /home/ec2-user/vhost.conf /etc/httpd/conf.d/elasticbeanstalk/vhost.conf"
02_apache:
command: "sudo apachectl restart"
这是我正在使用的配置,我得到它正在寻找解决我的问题的方法,现在对此有疑问,但 asnwers 已过时并且不起作用;配置运行正确我可以在日志中确认该命令运行没有错误,但是当我 ssh 进入 ec2 时,目录中没有 conf 文件,我假设 eb 在部署后将它们删除。
有人知道发生了什么吗? aws 文档几乎没用。
【问题讨论】:
-
"目录下没有conf文件" - 哪个文件?哪个目录?
-
在 ec2 实例的 /etc/httpd/conf.d/elasticbeanstalk 中,我 ssh 进入并验证了 conf 不是他们的。命令:“sudo mv -f /home/ec2-user/vhost.conf /etc/httpd/conf.d/elasticbeanstalk/vhost.conf”
标签: amazon-web-services amazon-elastic-beanstalk