jaswope / rack-reverse-proxy

A Reverse Proxy for Rack
http://github.com/jaswope/rack-reverse-proxy
MIT License
191 stars 138 forks source link

Assets not showing up for https #38

Open originated opened 10 years ago

originated commented 10 years ago

Hi,

I have reverse proxy setup for a subfolder to a wordpress blog, which is hosted on an ec2 server. Ultimate goal "https://www.example.com/blog/" The problem is the parent site is in https, so for transparency I've added openssl to the lamp stack(ec2). The problem is that the wordpress blog is not showing any assets/css.

routes:

wordpress

match "/blog" => redirect("/blog/")

config.ru

use Rack::ReverseProxy do reverse_proxy /^\/blog(\/.*)$/, 'http://xx.xx.xx.x$1', opts={:preserve_host => true} end

xx.xx.xx.x = ip to the ec2 box with wordpress installed.

mebezac commented 9 years ago

In case anyone else has this issue, make sure your link in the Rack::ReverseProxy block is https instead of http

in the config.ru:

use Rack::ReverseProxy do
  reverse_proxy(/^\/blog(\/.*)$/,
    'https://xx.xx.xx.x$1',
    opts = {:preserve_host => true})
end