Piwik is an open source web analytics app similar to Google Analytics. Running on PHP/MySQL, you install it on your server and use javascript to track your pages. Reports produced seem good enough for a self–hosted web traffic analysis solution.