Skip to content

How to stream a WordPress blog through a Rack app

John Bachir edited this page Mar 17, 2017 · 7 revisions

WORK IN PROGESS


intro

in rack app

this example is for Rails, but you can easily adapt it to a general rack app

config.middleware.insert(0, Rack::ReverseProxy) do
  reverse_proxy_options preserve_host: false, replace_response_host: true
  if Rails.env.production? or Rails.env.staging?
    reverse_proxy_options force_ssl: true, replace_response_host: true
  end
  reverse_proxy /^\/blog(\/?.*)$/, 'http://blog.example.com/blog$1'
end

on wordpress server

if apache or nginx root is /var/www, install wordpress in /var/www/blog

update wp_options set option_value = "https://example.to/blog" where option_name = "home" or option_name = "siteurl";

you might need to install this plugin: https://wordpress.org/plugins/ssl-insecure-content-fixer/

Clone this wiki locally