English 中文(简体)
How can we get multi_site extension for Radiant working on Heroku?
原标题:

Has anyone got RadiantCMS with multi_site working on Heroku? I actually tried it and it bombed big-time giving the error:

Heroku | No such app
There is no app configured at that hostname.
Perhaps the app owner has renamed it, or you mistyped the URL.

This is what I tried:

  1. Go to tractor.heroku.com and login using admin / radiant.
  2. If you see the Sites section, you will find Foo and Bar sites.
  3. I edited my /etc/hosts files and added foo.myapp.com and bar.myapp.com to the IP address that resolves to tractor.heroku.com (Not entirely sure if this is right)
  4. Now type the URL "http://foo.myapp.com" in the browser and it gives me the above error.

Is there some special configuration required to get this working on Heroku?

最佳回答

So, I finally did get an answer from heroku support themselves. Pasting it here for everyone s benefit:

reception said: fyi if you want a 301 redirect from appname.heroku.com url to yourdomain.tld i succeeded with this steps:

  1. freeze radiant (in order to be able to modify application_controller.rb; see http://wiki.github.com/radiant/radiant/running-on-edge )

  2. add this code to application_controller.rb inside class ApplicationController:

---->8

before_filter :redirect_domain
def redirect_domain
  if request.host ==  appname.heroku.com 
    redirect_to "http://yourdomain.tld#{request.request_uri}", :status=>301
  end
end

---->8

(big thanx to David from suppport!)

regards D

问题回答

暂无回答




相关问题
Packaging precompiled binaries inside of a gem

I ve got a ruby web app that uses lilypond to generate sheet music based on user input. I d like to move the hosting to heroku (I ve recently used heroku on a few projects and really liked it, plus ...

ActiveScaffold on Heroku s read-only file system?

ActiveScaffold apparently creates public/blank.html every time the server starts, even if that file already exists (so adding it to version control doesn t help). This is causing my application to ...

git push heroku master permission denied on VISTA

(Using Vista)I m trying to clone an app from my GitHub Repository and push it into Heroku. Okay, so I ve tried to create an SSH key so many times with this: `ssh-keygen -t rsa` It seems to go ...

SSH Public key denied on "git clone" command

I am trying to clone a git repo that I forked in my GitHub Repository.It s a rails app. I want to clone it on my local git so that I can push it onto heroku. I generated a set of rsa keys and copied ...

heroku using git branch is confusing!

Ok, so I have a big github project that i m not supposed to merge my little Stacia branch into. However, it seems like Heroku only takes pushing MASTER seriously. It looks like I pushed my branch, but ...

PostgreSQL GROUP BY different from MySQL?

I ve been migrating some of my MySQL queries to PostgreSQL to use Heroku. Most of my queries work fine, but I keep having a similar recurring error when I use group by: ERROR: column "XYZ" must ...

热门标签