Recently I developed a Sinatra app that running under Thin. On my local and test servers it runs ok, but when I add it to my production env, all resources from public dir is inaccessible.
I'm not a apache guy, so I'm a little lost here.
Here is what I did:
httpd.conf
...
ProxyPass /myapp/ http://127.0.0.1:9194/myapp
ProxyPassReverse /myapp/ http://127.0.0.1:9194/myapp
By doing this, I want that every request to mydomain.com/myapp/ be forward to myapp. In my app dir a have a public directory, with all my css, js and image files.
So, when I point to http://mydomain.com/myapp/ the html comes, but no css, images and js. On the other hand, if I point to 127.0.0.1 at port 9194 it works as it should.
So my question is, how can I configure my apache - or thin, or sinatra - so I can have access to my public content via ProxyPass?
Thanks.
Add a /
at the end of the second argument for ProxyPassReverse. The Apache docs say that if the first argument has a trailing slash, the second one also should have one.