Forum: Radiant CMS How can i deploy radiant application to sub-directory?

24726da689dd03863de8f644922f290d?d=identicon&s=25 Ahn Byungmo (Guest)
on 2010-11-26 07:53
(Received via mailing list)
Hello~ I' m trying to deploy my radiant web application with use
sub-directory

just like below

localhost/
localhost/dictionary

so i've tried to search how to deploy in sub directory in everywhere
then i got some clues about change config/enviroment.rb
to add below line
config.action_controller.relative_url_root = "/dictionary"

and it's simply works nevertheless it's not change about public path,
it's not that story
I mean under public path's  image files or css files are stil in that
path -> public/image.jpg

also it has got one more problem that can't be shown files under assets
path
so when i access to admim page, every css and image files were not be
shown
but still my site was normal, only have problem in admin page

my env is
ruby - 1.8.7
radiantcms - 0.9.1

anyone can help me please?
Ill thank you in little clue!

with Best regards!
58ce6437f17a1ca96049500cf66ece6f?d=identicon&s=25 swartz (Guest)
on 2010-11-27 00:49
(Received via mailing list)
What you've discovered is unfortunately one of Radiant's shortcomings.

Radiant expects to be deployed at the root of your particular domain.

If you want to deploy it into a subdirectory, there is no easy way.
You gonna have to update a lot of files to point to the new
subdirectory (things like css, js, and many others).
It's not hard, just time consuming and error prone.

My recommendation:
If you can, deploy radiant to a subdomain instead of a subdirectory.

For example to dictionary.yourdomain.com instead of yourdomain.com/
dictionary

--
swartz
Ec797ac7978ab39f04b0a5844c234528?d=identicon&s=25 Mohit Sindhwani (mohits)
on 2010-11-27 02:29
(Received via mailing list)
Hi Swartz,

On 27/11/2010 7:48 AM, swartz wrote:
> If you can, deploy radiant to a subdomain instead of a subdirectory.
>
> For example to dictionary.yourdomain.com instead of yourdomain.com/
> dictionary
The Bitnami Radiant stack is configured to work off domain/radiant - you
may be able to get it working if you take a look at that.

This is on Radiant 0.8.1 - http://bitnami.org/stack/radiant
You can get an Ubuntu or OpenSuse image there (OpenSuse was easier for
me with Virtualbox).

Cheers,
Mohit.
27/11/2010 | 9:26 AM.
D24f9cba71237accf4281ed2a9fc3fd2?d=identicon&s=25 Craayzie As a fox (craayzie)
on 2010-11-27 09:44
(Received via mailing list)
Why wouldn't a web-server-level (e.g. Apache) rewrite work?

Thanks,
Fima
24726da689dd03863de8f644922f290d?d=identicon&s=25 Ahn (Guest)
on 2010-11-29 02:14
(Received via mailing list)
Thank you so much for replying.

I should use sub domain instead sub directory.

but I have still wonder about sub directory cuz I saw it's possible to
use sub directory in radiant cms website

http://radiantcms.org/blog/archives/2010/06/25/rad...
(You can now run Radiant from a sub-directory. by Jim Gay)

anyone teach me what is this mean? actually I tried to search about
this, and I've got nothing...

thank you again!
09477c358c5897d44121a248326e16d7?d=identicon&s=25 Jim Gay (Guest)
on 2010-11-29 02:28
(Received via mailing list)
On Sun, Nov 28, 2010 at 8:14 PM, Ahn <b-ahn@cec-ltd.co.jp> wrote:
> anyone teach me what is this mean? actually I tried to search about
> this, and I've got nothing...
>
> thank you again!

I made changes so that the paths were not hard-coded to begin with the
root (in other words, it uses the relative_url_root). I had asked for
some feedback on the mailing list for anyone who was interested in
deploying to a sub-directory but received none. I personally have no
need for this feature.
If you can contribute bug reports or fixes, it would be appreciated; I
must have missed something.
24726da689dd03863de8f644922f290d?d=identicon&s=25 Ahn Byungmo (Guest)
on 2010-11-29 04:00
(Received via mailing list)
Thanks to reply Jim. my pleasure and sorry for disturbing.

Actually, It's working that you made. but the problem is setting I did.

when I write config.action_controller.relative_url_root = "/dictionary"
in enviroment.rb

it works just fine, but when I access to admin page, I could see no css
and image files

it maybe also change assets path to /dictionary, but there is no
/dictionary path physically.

so I tried link by follow command ->  ln -s /webapps/mycook/public
/webapps/mycook/public/dictionary

from that, it works fine! my question is, is this best way I can? and is
this correct way in radiantcms?

that's all~ anyway I think I solve this problem from kindness people

thanks a lot :)
56ecbe7ccdf5bb2aa386f56de6dc9238?d=identicon&s=25 Lord.Quackstar (Guest)
on 2010-11-29 15:37
(Received via mailing list)
What about a simple .htaccess rewrite rule?


Something like:
RewriteCond %{REQUEST_URI} !^/dictionary [NC]
RewriteRule ^(.*)$  /dictionary/$1 [QSA,L,NC]

Note: The above is untested.



________________________________
From: Ahn Byungmo <b-ahn@cec-ltd.co.jp>
To: radiantcms@googlegroups.com
Sent: Sun, November 28, 2010 9:59:40 PM
Subject: Re: [Radiant] Re: How can i deploy radiant application to
sub-directory?

Thanks to reply Jim. my pleasure and sorry for disturbing.

Actually, It's working that you made. but the problem is setting I did.

when I write config.action_controller.relative_url_root = "/dictionary"
in
enviroment.rb

it works just fine, but when I access to admin page, I could see no css
and
image files

it maybe also change assets path to /dictionary, but there is no
/dictionary
path physically.

so I tried link by follow command ->  ln -s /webapps/mycook/public
/webapps/mycook/public/dictionary

from that, it works fine! my question is, is this best way I can? and is
this
correct way in radiantcms?

that's all~ anyway I think I solve this problem from kindness people

thanks a lot :)
This topic is locked and can not be replied to.