zach-adams / hgv-deploy-full

This Ansible Playbook is designed to setup a Mercury-Like environment on a Production server without the configuration hassle.
102 stars 46 forks source link

SSL support #15

Closed tobeycodes closed 6 years ago

tobeycodes commented 9 years ago

Is there any chance Pound would be placed in front of Varnish for SSL support? I'd imagine you currently have to disable Varnish to achieve it.

http://wptavern.com/speed-up-your-wordpress-site-with-pound-varnish-nginx-and-mod_pagespeed

summerjob commented 9 years ago

without SSL support there is no use for this - every site should have SSL in 2015

aj-adl commented 9 years ago

It would be better to do a proxy with nginx, as it is already part of the stack, has SPDY support etc

nginx -> varnish -> nginx -> HVVM/PHP-FPM

jessecurry commented 8 years ago

I believe this should work, add it to the bottom of the Nginx config file for your site (you'll obviously need your cert/key pair).

server {
    listen 443 ssl;
    server_name example.com;
    ssl_certificate /etc/ssl/example.com.pem;
    ssl_certificate_key /etc/ssl/example.com.key;

    location / {
        proxy_pass http://127.0.0.1:80;
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Port 443;
        proxy_set_header Host $host;
    }
}