Re: How to bind bozohttpd / inetd to port 8080?

2021-12-18 Thread Matthias Petermann

Hi,

Am 18.12.2021 um 11:47 schrieb Ignatios Souvatzis:

On Sat, Dec 18, 2021 at 11:34:12AM +0100, Matthias Petermann wrote:


I am currently trying to have bozohttpd listen on port 8080 instead of port
80 via inetd.

In /etc/services there is an entry "http-alt" for this.


yes, but in the distributed version there are two others (591 and
8008), both for TCP and UDP.  I guess you'll have to edit your
/etc/services and put comment signs before the two you don't want.

Regards,
-is


You are right:

```
extranet$ getent services http-alt
http-alt591/tcp
```

I had not counted on that - thanks for the tip :-)
There were to more (8008) and after commenting them out it looks good:

```
extranet$ doas vi /etc/services
extranet$ doas services_mkdb
extranet$ getent services http-alt
http-alt   8080/tcp
```

Many greetings
Matthias


Re: How to bind bozohttpd / inetd to port 8080?

2021-12-18 Thread Ignatios Souvatzis
Hi,

On Sat, Dec 18, 2021 at 11:34:12AM +0100, Matthias Petermann wrote:
> 
> I am currently trying to have bozohttpd listen on port 8080 instead of port
> 80 via inetd.
> 
> In /etc/services there is an entry "http-alt" for this.

yes, but in the distributed version there are two others (591 and
8008), both for TCP and UDP.  I guess you'll have to edit your
/etc/services and put comment signs before the two you don't want.

Regards,
-is


How to bind bozohttpd / inetd to port 8080?

2021-12-18 Thread Matthias Petermann



Hello all,

I am currently trying to have bozohttpd listen on port 8080 instead of 
port 80 via inetd.


In /etc/services there is an entry "http-alt" for this.

However, when I set in the /etc/inetd.conf:

```
http-altstream  tcp nowait:600  _httpd 
/usr/libexec/httpd  httpd -L wol /var/www/wol.lua /var/www

```

...I still cannot access port 8080.

Starting inetd in Debug mode shows:

```
extranet$ doas inetd -d /etc/inetd.conf
ADD : http-alt proto=tcp, wait.max=0.600, user:group=_httpd:(null) 
builtin=0 server=/usr/libexec/httpd policy=

registered /usr/libexec/httpd on 6
```

Did I miss something? If it matters, it is NetBSD 9.2_STABLE.

Many greetings
Matthias