We have a PHP site running on apache 1.3 and Im trying to graft typo
onto it at /blog/. Ive got the running using the symlink method but
apache/fastcgi are clunky to say the least so I want to move typo over
to lighttpd. Ive got this all working and Im now trying to get a
proxy working through from apache. Im using this:
This is working fine apart from Rails thinks its at the root of the
site so all the links (from link_to etc) come out as
/articles/whatever instead of /blog/articles/whatever. Does anyone
know of a way around this or even an alternative set up which might
work. I would even consider moving the PHP portion of the site over
if that makes it easier. Any wisdom on this? Ive ploughed through
all the wiki and other articles on the subject but found no solution
as yet.
Hope someone can help me out, Ive been tearing my hair out over this for
days…
Thanks in advance for saving what’s left of my hair,
/articles/whatever instead of /blog/articles/whatever. Does anyone
know of a way around this or even an alternative set up which might
work. I would even consider moving the PHP portion of the site over
if that makes it easier. Any wisdom on this? Ive ploughed through
all the wiki and other articles on the subject but found no solution
as yet.
After some reading of actionpacks source code I came up with a really
nice solution to this problem (and other related problems) so I
thought I’d post here for anyone else who might be interested. In one
of the environment files add:
where /blog is the directory your rails app will work under. This
causes Routes and all the url helpers to work correctly under lighty
(on apache action pack works this out for itself).
Thanks very much, I’ll try that. I’ve been trying to use
proxypassreverse but to know avail so far.
What does proxypassreverse do exactly? Does it just fix the redirects?
Yeah, that’s it. The important part of the fix is the lighttpd option
though – I think you can successfully use either the mod_rewrite or the
ProxyPass style of configuring Apache.
Chris.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.