Gregarius under LightTPD and FastCGI

Not one to hang around, I decided to give Gregarius a whirl instead of just talking about it. You can find it at http://lakelandedge.co.uk/rss/.

Install was pretty simple as expected, but there were a few gotchas specific to my (and possibly others) configuration as I’m running LightTPD with FastCGI, so I’ll cover them here:

  • It thinks it’s running in the root of your site no matter where it is installed. This is caused by PHP_SELF being empty, for which a solution can be found here
  • It use Apache’s mod_rewrite by default (an understandable, but unfortunate assumption on the developers part)

To save solving these yourself, here are some tailored instructions…

Tailored Install Instructions

  1. Follow the standard install instructions (which recursively links to this post!), but don’t go anywhere near your browser yet!
  2. Modify your php.ini, so that cgi.fix_pathinfo is 1
  3. Now you can browse to you installation
  4. Before proceeding any further, go to the http://example.com/rss/admin/index.php?domain=config (changing the domain & path to suit obviously) and toggle rss.output.usemodrewrite to off
  5. Start using it!

At some point, I may figure out the conversion of the rewrite rules to suit lighttpd, but at the moment I’m not to bothered as I prefer the un-rewritten URLs.

robots.txt

I prefered not to have my installation indexed (whilst googling for tips, I encountered lots of links pointing to feeds within Gregarius installations – very annoying), so I modified my robots.txt accordingly.

Authentication

I went with htdigest protection, but I sure you can figure out how to use basic.

  1. Create a disgest file – I used htdigest from my previous Apache installation
  2. Add the following lines to your lighttpd.conf (in the relevant domain section if you’re hosting multiple sites:
    
    auth.backend = “htdigest”
    auth.backend.htdigest.userfile = ”/path/to/digest_file”
    auth.require = ( ”/rss/admin/” =>
                     (
                       “method”  => “digest”,
                       “realm”   => “Gregarius”,
                       “require” => “valid-user”
                     )
                   )
    
    
  3. Reload lighttpd and check everything is as expected.


About this entry