DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-05-19 00:27:09

NASuser
Member
Registered: 2008-05-01
Posts: 16

lighttpd + htaccess

Hi,

I'm runnning lighttpd and php without problems on my Coneptronic CH3SNAS.
I want to use htaccess to secure my folders.

If I browse to "http://192.168.178.3:8080/secure" I get an Index Of WITHOUT CHECKING PASSWORD.
Where's the problem?
Here's my lightpd.conf:

Code:

## modules to load
server.modules              = (

                                "mod_access",
                                "mod_auth",
                                "mod_fastcgi",
                                "mod_accesslog" )

## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root        = "/mnt/HD_a2/www/pages/"


## php support
## uncomment the following lines and the mod_fastcgi module above
fastcgi.server = ( ".php" => ((
    "bin-path"  => "/mnt/HD_a2/fun_plug.d/bin/php-cgi",
    "socket"    => "/tmp/php-cgi.socket",
    "max-procs" => 2
)))

[...]

#### auth module
## read authentication.txt for more info
 auth.debug                 = 0
 auth.backend              = "htpasswd"
 auth.backend.htpasswd.userfile =  "mnt/HD_a2/www/secure/lighttpd-htpasswd.user"
#auth.backend.plain.groupfile = "lighttpd.group"

#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn  = "dc=my-domain,dc=com"
#auth.backend.ldap.filter   = "(uid=$)"

 auth.require               = ( "/secure/" =>
                                (
                                  "method"  => "basic",
                                  "realm"   => "File_server",
                                  "require" => "valid-user"
                                )
                               )

Last edited by NASuser (2008-05-19 15:15:20)

Offline

 

#2 2008-05-19 11:43:47

NASuser
Member
Registered: 2008-05-01
Posts: 16

Re: lighttpd + htaccess

I'm so stupid. big_smile
Forgot to restart the server. omg

Offline

 

#3 2008-05-19 11:59:21

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Offline

 

#4 2008-05-19 12:42:40

NASuser
Member
Registered: 2008-05-01
Posts: 16

Re: lighttpd + htaccess

The authetification works now^^
I edited the code.
In the lighttpd-htpasswd.user you have to write "<user>:<pw; apache md5>".

Last edited by NASuser (2008-05-19 15:12:48)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB