====== SSL with Mongrels and Apache ======
Using the certificates from [[accelerators:basic_ssl_web_mail|Basic SSL for use with Web and Mail]]
4) Configure a **new** apache virtual host to proxy balance to these mongrels, using port 443.
# cd /opt/csw/apache2/etc/virtualhost
# nano myrailsapp-domain-ssl.conf
With the contents of:
ServerName YOURDOMAIN.com
DocumentRoot /home/YOUR/PATH/TO/RAILS/APP/public
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://app1-mongrels%{REQUEST_URI} [P,QSA,L]
BalancerMember http://YOUR-PRIVATE-IP:8000
BalancerMember http://YOUR-PRIVATE-IP:8001
BalancerMember http://YOUR-PRIVATE-IP:8002
BalancerMember http://YOUR-PRIVATE-IP:8003
ProxyPass /images !
ProxyPass /stylesheets !
ProxyPass / balancer://app1-mongrels/
ProxyPassReverse / balancer://app1-mongrels/
ProxyPreserveHost On
RequestHeader set X_FORWARDED_PROTO "https"
SSLEngine on
SSLCertificateFile /home/ssl/part.domain.com.crt
SSLCertificateKeyFile /home/ssl/part.domain.com.key