Q:

AWS Beanstalk and Apache VirtualHost SSL custom DocumentRoot

I already configured my .ebextensions directory to install SLL files and configure ssl.conf apache file. Everything is working perfect, instead the DocumentRoot of my ssl.conf that is not overwriting my Elastic Beanstalk default DocumentRoot.
Problem: When I access https://dashboard.mydomain.com its also pointing to /home instead /dashboard folder.

Elastic BeanStalk Default DocumentRoot:

Directory Files:
home/ -> Accessed by http://www.mydomain.com/
  ...
dashboard/ -> Accessed by https://dashboard.mydomain.com (DocumentRoot isn't working, its also pointing to /home)
  ...
framework/ (Secure)

ssl.conf:
LoadModule ssl_module modules/mod_ssl.so
Listen 443
<VirtualHost *:443>
    ServerName dashboard.mydomain.com
    DocumentRoot /var/www/html/dashboard -- NOT WORKING
     <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    SSLEngine on
    SSLCertificateChainFile "/etc/httpd/ssl/gd_bundle.crt"
    SSLCertificateFile "/etc/httpd/ssl/cert.crt"
    SSLCertificateKeyFile "/etc/httpd/ssl/key.key"

    ProxyPass / http://localhost:80/ retry=0
    ProxyPassReverse / http://localhost:80/
    ProxyPreserveHost on

    LogFormat "%h (%{X-Forwarded-For}i) %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
    ErrorLog /var/log/httpd/elasticbeanstalk-error_log
    TransferLog /var/log/httpd/elasticbeanstalk-access_log
</VirtualHost>

A:

UPDATE 2014 feb 08
I did some tests and I found out that the ProxyPass directive does not simply redirect every request from port 443 to localhost:80 (as one could easily thought), but basically  repeats the request to Apache from scratch, through the port 80 (at least, that's what I understood).
So, if you want to set any environment variable, you need to do it in the matching VirtualHost, adding to your .conf something like this:
Listen 80
<VirtualHost *:80>
    DocumentRoot /var/www/html/dashboard
</VirtualHost>

This will be executed with every request (80 or 443).
END UPDATE
I have no idea why, but here two suggestions: the .conf in /etc/httpd/conf.d are processed in alphabetical order.
This doesn't explain why your configuration don't take over, because the environmental variables are set in aws_env.conf
BUT... take a look to aws_env.conf: you'll find some hints (it looks like the name of documentRoot is somewhat changed: for example, in my version is PHP_DOCUMENT_ROOT).
Good luck, let us know if you find out.

