<IfModule mod_ssl.c>
NameVirtualHost *:443
<VirtualHost *:443>
    ServerName your-ecrider.com
    DocumentRoot /var/www
    Redirect permanent / http://shop.your-ecrider.com/
</VirtualHost>
<VirtualHost *:443>
    SSLEngine on
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile /etc/ssl/certs/your-ecrider.com.cert.pem
    SSLCertificateKeyFile /etc/ssl/private/your-ecrider.com_nopass.key

    ServerName shop.your-ecrider.com
    DocumentRoot /home/xec/ecrider-0.8/ec_front/public
    ServerAdmin webmaster@localhost

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    # LogLevel warn
    LogLevel error
    CustomLog /var/log/apache2/shop_access-ssl.log combined
    ErrorLog /var/log/apache2/shop_error-ssl.log
    <IfModule mod_proxy.c>
        <Location /balancer-manager>
            SetHandler balancer-manager
            Order deny,allow
            Deny from all
            Allow from 127.0.0.1
        </Location>
        ProxyRequests Off
        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>
        RequestHeader set X_FORWARDED_PROTO 'https'

        ProxyPass / balancer://cluster/
        ProxyPassReverse / balancer://cluster/
        ProxyPreserveHost On
        <Proxy balancer://cluster/>
            BalancerMember http://127.0.0.1:3001 loadfactor=20 keepalive=On
            BalancerMember http://127.0.0.1:3002 loadfactor=20 keepalive=On
            BalancerMember http://127.0.0.1:3003 loadfactor=20 keepalive=On
        </Proxy>
    </IfModule>
    ErrorDocument 400 /404.html
    ErrorDocument 401 /404.html
    ErrorDocument 403 /404.html
    ErrorDocument 404 /404.html
    ErrorDocument 405 /404.html
    ErrorDocument 408 /404.html
    ErrorDocument 410 /404.html
    ErrorDocument 411 /404.html
    ErrorDocument 412 /404.html
    ErrorDocument 413 /404.html
    ErrorDocument 414 /404.html
    ErrorDocument 415 /404.html
    ErrorDocument 500 /500.html
    ErrorDocument 501 /500.html
    ErrorDocument 502 /500.html
    ErrorDocument 503 /500.html
    ErrorDocument 506 /500.html
</VirtualHost>


<VirtualHost *:443>
    SSLEngine on
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile /etc/ssl/certs/your-ecrider.com.cert.pem
    SSLCertificateKeyFile /etc/ssl/private/your-ecrider.com_nopass.key

    ServerName ec-test.your-ecrider.com
    DocumentRoot /home/xec/ecrider-0.8/ec_test/public
    ServerAdmin webmaster@localhost

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    # LogLevel warn
    LogLevel error
    CustomLog /var/log/apache2/ec-test_access-ssl.log combined
    ErrorLog /var/log/apache2/ec-test_error-ssl.log
    <IfModule mod_proxy.c>
        <Location /balancer-manager>
            SetHandler balancer-manager
            Order deny,allow
            Deny from all
            Allow from 127.0.0.1
        </Location>
        ProxyRequests Off
        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>
        RequestHeader set X_FORWARDED_PROTO 'https'

        ProxyPass / balancer://cluster/
        ProxyPassReverse / balancer://cluster/
        ProxyPreserveHost On
        <Proxy balancer://cluster/>
            BalancerMember http://127.0.0.1:3100 loadfactor=20 keepalive=On
        </Proxy>
    </IfModule>
    ErrorDocument 400 /404.html
    ErrorDocument 401 /404.html
    ErrorDocument 403 /404.html
    ErrorDocument 404 /404.html
    ErrorDocument 405 /404.html
    ErrorDocument 408 /404.html
    ErrorDocument 410 /404.html
    ErrorDocument 411 /404.html
    ErrorDocument 412 /404.html
    ErrorDocument 413 /404.html
    ErrorDocument 414 /404.html
    ErrorDocument 415 /404.html
    ErrorDocument 500 /500.html
    ErrorDocument 501 /500.html
    ErrorDocument 502 /500.html
    ErrorDocument 503 /500.html
    ErrorDocument 506 /500.html
</VirtualHost>


<VirtualHost *:443>
    SSLEngine on
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile /etc/ssl/certs/your-ecrider.com.cert.pem
    SSLCertificateKeyFile /etc/ssl/private/your-ecrider.com_nopass.key

    ServerName ec-admin.your-ecrider.com
    DocumentRoot /home/xec/ecrider-0.8/ec_admin/public
    ServerAdmin webmaster@localhost

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    # LogLevel warn
    LogLevel error
    CustomLog /var/log/apache2/ec_admin_access-ssl.log combined
    ErrorLog /var/log/apache2/ec_admin_error-ssl.log
    <IfModule mod_proxy.c>
        <Location /balancer-manager>
            SetHandler balancer-manager
            Order deny,allow
            Deny from all
            Allow from 127.0.0.1
        </Location>
        ProxyRequests Off
        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>
        RequestHeader set X_FORWARDED_PROTO 'https'

        ProxyPass / balancer://cluster/
        ProxyPassReverse / balancer://cluster/
        ProxyPreserveHost On
        <Proxy balancer://cluster/>
            BalancerMember http://127.0.0.1:3000 loadfactor=20 keepalive=On
        </Proxy>
    </IfModule>
    ErrorDocument 400 /404.html
    ErrorDocument 401 /404.html
    ErrorDocument 403 /404.html
    ErrorDocument 404 /404.html
    ErrorDocument 405 /404.html
    ErrorDocument 408 /404.html
    ErrorDocument 410 /404.html
    ErrorDocument 411 /404.html
    ErrorDocument 412 /404.html
    ErrorDocument 413 /404.html
    ErrorDocument 414 /404.html
    ErrorDocument 415 /404.html
    ErrorDocument 500 /500.html
    ErrorDocument 501 /500.html
    ErrorDocument 502 /500.html
    ErrorDocument 503 /500.html
    ErrorDocument 506 /500.html
</VirtualHost>
</IfModule>

