Error pages/Web Authentication

Maxim Dounin mdounin at mdounin.ru
Thu Jun 9 21:58:19 MSD 2011


Hello!

On Thu, Jun 09, 2011 at 01:01:05PM -0400, HTF wrote:

> Hello,
> 
> Thanks for reply. I really appreciate your help.
> 
> Maxim Dounin Wrote:
> -------------------------------------------------------
> > By MD5 you mean $apr1$ password scheme, as
> > generated by htpasswd 
> > -m?  It's supported since 1.0.3 and don't have any
> > length 
> > limitations.
> 
> Yes, that's correct. I've created my password without any additional
> switch so I assumed it's MD5 (htpasswd -m), the password is:
> - "abcdefhi12" - however I can log in when I type only first eight
> characters "abcdeghi"

Without any switches htpasswd used to produce traditional DES crypt 
passwords on unix, they are indeed limited to 8 chars (see [1]).  In 
recent versions default was changed to produce $apr1$ instead, but 
this wasn't long ago.

[1] http://en.wikipedia.org/wiki/Crypt_(Unix)#Traditional_DES-based_scheme

> > It looks like you have "location ~ \.html$" and
> > "location ~ 
> > \.php$" which match (a) and (b) and you don't have
> > any Joomla 
> > fallback there.  If you want to pass anything
> > non-existant to 
> > Joomla - make sure to actually pass anything.
> 
> Could you please help me with this. I add the 'default_server' to the
> "location ~ \.html$". Do I have to set anything else?

default_server isn't related to location at all, it's listen 
directive option.

Simple config which should work will look like

server {
    listen ...
    server_name ...
    root ...

    location / {
        try_files $uri $uri/ /index.php?q=$request_uri;
    }

    location = /index.php {
        fastcgi_pass ...
    }
}

(and no other locations)

Alternatively you may add try_files to .html / .php locations.

Maxim Dounin



More information about the nginx mailing list