AWS Elasticbeanstalk .ebextensions 未部署到 /etc/httpd

时间:2021-04-22 08:28:31

标签: php apache amazon-elastic-beanstalk symfony4 ebextensions

在向 EB 部署新应用程序时,我发现与 .ebextensions 相关的 httpd 文件没有部署到 /etc

这样的文件与来自另一个应用程序的文件相同,例如:

/.ebextensions/cors.config

 files:
/etc/httpd/conf.d/cors.conf:
    mode: "000644"
    owner: webapp
    group: webapp
    content: |
        SetEnvIf Origin "^https?:\/\/localhost:[0-9]+.*|https?:\/\/127.0.0.1[:[0-9]+]?|https:\/\/mywebsite.com" REQUEST_ORIGIN=$0
        Header always add Access-Control-Allow-Origin %{REQUEST_ORIGIN}e env=REQUEST_ORIGIN
        Header add Access-Control-Allow-Headers "content-type, authorization"
        Header add Access-Control-Allow-Methods "GET, OPTIONS, POST, PUT, PATCH, DELETE"
        Header add Access-Control-Max-Age "86400"

其他与this depository中AWS提供的相同

请注意,我确实有一个已正确部署到 /etc/php.d 的文件,因此 .ebextensions 部署总体上似乎可以正常工作。

该问题似乎与 Apache 有关。在配置环境时,我确实注意到在 Apache 和 Nginx 之间进行了一个新的选择。我确实选择了 Apache。

我在这个阶段有点想法。

0 个答案:

没有答案
相关问题