I’m trying to set up a rails app (Radiant CMS) on Apache2 (on Ubuntu).
It sort of works, but I can’t get the right configuration to see the
right items.
When I try to access the site, I’m seeing an unstyled page, and the
apache error log shows:
[Mon Sep 18 23:03:08 2006] [error] [client 10.1.1.101] File does not
exist: /var/www/styles.css, referer: http://10.1.1.104/radiant/
I don’t know why it’s trying to find the style sheet in /var/www.
The app is set up in /var/www/radiant and my Apache site config file is:
DocumentRoot /var/www/radiant/public/
ErrorLog /var/log/apache2/error.log
Alias /radiant /var/www/radiant/public
<Directory /var/www/radiant/>
Options ExecCGI FollowSymLinks
AddHandler cgi-script .cgi
AddHandler fcgid-script .fcgi
AllowOverride all
Order allow,deny
Allow from all
</Directory>
This isn’t the first Rails app I’ve tried to get running under Apache.
Can someone please post the appropriate voodoo to make it work? (BTW,
it works fine using script/server)
Thanks,
jt
Ok, maybe I need to ask a more basic question…
What’s the magic that I need to put into the file in
/etc/apache2/sites-available that will let me access a rails app like:
I don’t want a virtual server (radiant.someserver.com), but use the
format above. I was able to get the Radiant main page to show with
style sheet by changing a line to:
<Directory /var/www/radiant/public/>
But when, in this case, I try to click on an article, it’s assuming
that the app is at the root of the server, so is trying to serve up
If I try to go to the Archives link, which should be
someserver.com/radiant/archives
it’s trying to go to
someserver.com/archives
completely ignoring the directory I set up.
Please?? Any hints or pointers? Setting up a Rails app can’t be this
difficult!
On 9/19/06, John T. [email protected] wrote:
Ok, maybe I need to ask a more basic question…
What’s the magic that I need to put into the file in
/etc/apache2/sites-available that will let me access a rails app like:
Just wondering… should I not even have the item setup in
/etc/apache2/sites-available?
On 9/19/06, John T. [email protected] wrote:
Just wondering… should I not even have the item setup in
/etc/apache2/sites-available?
Nope. That didn’t help.
Again… when I go to http://mysite.com/radiant, I do get the front
page. But all of the links, that should have /radiant/ , don’t:
http://mysite.com/radiant/about is coming out as http://mysite.com/about
and in the Admin pages, when I try to expand one of the sections, I’m
seeing the request headers:
Set-Cookie: _session_id=faa1dbd5cf25b0b70243262c11414317; path=/
Keep-Alive: timeout=15, max=98 Connection: Keep-Alive
Transfer-Encoding: chunked Content-Type: text/html;charset=utf-8 0
Anyone please have a hint on setting up a Rails app on Apache under a
subdirectory???
Please???
Have you considered Lighty? I see some people successfully doing what
you describe using that instead of Apache:
http://pinkpucker.net/2006/1/31/getting-multiple-rails-sites-going-on-one-domain-using-lighttpd
http://forum.textdrive.com/viewtopic.php?pid=62648
I’d try to help from personal experience but I’ve had difficulties
myself hosting two Rails apps on one domain.
Let us know how/when you solve this.