[Instiki] mongrel_rails and apache for instiki
Selvig, Andy
Andy.Selvig at goodrich.com
Wed Oct 31 12:41:46 EDT 2007
Not sure about SSL. I have a machine with 3 rails apps, all on mongrel,
behind an apache reverse proxy. I'm not using virtual hosts, though.
Here's my (Windows) setup, if it helps:
In the apache conf file, each rails app (including instiki) gets
something like this:
## wiki
Alias /wiki "C:\wiki\instiki\public"
<Directory "C:\wiki\instiki\public">
Options Indexes FollowSymLinks
AllowOverride none
Order allow,deny
Allow from all
</Directory>
ProxyPass /wiki/images !
ProxyPass /wiki/stylesheets !
ProxyPass /wiki/javascripts !
ProxyPass /wiki/ http://127.0.0.1:2500/wiki/
ProxyPassReverse /wiki/ http://127.0.0.1:2500/wiki/
# reverse proxy link mapping
ProxyHTMLURLMap http://127.0.0.1:2500/ /wiki
<Location /wiki/>
#ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /wiki/
ProxyHTMLURLMap /wiki /wiki
RequestHeader unset Accept-Encoding
</Location>
Each app has a different port, name, and directory. To run mongrel for
the above example:
> mongrel_rails start --prefix=/wiki -p 2500 -e production
The prefix option for mongrel and the fact that the
ProxyPass/ProxyPassReverse directives are a bit different than
recommended is to make rails redirects work properly. I could never get
it to work right the way you had it set up.
Hope this helps.
Andy Selvig
________________________________
From: instiki-users-bounces at rubyforge.org
[mailto:instiki-users-bounces at rubyforge.org] On Behalf Of Charlie Caroff
Sent: Wednesday, October 31, 2007 11:21 AM
To: Instiki-users
Subject: Re: [Instiki] mongrel_rails and apache for instiki
Well, I tried to use apache as explained on the instiki.org site. I put
something like this into a name virtual host container in my apache 2.2
./extra/httpd-vhosts.conf file:
ServerName
wiki.mydomain.com
ProxyRequests Off
ProxyPass / http://127.0.0.1:2500/
ProxyPassReverse / http://127.0.0.1:2500/
<Proxy http://127.0.0.1:2500/*>
Order deny,allow
Allow from all
</Proxy>
And it works, sort of. Every time instiki wants to do a redirect, it
wants to redirect to https, and it fails, because a different host is
set up using https. But, when I take the "s" out of http, and reload
the page -- all the pages work.
I have ssl set up for one of my rails projects on this machine, but not
for this one. I have another project set up without ssl on that same
machine, and that project works just fine.
The two working projects -- one ssl, one not -- are both running on
mongrel_rails and apache, which I like. So I decided to set my instiki
project up with the same config.
Trouble is -- I don't understand what the setup for instiki would be
doing. I guess I probably need to set up a Virtual Host container
inside my httpd-vhosts.conf file, with the mongrel config, and the
reverse proxy config. But when I try to do that, I get the same problem
as without the mongrel config -- every request tries to go through
https.
Is the problem that this reverse proxy config will simply not work on a
machine that is running ssl for a different domain?
Charlie
On 10/31/07, Selvig, Andy <Andy.Selvig at goodrich.com> wrote:
I don't know about doing a mongrel cluster, but running instiki
on mongrel should be exactly the same as running instiki on any rails
app. Apache shouldn't know the difference (assuming you're using apache
for reverse proxy or similar).
Andy Selvig
________________________________
From: instiki-users-bounces at rubyforge.org
[mailto:instiki-users-bounces at rubyforge.org] On Behalf Of Charlie Caroff
Sent: Tuesday, October 30, 2007 11:59 PM
To: instiki-users at rubyforge.org
Subject: [Instiki] mongrel_rails and apache for instiki
Hello,
Does anyone have a tutorial on how to set up a mongrel_rails
cluster with apache for instiki? I have mongrel rails and apache
working for two other ROR projects, but the setup for instiki is so far
eluding me.
Charlie
_______________________________________________
Instiki-users mailing list
Instiki-users at rubyforge.org
http://rubyforge.org/mailman/listinfo/instiki-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/instiki-users/attachments/20071031/56e23da2/attachment.html
More information about the Instiki-users
mailing list