2011-03-09 06:21:08     web server authorization

Document created by Aaronwu Employee on Aug 26, 2013
Version 1Show Document
  • View in full screen mode

2011-03-09 06:21:08     web server authorization

Yuriy Urasinov (RUSSIAN FEDERATION)

Message: 98766   

 

I use boa and cgihtml for web server.

I want to utilize web server authorization.

boa.conf file has "Auth" keyword to enable basic HTTP authentication. But I can not start it.And I found information of this forum that boa doesn't support authentication.

 

Please let me know what web server I can use for ucLinux with authorization.

 

Thanks.

QuoteReplyEditDelete

 

 

2011-03-09 19:05:06     Re: web server authorization

Mike Frysinger (UNITED STATES)

Message: 98801   

 

you can use this patch to add Auth support to boa:

  sourceforge.net/tracker/download.php?group_id=78&atid=300078&file_id=83873&aid=935995

 

i'll apply it to svn trunk too

QuoteReplyEditDelete

 

 

2011-03-14 03:18:59     Re: web server authorization

Yuriy Urasinov (RUSSIAN FEDERATION)

Message: 98914   

 

OK, Mike.

 

Thank you, I will try it.

 

As I know boa provide only HTTP Basic autoirization.

 

In future I want to utilize my custom html page for authorization.

 

Maybe you can let me know what web-server support custom html page authorization.

 

Thanks.

QuoteReplyEditDelete

 

 

2011-03-14 03:43:33     Re: web server authorization

Mike Frysinger (UNITED STATES)

Message: 98915   

 

there is no such thing.  either the web server supports the HTTP standard (like boa does), or the end developer implements their own.

QuoteReplyEditDelete

 

 

2011-04-11 04:25:24     Re: web server authorization

Yuriy Urasinov (RUSSIAN FEDERATION)

Message: 99746   

 

Hi Mike.

 

Only today I had applied this patch.

 

I download patch from trunk, boa-0.94.14rc21-auth.patch.

 

I applied patch and compilation of ucLinux is OK.

 

I try to run boa with old boa.conf file.

 

root:/home/httpd> boa -c /home/httpd/

root:/home/httpd> [01/Jan/1970:01:52:46 +0000] boa: server version Boa/0.94.14rc21

[01/Jan/1970:01:52:46 +0000] boa: server built Apr 11 2011 at 11:18:03.

[01/Jan/1970:01:52:46 +0000] boa: starting server pid=412, port 80

 

 

But something wrong.

 

I see in browser:

 

501 Not Implemented

POST to non-script is not supported in Boa.

 

 

In console

 

root:/home/httpd>

root:/home/httpd> 192.168.0.2 - - [01/Jan/1970:01:40:57 +0000] request "TTP/1.1" ("(null)"): malformed request: "TTP/1.1"

192.168.0.2 - - [01/Jan/1970:01:40:57 +0000] request " HTTP/1.1" ("(null)"): malformed request: " HTTP/1.1"

 

root:/home/httpd> 

 

In my html pages I use AJAX with POST method. In previous compilations (without boa patch) it works fine.

 

 

 

And second thing.

 

If I edit boa.conf to enabel authorization (I activate string #Auth /etc /etc/passwd)

 

boa doesn't start

 

root:/home/httpd> boa -c /home/httpd/

[01/Jan/1970:01:50:35 +0000] Line 182: Did not find keyword "Auth"

 

 

 

 

Below content of boa.conf (this file works fine in boa without patch)

 

I removed comments to decrease post size.

 

 

Port 80

 

User root

Group root

 

 

ServerName www.LG-blackfin.com

 

 

DocumentRoot /home/httpd

 

UserDir public_html

 

DirectoryIndex index.html

 

KeepAliveMax 100

 

 

KeepAliveTimeout 20

 

 

MimeTypes /etc/mime.types

 

 

DefaultType text/html

 

SinglePostLimit 20000000

 

ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/

 

#Auth /etc /etc/passwd

QuoteReplyEditDelete

 

 

2011-04-11 10:55:01     Re: web server authorization

Mike Frysinger (UNITED STATES)

Message: 99757   

 

you've got the source to see what is going on

QuoteReplyEditDelete

 

 

2011-04-12 09:16:11     Re: web server authorization

Yuriy Urasinov (RUSSIAN FEDERATION)

Message: 99786   

 

you've got the source to see what is going on

 

---

 

It's too difficult for me. I am hardware engineer....

QuoteReplyEditDelete

 

 

2011-04-27 02:40:12     Re: web server authorization

Yuriy Urasinov (RUSSIAN FEDERATION)

Message: 100184   

 

Now webserver starts and work.

 

It was necessary to remove object files from build folder.

 

Now I need explanation how to use authorization.

 

In boa.h file I aded #define USE_AUTH. Is it right?

 

In boa.conf I uncoment Auth field. In folder /etc exists file passwd

 

As I understand from file boa.conf folder /home/http/public_html must have html files that no need authorization.

 

Folder  /home/http/ must have html files thats need authorizations.

 

But from browser I have acces to all files, and browser doesn't ask me log and pass.

 

Where I can find information about using authorization?

 

Thanks, again.

QuoteReplyEditDelete

 

 

2011-04-27 14:16:06     Re: web server authorization

Mike Frysinger (UNITED STATES)

Message: 100212   

 

we dont have any docs on it.  i think googling for "boa auth" returns relevant results.

Attachments

    Outcomes