A question about mongrel, apache and authentication.
I’ve got a Rails site with I think a very typical setup: a mongrel
cluster behind an Apache proxy. So Apache’s handling the static stuff
and it hands off dynamic content to mongrel. I want to put the site
temporarily behind Apache’s basic authentication. What I get when I
do this is that is a password prompt which prevents all of the images,
stylesheets and other static files from being loaded unless
authenication passes, but anything mongrel handles is not.
Specifically, a user can just keep hitting “Cancel” at the
browser-generated password prompt and he/she will see that rails
generated content without ever entering any credentials. No styling
and no images, but they do see content. How can I fix it? Mongrel
does not seem to be honoring the authentication (and frankly, I don’t
know if it can). Here’s my apache config:
Did this solution in the proxy balancer posted by rafael worked for you
? because it seems that applying that, I have no authentication anymore
…
Did you find any solution for this problem ?
DocumentRoot /home/foo/current/public
<Directory “/home/foo/current/public”>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
AuthType Basic
AuthName “foo”
AuthUserFile /usr/local/apache2/conf/passwords
Require user bar
RewriteEngine On
Check for maintenance file and redirect all requests
( this is for use with Capistrano’s disable_web task )
But I tried to apply that and I still have the problem. Here is my
situation.
<Proxy *>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order Allow,Deny
Allow from all
Deny from env=blockAccess
AcceptPathInfo Off
Satisfy Any
<VirtualHost *:80>
ServerName my.servername.com
… # this virtual host doesn’t have anymore authentication