Category Archives: beanstalk

How to modify elasticbeanstalk.conf

I've modified /etc/httpd/conf.d/elasticbeanstalk.conf then I've created an AMI image and configured Beanstalk to use this image.

But when the new EC2 instance starts, the config file elasticbeanstalk.conf is the original, without my modifications. (Other config files as httpd.conf do have my modifications)

How can I modify and persist this file?


This is my modified file:

<VirtualHost *:80>
  <Proxy *>
    Order deny,allow
    Allow from all

  #ProxyPass / http://localhost:8080/ retry=0
  #ProxyPassReverse / http://localhost:8080/

  # This is my modification
  ProxyPass /j_spring_security_check http://localhost:8080/j_spring_security_check
  ProxyPassReverse /j_spring_security_check http://localhost:8080/j_spring_security_check

  ProxyPreserveHost on

  ErrorLog /var/log/httpd/elasticbeanstalk-error_log

forcing https on aws beanstalk and cakephp causing ‘too many redirects’

I'm deploying my cakephp 2.6 website on AWS Beanstalk with this .htaccess file

<IfModule mod_rewrite.c>

  RewriteEngine on

  RewriteRule ^$ app/webroot/
  RewriteRule (.*) app/webroot/$1

  # Redirect for├ža HTTPS
  RewriteCond %{HTTPS} !=on
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NC,L,R=307]


I need to force httpS and use app/webroot as default folder.

Without https rules, it was working fine, but now I'm getting too many redirects error.

any idea?