OmniFocus syncing with Apache 2.2 WebDAV

Posted by matt on April 28, 2009

In my quest to get back on the GTD wagon, I decided to spring for a copy of OmniFocus for both the Mac and the iPhone.   One neat feature is the ability of the app to use WebDAV to store the database on a web server and then sync between the two versions remotely.  I will probably always have my phone with me when I am using my laptop, so I don’t know how critical this feature will be for me.  However it does provide for a remote backup of the data, plus allows me to pull the data down when I want it instead of having to remember to sync “one more thing” on the phone before heading out the door.  You can use a MobileMe account to do this, but since I’m a cheapskate I had to figure out how to do this with the servers I already pay for.  A quick google search showed some nice blog posts on getting this setup using Mac OS X Leopard, but I wanted to run this on my Ubuntu server. So here’s basically what’s needed. First, make sure you have apache2 installed. I won’t cover that here. You need to enable mod_dav and mod_dav_fs.

sudo /usr/sbin/a2enmod dav
sudo /usr/sbin/a2enmod dav_fs

I also wanted ssl enabled so I wasn’t sending credentials in the clear. Turns out that the ssl certificate script (apache2-ssl-certificate) that most tutorials mention is not included with apache anymore. But you can do basically the same with the ssl-cert package, so install that as well as openssl if it’s not installed already. One problem is the cert is only good for one month, so if ignoring the warning you get from OmniFocus bothers you, you can fix that later by generating a cert with a longer expiration, or getting a real one.

sudo aptitude install openssl
sudo aptitude install ssl-cert

This should create a certificate and put it in /etc/ssl/private/localhost.pem. Then enable the ssl module and the ssl configuration on apache.

sudo a2ensite ssl
sudo a2enmod ssl

Then, create an htpasswd file that will be used to authenticate for your directory. I put mine in /etc/apache2.


sudo htpasswd -cs webdav.passwd username

Then follow the prompts.

You need to setup your config for the ssl part of your server, it will be in /etc/apache2/sites-enabled.   You need to pick a location on your server to host the data.   Whereever you put it, make sure it’s owned by the user that apache runs as:

sudo chown -R www-data:www-data data/

Here’s a sample config:

<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/ssl/private/localhost.pem
Alias /data "/opt/data/"
<Directory "/opt/data">
Dav On
Order Allow,Deny
Allow from all
AuthType Basic
AuthName WebDAV-Realm
AuthUserFile "/etc/apache2/webdav.passwd"
require valid-user
</Directory>
</VirtualHost>

Just restart your server and hopefully everything is setup.

sudo apache2ctl graceful

You can check it from a browser by navigating to https://yourdomain.com/data, assuming no other apache strangeness has been configured.

Never take points off the board!

Posted by matt on September 16, 2007

Note to Pat Fizgerald – the saying “Never take points off the board” is true. After watching what is arguably the worst team in college football hang on to beat you, I know this is true. NU had over 500 yards of offense last night in its loss to Duke, but only came away with 14 points. NU kicked a field goal at the end of the first half on a 4th and 7, but there was a running into the kicker 5 yard penalty. Instead of leaving the points on the board, he went for it on 4th and 3 and didn’t make it. Then, in the second half NU was in the red zone twice at the end of the game and had to go for it both times. A field goal would have tied it. Two field goals would have won it because Duke missed a PAT earlier.

Even with 125 yards of penalties, 2 turnovers, and countless other errors, NU still had a chance to win. Too bad the coaches had to kill that chance. Hopefully this is a lesson for him, but it doesn’t seem like he should be learning these lessons at this level.

Biggest choke… ever

Posted by matt on October 21, 2006

I just got back from witnessing the sorriest display of football I’ve ever seen in my life. And that’s saying something if you are a Northwestern fan. NU just allowed the biggest comeback in NCAA history. That’s a lot of years, a lot of games, and a lot of circumstances, and I got to see the worst ever. The score was 38-3 in the middle of the third quarter, and they somehow managed to lose 41-38. In that span were two interceptions (one in the end zone), a blocked punt returned for a touchdown, and a lot of bad defense.

Arizona Cardinal fans should have nothing to be ashamed of, losing to the Bears last Monday night by giving up two touchdowns late in the game. At least the Bears are a good team, and they gave up the points to the defense which is the strength of the team. MSU should more likely be on the losing side of a game like this after giving up a huge lead to lose to Notre Dame earlier this season.

It seems with Northwestern that when you can’t believe they could lose in a bigger way (see my earlier post for some examples), they always surprise you.

You know the players have the talent to win, but once you are a part of a losing tradition and have seen your team fall apart, it’s really hard to not see it coming as soon as things start to turn. As a fan, I already saw them losing as soon as it was 38-17, and once the punt was returned for a touchdown, I should have just gone home. NU used to be the team making the comebacks (witness the Iowa win last year, which I gave up on early), but I think they are a long way away from that now.

Halfway through the third quarter this felt like a real turning point for the team, they seemed to have found an offense and a real gem of a quarterback in Bacher. The sidelines looked pumped, and the offense was racking up yards. The defense was spirited and had made some big stops. Now, I don’t know where you go from here.

Looks like a 2-10 season to me.

Northwestern finds the best ways to lose (and win)

Posted by matt on September 19, 2006

As a Northwestern alumnus, it never fails to amuse me when the sports media seems to be shocked when NU loses it’s annual “shocker”. For example, Mike Downey from the Tribune recently found the NU loss to New Hampshire to be quite a shocker. But as an NU fan since I enrolled in the fall of ‘91, I have seen my fair share of shockers.

Who can forget the 1995 Rose Bowl team losing quite a shocker to Miami, OH (thanks Randy!), where they gave up a three touchdown lead in the fourth quarter, just a week after shocking Notre Dame.

Or how about the 2001 42-43 loss to Bowling Green, where NU gave up touchdowns, two point conversions, and onside kicks in a dizzying array of failures.

How about Brian Huffman missing five field goals in one game where NU had 637 yards of offense (wow!) and still lost the game. That was the same year we beat #7 Ohio State.

Or even better, look at the 2005 Sun Bowl where NU gave up a 22-0 lead, lost 50-38, and gave up 2, yes 2, onside kicks for touchdowns, both of them returned by the same guy. It was like watching an instant replay. Has that ever happened before in college football history? How about high school? Pee wee?

So, no, losing to New Hampshire (ranked #2 in NCAA Division 1-AA) was not a shocker. I was there, and most people didn’t even complain that much.

I don’t want to complain too much, though. I remember when I was in college, the idea that NU would ever be in a bowl, let alone beat Michigan (several times in great games), Ohio State (another all time great game), and Penn State (heck… every single Big Ten team, and lots of them in huge comebacks with last second heroics) in the years since I’ve graduated, win three Big Ten titles, and go to four bowl games was out of the question. I remember tearing down the goalposts after we beat #17 Illinois, running with them all the way to the lake, and tossing them in during a rainstorm. I guess things have changed.