I have a Magento running on a Ubuntu 14.04 server with Apache2 and SSL. I have installed Varnish but not sure how to set it up with SSL without using Nginx. this is my current vhost file ;
<VirtualHost *:443>
ServerName mysite.com
ServerAlias www.mysite.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/mysite.com
<Directory /var/www/mysite.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
SSLEngine on
SSLCertificateFile /home/ssl/mysite_com.crt
SSLCertificateKeyFile /home/ssl/mysite.com.key
SSLCACertificateFile /home/ssl/mysite_com.ca-bundle
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName mysite.com
RewriteEngine On
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent]
</VirtualHost>
Best Answer
You need to use Apache as a reverse proxy doing the SSL termination because Varnish doesn't support SSL. Try this:
Make sure proxy mod is enabled:
And in your Vhost
For more details follow this tutorial Apache SSL termiantion