Search code examples
amazon-web-services.htaccessamazon-ec2amazon-elastic-beanstalkamazon-linux-2

New Elastic Beanstalk instance not using .htaccess


I'm having a weird issue I've not encountered before: My new Elastic Beanstalk environment is not respecting my .htaccess files. It's odd because I don't recall this ever being a problem before. In fact I have an older EB environment that I set up years ago and it's fine with the game code.

This new environment is 64 bit Amazon Linux 2.

Looking elsewhere there are guides saying you need to edit your /etc/httpd/conf/httpd.conf file, but my EC2 instance doesn't have one. (I also don't have an /etc/apache2 directory.) The closest it has is a /etc/httpd/conf.d/php.conf file.

I don't recall ever having to do this previously, and obviously I'm a bit concerned that my EC2 instance will forget any changes to any .conf files if I have to spawn new instances are created in the future.

How do you get my EB/EC2 instance to implement my .htaccess files?


Solution

  • An update to the other answer, you can now change the server in versions 3+ to apache by updating the proxy server in the configuration.