[Nitro] Nitro::Dispatcher::ROOT and running nitro in a subdirectory...

Bryan Soto bryan.a.soto at gmail.com
Thu Apr 6 19:19:16 EDT 2006


On 4/6/06, Andrew Thompson <vagabond at cataclysm-software.net> wrote:
> I've been trying to get a nitro app running on an apache server but NOT
> at the document root, I need something like www.example.com/myapp to be
> where you go to get into the application. I can't seem to find any docs
> on this, but Nitro::Dispatcher::ROOT looks like it might relate to what
> I need but I can't decide how exactly it works
>
> Basicially I need the dispatcher to do the following:
>
> Allow me to set the base path that nitro will always get in the URL (in
> this case /myapp).
> If you do a redirect, it'd add this to the beginning of the URL(? to
> make sure things match up, or make it so it doesn't matter)
>

With Apache, I ended up just using mod_rewrite and serving via a
virtual host. Might you be able to share your hacking? :)

>
> I've actually hacked something in that kinda does this, but nitro is
> having problems locating the template files... Is there a builtin way to
> do this already?
>

I'm not sure, but perhaps what was outlined by Gergley might help? He
manipulated a controller class instance variable called
@template_root. See here for more info.

http://rubyforge.org/pipermail/nitro-general/2006-March/003643.html

--
"Never tell people how to do things. Tell them what to do and they
will surprise you with their ingenuity." —General George S. Patton




More information about the Nitro-general mailing list