Elasticbeanstalk - Apache 和 htaccess

Elasticbeanstalk - Apache 和 htaccess

我正在嘗試使用 apache 讓 WordPress 網站在 Elasticbeanstalk 上運行。當我使用 nginx 運行它時,一切正常,但使用 apache 時,我收到以下錯誤:

var/www/html/.htaccess: <IfModule not allowed here, referer: http://www.example.com/

我是否需要在 elasticbeanstalk 中添加更多配置或更改 httpd.conf 來解決此問題?

謝謝

答案1

我也遇到了同樣的錯誤,並透過添加以下內容手動更新 /etc/httpd/conf/httpd.conf 檔案來解決它:

<Directory "/var/www">
    AllowOverride ALL
    Require all granted
</Directory>

然後透過執行以下命令重新啟動 apache 服務:

sudo systemctl restart httpd

相關內容