# Silly question about running from a directory?

**URL:** <https://www.ruby-forum.com/t/silly-question-about-running-from-a-directory/112396>\
**Category:** Radiant CMS\
**Created:** [August 18, 2007, 10:37am UTC](https://www.ruby-forum.com/t/silly-question-about-running-from-a-directory/112396 "2007-08-18T10:37:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [August 18, 2007, 10:37am UTC](https://www.ruby-forum.com/t/silly-question-about-running-from-a-directory/112396/1 "2007-08-18T10:37:33Z")

</div>

Hi Everyone,

Just a silly question. I was wondering if Radiant can be run from a  
sub-directory (not a subdomain or as the main site of a domain). I  
installed it to [http://example.com/radiant](http://example.com/radiant) and it starts up fine. But,  
when I log in to the admin area and click on the layouts tab, it wants  
to take me to [http://example.com/admin/layouts](http://example.com/admin/layouts) rather than  
[http://example.com/radiant/admin/layouts](http://example.com/radiant/admin/layouts)

If I type it as [http://example.com/radiant/admin/layouts](http://example.com/radiant/admin/layouts) it takes me to  
the correct page. Am I missing something simple?

Cheers,  
Mohit.  
8/18/2007 | 4:36 PM.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [August 20, 2007, 4:52am UTC](https://www.ruby-forum.com/t/silly-question-about-running-from-a-directory/112396/2 "2007-08-20T04:52:32Z")

</div>

Sorry to bother you again, but is there any advice for me?

Cheers,  
Mohit.  
8/20/2007 | 10:50 AM.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [August 20, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/silly-question-about-running-from-a-directory/112396/3 "2007-08-20T16:38:20Z")

</div>

yes, not built for it.

Start by playing with routes.rb

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [August 20, 2007, 5:44am UTC](https://www.ruby-forum.com/t/silly-question-about-running-from-a-directory/112396/4 "2007-08-20T05:44:34Z")

</div>

I recall some questions about this a few months ago and the answer  
was that Radiant was not built for this. That’s not to say that it’s  
not possible, but I don’t know enough at the moment to help.

You may get a better answer from someone else.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [August 21, 2007, 2:55am UTC](https://www.ruby-forum.com/t/silly-question-about-running-from-a-directory/112396/5 "2007-08-21T02:55:49Z")

</div>

Hi Jim and Jacob

Thanks for the clarification.

Cheers,  
Mohit.  
8/21/2007 | 8:54 AM.

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [August 21, 2007, 7:42am UTC](https://www.ruby-forum.com/t/silly-question-about-running-from-a-directory/112396/6 "2007-08-21T07:42:14Z")

</div>

possible solution is to get your separate projects working  
behind a proxy server such as nginx. there you can easily  
setup proxying requests from [http://your.domain.com/](http://your.domain.com/) to  
your main instance of Rails and [http://your.domain.com/site/](http://your.domain.com/site/)  
to your Radiant instance.

nginx is also very fast(fastest?) server at handling multiple  
requests and giving out static files so you can for example  
setup your server in such way that it will return everything  
from /javascripts/ , /images/ , /stylesheets/ or even a cached  
pages \*.html without passing those requests to your Rails or  
Radiant application.

check this out:  
[http://brainspl.at/xen\_and\_the\_art\_of\_rails\_deployment.pdf](http://brainspl.at/xen_and_the_art_of_rails_deployment.pdf)

---

<div class="post-metadata">

**Author:** ![mohits](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@mohits](https://www.ruby-forum.com/u/mohits)\
**Post date:** [August 21, 2007, 9:00am UTC](https://www.ruby-forum.com/t/silly-question-about-running-from-a-directory/112396/7 "2007-08-21T09:00:24Z")

</div>

Hi Keymone,

Thanks for the detailed description. I’m on a shared host right now, so  
nginx won’t be an option yet. But I shall try out some of this on my  
development PC to get a better feel of things.

Cheers,  
Mohit.  
8/21/2007 | 2:57 PM.
