Proposal: Use this template for new proposals
(proposals should start with name Proposal)
Status |
Proposal still being written |
Target Release |
4.1 |
Original Authors |
Dave Johnson |
Abstract
This is a proposal to enable simple multi-domain support in Roller. It is based on code that I have in production, which enables me to run http://rollerweblogger.org and http://photophys.com via of the very same Roller instance.
Requirements
- Allow once Roller instance to specify different URLs for different weblogs
- Ensure that each weblog is only access by one root URL
Issues
Is this simple design what we want to support in Roller?
Design
From the user's point of view, once this proposal is implemented in Roller, all you have to do to enable multi-domain support in Roller is to add one configuration property to Roller for each blog that you would like to give it's own unique domain name to.
For example, on rollerweblogger.org, I wanted my dad's photo-physics blog to have it's own unique URL. So, I added this property to my roller-custom.properties
file:
weblog.absoluteurl.photophys=http://photophys.com guice.backend.module=org.rollerweblogger.roller.JPAWebloggerModule
And I had to add that second line to hook in the mutli-domain implementation, so let's talk about that. The implementation is made up of these five parts:
- Weblog.java: changed to return correct weblog URL based on weblog.absolute.* property
- WeblogRequestMapper.java: changes to prevent weblogs from being referred to by two URLs
- MutliDomainURLModel.java: new class to return correct URLs
- MultiDomainURLStrategy.java: new class to return correct URLs
- JPAWebloggerModule.java: new class to hook in MultiDomainURLStrategy.java
Comments
Please comment on the Roller dev mailing list.