Search

Chaps

Sweet sweet memories

Blather

Uptime verified by Wormly.com

12 August 2008

Apache 2, mod_passenger and HTTP Authentication

Using Lighttpd and FastCGI for Rails you can use Lighty's HTTP Authentication to "protect" an application. But the equivalent doesn't work with Apache 2. Putting the Apache authentication stuff in a <Directory> block will protect all the styles and scripts but no the application itself. You need to use a <Location> block for that.

<Location /*>
    AuthType Basic
    AuthName "Beta Testing"
    AuthUserFile /path/to/htpasswd
    Require valid-user
</Location>

Comments

No comments yet.

Leave a comment

Markdown
  • **bold text**
  • *italicized text*
  • > This text is blockquoted
  • * This is an unordered list item
  • 1. This is an ordered list item
  • [Link Text](http://www.example.com/)
  • `code item`

0.276 seconds