Error pages/Web Authentication

HTF nginx-forum at nginx.us
Fri Jun 10 01:43:14 MSD 2011


Maxim Dounin Wrote:
-------------------------------------------------------
> 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)#Traditio
> nal_DES-based_scheme

OK, I tried both switches -m (MD5) and -s (SHA) and I wasn't able to log
in. The log file shows  "password mismatch". The only method that works
is DES (htpasswd without any switch). Do I have to install some
additional module or so?

> 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.

I had the default location for php "location ~ \.php$" and when I
changed to "location = /index.php" all none existing pages are
redirected to Joomla error page - which is great however "index.html"
still shows Nginx error page (index.htm shows Joomla error page) - I'm
very close. I also noticed that now when I access some directories the
web browser is trying to downland files.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,205299,205475#msg-205475




More information about the nginx mailing list