I am trying to do a mod_proxy implementation of a sintra application using a subdirectory uri on the proxy host. Here is my apache proxy config area:
ProxyRequests Off
ProxyPass /api/ http://127.0.0.1:9292/
ProxyPassReverse /api/ http://127.0.0.1:9292/
ProxyPreserveHost on
The problem I am running into, is that the links within the sinatra rendered page are not resulting in the /api prefix on the links... For example, when I do to('/some_page')
within an erb template, it gives me
instead of
Does anyone know how to properly do this where the subdirectory will be honored in generating the url? To run the backend server, I'm simply using the default as: rackup config.ru where my config is:
require 'rubygems'
load File.join(File.dirname(__FILE__), 'app.rb')
run App