Multiple Rails Apps in 1 Virtual Host on Apache 1.3

After attempting this on my own using the Apache “Alias” directive I
noticed that it did not work in all cases:

http://myserver/app1/ (this worked)
http://myserver/app1 (this failed, I won’t bore you with the rewrite
logs of why)

This led me to the following article
http://wiki.rubyonrails.com/rails/pages/HowtoDeployMoreThanOneRailsAppOnOneMachine

Which I followed.

Must to my sorrow I get the same behaviour as using “Alias”.

I found I can fix this using another rewrite rule:

RewriteRule ^/app1$ /app1/ [r]

I would like to get this working without having to do the redirect, has
anybody else had this problem?

I am runnig Linux, apache 1.3 and the latest Rails version.

On Fri, Jan 13, 2006 at 03:45:04PM +0100, Paul Barclay wrote:
} After attempting this on my own using the Apache “Alias” directive I
} noticed that it did not work in all cases:
}
} http://myserver/app1/ (this worked)
} http://myserver/app1 (this failed, I won’t bore you with the rewrite
} logs of why)
}
} This led me to the following article
}
http://wiki.rubyonrails.com/rails/pages/HowtoDeployMoreThanOneRailsAppOnOneMachine
}
} Which I followed.
}
} Must to my sorrow I get the same behaviour as using “Alias”.
}
} I found I can fix this using another rewrite rule:
}
} RewriteRule ^/app1$ /app1/ [r]
}
} I would like to get this working without having to do the redirect,
has
} anybody else had this problem?
}
} I am runnig Linux, apache 1.3 and the latest Rails version.

Actually, this is exactly what you should do. If you watch what
webservers
do when you ask for a directory without the terminal slash, it redirects
you to the URL with an appended slash. The redirect you are using is
right
and proper. Why don’t you like it?

–Greg

No good reason really…

I just wanted to do it without the redirect to keep my superiors happy
as they felt the redirect was a bit clumsy.

Thanks for the feedback.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs