DreamHost: getting to stats pages

— March 1, 2006 at 06:10 PST


I use DreamHost for my webhosting and so far I've been generally pretty pleased with their package and support. I've yet to try a major Rails app, but I have this Typo blog running and a couple toy apps I built for friends.

Minor annoyance: I discovered that deploying a Rails app on a domain blocks access to the Analog stats pages. I pinged tech support and they came back with this quick fix. Just add the following lines to the .htaccess file, immediately after the RewriteEngine on directive.

# enable analog stats pages
RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]

Now go to yourdomain.com/stats (you'll need to authenticate) and you can see your site's statistics again. And your Rails app should still work just fine (which is the important part). Wasn't that easy?

2 commentshosting, rails

Comments
  1. abizer2006-03-06 15:35:31

    Thanks very much for this. I'd already found it, but the instruction to put the block straight after the RewriteEngine on directive did the trick.

  2. dsisnero2006-03-24 09:45:00

    Good stuff! can you do part 3? I am planning on doing something similar and just getting into edge rails

    thanks

Sorry, comments for this article are closed.