You'll find what you need to add here:
http://man.openbsd.org/httpd.conf.5#SERVERS
So, for example, you might have in your configuration:
server "default" {
listen on * port 80
authenticate "secure area" with "/htpasswd.conf"
}
You then need to setup the htpasswd.conf file with the credentials you
want. Remember that "/htpasswd.conf" is relative to the chroot
directory, so (assuming you don't change the default chroot settings)
that means you want to edit "/var/www/htpasswd.conf". You do this
using the htpasswd utility like so:
htpasswd /var/www/htpasswd.conf username
Where username is whatever username you want.
Also, make sure that htpasswd.conf is readable by the www user, and
only by the www user.
The commands "man httpd" and "man httpd.conf" will get you the full
documentation. Or, you can go to:
http://man.openbsd.org
On 5/18/17, Tuyosi T <[email protected]> wrote:
> thx demchick .
>
> my /etc/httpd.conf is very simple .
>
> -----------------
> ext_addr="*"
> server "default" {
> listen on $ext_addr port 80
> }
> ------------------
>
> regards
>