Troubleshooting: Camping 2.0 on CGI on a shared host
Magnus Holm
judofyr at gmail.com
Mon Jul 14 12:58:38 EDT 2008
R won't add the root path (it's a feature, not a bug).
Camping (and Rack) assumes that SCRIPT_NAME will contain the root path. If
you can't change it in Apache, I guess you could add a middleware:
class ScriptNameFixer
def initialize(app)
@app = app
end
def call(env)
env["SCRIPT_NAME"] = "/your/path"
@app.call(env)
end
end
Could you post your .htaccess? There must be a way to do this properly in
Apache!
On Mon, Jul 14, 2008 at 6:14 PM, Eric Mill <kprojection at gmail.com> wrote:
> I'm not able to get this working, I can't seem to affect the
> environment, either using the SetEnv approach, or by including that at
> the end of RewriteRule. How does Camping use the env in forming its
> understanding of its base URI?
>
> Forming URLs using the "R" method does not pre-pend "/dispatch.cgi/",
> but calling Redirect does. And as I said earlier, session cookies are
> set for the path "/dispatch.cgi/".
>
> I'm continuing to investigate...
>
> -- Eric
>
> On Mon, Jul 14, 2008 at 9:22 AM, Bluebie, Jenna
> <blueberry at creativepony.com> wrote:
> > No wait, this is even better, at the end of your RewriteRule, put:
> >
> > [env=SCRIPT_NAME:/path/to/app]
> >
> > Let us know what happens!
> > _______________________________________________
> > Camping-list mailing list
> > Camping-list at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/camping-list
> >
> _______________________________________________
> Camping-list mailing list
> Camping-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list
>
--
Magnus Holm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/camping-list/attachments/20080714/ce63a64b/attachment.html>
More information about the Camping-list
mailing list