macsat.com OpenWrt and ASUS WL Forum

Oleg's Firmware => Tutorials => Topic started by: green on October 12, 2006, 22:31:26 PM



Title: thttpd and <form> of xhtml
Post by: green on October 12, 2006, 22:31:26 PM
hi,
my problem is that doesn't work any form of xhtml
<form action="index.php" method="post">
<div>
<label for="heslo">Heslo:</label>
<input id="heslo" name="heslo" type="password" value="" />
<input type="submit" name="prihlasit_se" value="Prihlásit se" />
</div>
</form>

It is runiing only in IE but no opera, mozzila,seamonkey and on other webserver is running.
have anybody idea how to fix it?
thx very much
is it works on lighttpd is here tutorial for oleg;s firmware?thx


Title: Re: thttpd and <form> of xhtml
Post by: macsat on October 13, 2006, 08:51:31 AM

In my opinion lighttpd is far superiour to thttpd.

There is currently no Olegs firmware tutorial for ligthtdp, bit the openwrt one should give you the info you need - even if you are running olegs firmware.


Title: Re: thttpd and <form> of xhtml
Post by: green on October 15, 2006, 09:16:49 AM
thx, i installed lighttpd + php and now works perfectly.
I would like to ask you if is possible to run htpasswd like at thttpd?(and sqlite3?)
thanks for your advice. ;)


Title: Re: thttpd and <form> of xhtml
Post by: macsat on October 16, 2006, 09:45:55 AM

Sure it is.....for lighttpd to work with htpasswd you need to change some settings in the conf file though...:

http://wiki.volker-boehme.de/doku.php?id=wiki:lighttpd


Title: Re: thttpd and <form> of xhtml
Post by: green on October 16, 2006, 15:49:57 PM
hi,
thanks but now i cant' enter to my page.It looks like bad user or password:
my conf:
 
auth.backend               = "htpasswd"
auth.backend.htpasswd.userfile = "/opt/share"                                               //path to htpasswd???

#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               = ( "/graf" =>                                                    //path to my dir which a want to lock
                               (
                                 "method"  => "basic",
                                 "realm"   => "??????",                                    //dont'know
                                 "require" => "green"                                      //user
                               )
                            )
after i created  htpasswd to /opt/share - my htpasswd from promt looks :
green:anyhash;)

but i can't login to page:(

where is bug please??
thx


Title: Re: thttpd and <form> of xhtml
Post by: green on October 18, 2006, 18:52:19 PM
it was my bug now is everything work thanks.


Title: Re: thttpd and <form> of xhtml
Post by: macsat on October 19, 2006, 11:35:01 AM

Can I make you post the working code-snippet here ?


Title: Re: thttpd and <form> of xhtml
Post by: green on October 19, 2006, 12:10:58 PM
mod_auth

auth.debug                  = 0
auth.backend                = "htpasswd"                                                    -----type of auth
auth.backend.htpasswd.userfile = "/etc/htpasswd"                               -----path to htpasswd
#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               = ( "/graf/" =>                                                      ----dir which will be locked
                               (
                                 "method"  => "basic",
                                 "realm"   => "graf",                                               ----- is a string to display in the dialog   
                                 "require" => "user=green"                                   ----- user -- must be in this form user=.....
                               )
                             )
after this you have to create file htpasswd --->   htpasswd -c htpasswd(name of file) user(name of user) and get it to dir from auth.backend.htpasswd.userfile

this works perfectly ;)
any manual : http://trac.lighttpd.net/trac/wiki/Docs%3AModAuth