[BusyBox] httpd.conf Question

Roy Walker rwalker at miracomnetwork.com
Tue Mar 2 19:55:03 UTC 2004


Ok.  Here is what I am seeing.  This is my /etc/httpd.conf:

# Config file for busybox httpd
# Allow any IP address to connect
ip:*
# Allow admin user to connect to the base directory
/cgi-bin:*
/:*

I would like to change this so that it will allow anyone to access the
root page, but the cgi-bin directory should require a password.  I would
think it would like this:

# Config file for busybox httpd
# Allow any IP address to connect
ip:*
# Allow admin user to connect to the base directory
/cgi-bin:user:pass
/:*

But that doesn't work.



The command line is: /usr/sbin/httpd -c /etc/httpd.conf -p 8000 -r
"Login"



I can serve up a page with the word test in it (only the word test).
And then my redirect works fine.  If I try to hit my redirect first, it
gives me a 404 error.  Here is the redirect file:

<html>
<head>
<meta http-equiv="refresh" content="0; url=/cgi-bin/netconfig.cgi?">
</head>
<body>
If you are not automatically forwarded click <A
href="/cgi-bin/netconfig.cgi?">here</A> to continue.
</body>
</html>

Anyone have any ideas?

Thanx,
Roy

-----Original Message-----
From: Vladimir N. Oleynik [mailto:dzo at simtreas.ru] 
Sent: Monday, March 01, 2004 1:50 AM
To: Roy Walker
Cc: BusyBox
Subject: Re: [BusyBox] httpd.conf Question

Roy,

> /cgi-bin/:user:pass
> /:user:pass
> 
> will not work.  I get the login screen, but it will not serve up the
> page.  To get it to work with NO authentication I am using:
> 
> /:*

Its not valid config line.
support only:

/path:user:pass

This line make password protect to access /path and subpath.
If config file placed to subpath then root path ('/') make protect to
current and more subpath.

See comment from httpd.c file. This file have full documentation
of syntax config and are corrected by English-speaking users. ;-)


--w
vodz




More information about the busybox mailing list