2

I'm trying to get a WordPress site working on Elasticbeanstalk using apache. When i run it using nginx, everything works fine, but with apache, i get the following error:

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

Do I need to add any more configuration in elasticbeanstalk or perhaps alter the httpd.conf to fix this?

Thanks

sipher_z
  • 121
  • 5
  • Did you already add "AllowOverride All" in your vhost or httpd.conf for the directory /var/www/html? Like this: Options Indexes FollowSymLinks AllowOverride None Require all granted – Lorem ipsum Aug 17 '20 at 11:36
  • @LukasRäpple there isn't a vhost defined in the httpd.conf or a directive – sipher_z Aug 17 '20 at 12:23
  • Ok, odd.In my apache 2.4 installations there is always the folowwing inside https.conf: Options None AllowOverride None Require all denied Order deny,allow Deny from all – Lorem ipsum Aug 17 '20 at 12:34
  • @LukasRäpple is this via elasticbeanstalk? I'm using Amazon Linux, if that helps? – sipher_z Aug 17 '20 at 14:34

1 Answers1

0

I also faced the same error and resolved it by manually updating the /etc/httpd/conf/httpd.conf file by adding the following content:

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

And then restarted the apache service by running the following command:

sudo systemctl restart httpd
tater
  • 1,445
  • 2
  • 10
  • 12