Archive for December, 2009

The reason for the reason for the season

Sunday, December 27th, 2009

I’ve been reflecting this past week about Christ’s birth and how this time of the year “the reason for the season” often references Luke chapter 2. Last weekend I spent time in this passage and Romans 3:10-18, John 3:16 and Matthew 7:21-23. These last three versus are the ones God seemed to press on me at the time to depict our sin, need for a saviour, God’s Love, the provision he sent and the requirement to know and follow him for salvation. In this New Testament era this gospel presentation seems like a great explanation of the reason for the reason for the season. Though, today Romans 11 was taught at church and I’ve also been preparing for leading worship at youth group at the January youth group meeting where Romans 12:1-2 will be taught. These passages seemed to open up a gospel message into some theology to chew on.

In college the phrase “what’s the therefore there for?” was burned into my brain for all eternity. Whenever I read Romans 12:1 that phrase pops into my head. Though, I hardly ever take the time to go back to Romans 11 and remind myself of it. It was nice to have just been taught on Romans 11 this morning as I was meditating on Romans 12:1 in preparation for the youth group meeting.

Enter the therefore, helping us understand God’s mercy.

25 Lest you be wise in your own sight, I want you to understand this mystery, brothers: a partial hardening has come upon Israel, until the fullness of the Gentiles has come in. 26And in this way all Israel will be saved, as it is written,
“The Deliverer will come from Zion,
he will banish ungodliness from Jacob”;

27“and this will be my covenant with them when I take away their sins.”28As regards the gospel, they are enemies of God for your sake. But as regards election, they are beloved for the sake of their forefathers. 29For the gifts and the calling of God are irrevocable. 30For just as you were at one time disobedient to God but now have received mercy because of their disobedience, 31so they too have now been disobedient in order that by the mercy shown to you they also may now receive mercy. 32For God has consigned all to disobedience, that he may have mercy on all.

33Oh, the depth of the riches and wisdom and knowledge of God! How unsearchable are his judgements and how inscrutable his ways!

34“For who has known the mind of the Lord,
or who has been his counselor?”
35
“Or who has given a gift to him
that he might be repaid?”

36
For from him and through him and to him are all things. To him be glory forever. Amen.

Romans 11:25-36 (ESV)

I think the meat of where we can understand the mercy 12:1 is referencing is in versus 27-32. Israel was disobedient and enemies of God so that we could receive mercy, that is, Christ’s sacrifice for our sins. Now by the mercy shown to us, because of their disobedience, they too can receive mercy for their disobedience. Christ is the reason for the season. The reason he came was just not just to save sinners. The reason he came was so that God could have mercy on all (Rom 11:32).

I often get wrapped up in my sinful self-centred-ness. God is quick to remind me that his plan is much bigger than my simple mind can comprehend. After reminding me this, again, a response to this understanding has been so eloquently placed just following the text at the end of chapter 11 with an appeal to begin chapter 12:

1 I appeal to you therefore, brothers, by the mercies of God, to present your bodies as a living sacrifice, holy and acceptable to God, which is your spiritual worship. 2 Do not be conformed to this world, but be transformed by the renewal of your mind, that by testing you may discern what is the will of God, what is good and acceptable and perfect.

Merry Christmas

Tobacco Road Marathon

Tuesday, December 15th, 2009

Tobacco Road Marathon is a new marathon in Cary, NC. I just signed up for the half marathon, it will be my first. Part of the route is on the American Tobacco Trail. It’s an old railway that has been re-purposed as a recreation trail in Wake and Chatham Counties in North Carolina.

Wordpress mu non-wildcard vhosts

Friday, December 4th, 2009

*** UPDATE ***
This hack is probably unnessesary, I found that wp-mu has a sites framework that is not exposed, there is a plugin that’s trying to accoplish the same thing I am. Just google ‘wordpress mu sites’
*******

I need to have multiple wordpress instances installed, but I want them each to have their own vhost, I also want an easy way to maintain them (upgrades and such). I thought wordpress mu could do this… but out of the box it only supports wildecards on a single domain. (blog1.example.com and blog2.example.com and blog3.example.com) Turns out you can change 2 lines (3 if you want to clean up a view cosmetically) and you seemingly can use wordpress-mu to host multiple domains. www.blog1.com and www.blog2.com and www.blog3.com

I’ve not deployed this yet… so use at your own risk. I’ll post again later with results after I’ve migrated a couple sites to it.

The problem: wp-mu assumes in vhost mode that all your blogs are of convention {something_here}.example.com. It does this by concatenating the domain you configure at install time onto the name of any new wordpress site you setup.

The solution: tell it not to append your installed time configured domain when you setup a new site. No special magic seems to happen with a new wordpress site’s configured domain after install time.

To show how this works this we’ll setup an example.com instance of wordpress mu and replace the wildcard magic so that not-example.com is hosted by the same code base.
1. download and and install wp-mu just as they tell you to, use example.com (set a hosts record to point example.com to your localhost) You’ll now have a fresh new wp-mu blog at example.com.
2. patch the files to remove the wildcard vhost magic
a. This change will remove the hardcoded base domain and will assume the domain name you’re accessing wordpress with is the current domain. Without amking this dynamic the authentication would fail on some or all of the configured sites.

wp-config.php
@@ -38,7 +38,7 @@
-define(‘DOMAIN_CURRENT_SITE’, ‘example.com’);
+define(‘DOMAIN_CURRENT_SITE’, getenv(‘HTTP_HOST’));

b. This is the concatenation magic that we want to prevent from happening. It undoes the “force append install-time configured domain” or in our example case, don’t force .example.com on the back of my new blog.

wp-admin/wpmu-edit.php
@@ -147,7 +147,7 @@
if( constant(‘VHOST’) == ‘yes’ ) {
-                       $newdomain = $domain.”.”.$current_site->domain;
+                       $newdomain = $domain;

c. This last one is optional. It’s just removes the domain name below the test box on the form for a new blog. This is a pure cosmetic change.

wp-admin/wpmu-blogs.php
@@ -582,7 +582,7 @@
<?php if ( constant( “VHOST” ) == ‘yes’ ) { ?>
-                                                       <input name=”blog[domain]” type=”text” title=”<?php _e(‘Domain’) ?>”/>.<?php echo $current_site->domain;?>
+                                                       <input name=”blog[domain]” type=”text” title=”<?php _e(‘Domain’) ?>”/>

3. Add a new wp site at not-example.com (add the hosts record that points to localhost again to test)
4. use the dashboard -> tools -> export to get an xml dump of a single instance blog that you can import into a wp-mu managed blog.

Like I said I’ve not actually deployed this yet, but authentication in and out of the two domains dashboard and frontend seem happy. I’ll be sure to update this post with any other issues I come across. let me know if you try it and if it works!