Showing posts with label dns. Show all posts
Showing posts with label dns. Show all posts

Tuesday, June 22, 2010

Grails multiple web sites, same web application

We had a need recently to have one web application serving many web sites, where the same data schema was in place with data shared across multiple web sites, but we wanted to show different styling and different data depending on the URI. In the end it turned out to be fairly simple. With our naming conventions, it's possible to hit one of several URIs for the same site, such as:

* project.testing.com
* project.staging.com
* project.com

So I had created a domain lookup service that when passed the request URI could work out what site the request for targeting.


def targetUri = request.getServerName()


I did a lookup for that target name against an object stored in the database relating to that targetUri and passed that back, making it available for queries for the correct data to show, and passing that down into the views to render the relevant CSS and Javascript files.

Saturday, November 03, 2007

my blog stability

I've been told that my blog has been a little unstable over the last few weeks and after investigating the good people at GoDaddy.com told me how I'd mis-configured my named servers, whoops!

Hopefully anyone affected shouldn't have any more problems, but please let me know if you do.

Robbie