Forum OpenACS Q&A: Using OpenACS 4.x with redirector

Collapse
Posted by Jun Yamog on
Hi,

I wanted to ask if anybody has done this.

Basically I want to house multiple sites under one instance of OpenACS
4.x.  This sites are relatively static.

On the Site map it will like this:

/site1/blah
/site2/blah

site1 and site2 are subsite.  Each of them having a different master
template which is configured via the Sub site parameters.

I would want to make a redirector in front. So that

www.site1.com got to www.myserver.com/site1

www.site2.com -> www.myserver.com/site2

Options are probably.  Reverse proxy squid.  Apache server mod_rewrite.

Basically just rewrite the domain and add the subsite directory.

I would like to gather more options that must have the following
properties.

- OpenACS 4.x will me unmodified including Aolserver.  So I think
ns_unix might not be ok here.
- Will only use minimal IP address.
- Opensource solution.

Jun

Collapse
Posted by Alex Sokoloff on

Funny you should ask this. I'm after the same thing. Apparently someone already modified the request processor to do this for ACS 4 Classic, and it was discussed in this here thread in web db. I haven't had any luck so far getting ahold of Mark Dettinger, though. Does anybody know how to get ahold of this patch?

Collapse
Posted by Alex Sokoloff on
Oops... what I'm after probably doesn't meet the criteria of "OpenACS 4.x will me (be) unmodified". I don't understand the point of such a restriction, but whatever.
Collapse
Posted by Walter McGinnis on
Good news.  I dug up the patches that I downloaded way back
when (mentioned in the thread linked to above, which has a now
dead link for the code).  They can be found here:

https://openacs.org/new-file-storage/one-file.tcl?file_id=218

Can we get this included OpenACS 4?  Seems like a lot of
people want it.

I tried entering it as a feature request for the acs-subsite
package, but the SDM is being flaky.

Collapse
Posted by Jun Yamog on
The reason why no modification on OpenACS 4.0 is that I would not want to ask more stuff on OpenACS team.  They are very busy in porting.  Also if its something that is separate there maybe additional benefits  such as caching, and can work non OpenACS sites too.

I like keeping things incomplete and simple to make complete and complex solutions. =)

Jun

Collapse
Posted by Alex Sokoloff on
Bravo. I haven't tried the patch yet with OpenACS, but it seems to work great with ACS Classic, with one little tweak (courtesy of Johnathan Liu at Ybos). The included file request-processor-procs.tcl had some extra code in it, not germane to the patch, that didn't work with our setup. The patch code is clearly marked off in the file - in rp_filter and a couple of procs at the end - so you can extract it quite easily and add it to your existing request-processor-procs.
Collapse
Posted by Alex Sokoloff on
I forgot: Thanks, Walter!
Collapse
Posted by Don Baccus on
Walter ... do you want to squeeze this into our OpenACS 4.x release?  It sounds like you'd need to pick up a small patch from Ybos that Alex has, but other than that it would be easy to apply?
Collapse
Posted by Walter McGinnis on
Don,

I'm willing to apply the patches necessary to have subsites be
domain/host aware, but realistically it will be next week before I
can.  If anyone else is willing to do it sooner, that would be great.
Otherwise, I'll do it next week.

Collapse
Posted by Don Baccus on
I think next week will be fine (though of course I won't complain if someone jumps in and offers to do it sooner!)