RE: Problems loading NetBSD on an ANTSLE box

2018-12-15 Thread Palmer, John
No - I didn't do anything like that (open it up). I have one Linux instance 
running on it and its fine. I've installed NetBSD versions 3.0, 4.0.1, 5.0, 7.0 
and 8.0 and they all have the same issue with the file systems.

I'm not using Xen - just the standard install.

-Original Message-
From: Robert Nestor  
Sent: Friday, December 14, 2018 11:28
To: Palmer, John ; NetBSD Users 
Subject: Re: Problems loading NetBSD on an ANTSLE box

I've got one of those boxes and I did have NetBSD loaded on it not long after I 
got it.  I bought one with the minimal internal disk setup, two 120G Kingston 
SSDs, and installed my own additional disk drives for more storage.

I was using an earlier version of NetBSD and bought it to set up some xen 
images, but then found out the SOC Antsle uses doesn't support everything 
needed to run all the modes xen is capable of.  Had the same problem with 
trying to install FreeBSD on it and ended up just putting MintLinux on it 
instead.  I think it works better with MintLinux than the OS they shipped with 
it, but it still isn't what I thought when I bought it.

It sounds to me like you've got a HW problem though.  You didn't by chance open 
the box to do any upgrades did you?  When you pull it apart you have to be very 
careful of some of the springs, screws and make sure you replace the thermal 
paste for the CPU.

-bob


(bozo)httpd doesn't match FQDN for virtual hosts?

2018-12-15 Thread John D. Baker
On a friend's server, I had set up a basic placeholder web page with
'(bozo)httpd' in NetBSD-8.0_STABLE (amd64).  It happily served using
the virtual hosts feature with the "slashdir" as a fallback for sites
not hosted on his server.

When his domain expired and got sniped, I extended the umbrella of
another domain over his server.  I renamed the virtual host document
root to match the (new) FQDN of the machine.  The machine only ever
serves for itself, not any other domains.

Instead of the expected root document, I get the fallback from the
"slashdir".

The setup:

  $ hostname
  foo.bar.tld

  $ sysctl kern.hostname
  kern.hostname = foo.bar.tld

In "/etc/rc.conf":

  httpd=YES
  httpd_flags="-u -V -v ${httpd_wwwdir}/vhosts"

in ${httpd_wwwdir}:

  -rw-r--r--   1 _httpd  _httpd  212 Nov 27 10:48 index.html
  drwxr-xr-x   3 _httpd  _httpd  512 Dec 15 08:57 vhosts/

in ${httpd_wwwdir}/vhosts:

  lrwxr-xr-x  1 _httpd  _httpd   18 Dec 14 22:00 foo@ -> foo.bar.tld
  drwxr-xr-x  2 _httpd  _httpd  512 Nov 27 11:06 foo.bar.tld/
  lrwxr-xr-x  1 _httpd  _httpd   18 Dec 14 22:02 bar.tld@ -> foo.bar.tld

Hand-crafting HTTP GET requests, specifying "Host: foo.bar.tld" or "Host:
foo" returns the fallback "index.html" from "${httpd_wwwdir}".  Specifying
"Host: bar.tld" returns the expected "index.html" from
"${httpd_wwwdir}/vhosts/foo.bar.tld"

According to httpd(8) [BOZOHTTPD(8)], the default for the optional
"myname" argument is the machine's local host name returned by
"gethostname(3)".  Something seems to be stripping the first element of
the hostname so that '(bozo)httpd' won't match the FQDN but only the
domain name itself.

To verify, I started the server manually and specified the hostname
directly:

  sudo /usr/libexec/httpd -u -V -v /var/www/vhosts -U _httpd \
  -b /var/www $(hostname)

The result was the same.  Then I added an extra element before
the FQDN:

  sudo /usr/libexec/httpd -u -V -v /var/www/vhosts -U _httpd \
  -b /var/www www.$(hostname)

Thereafter, GET requests to the server's FQDN (i.e., ordinary HTTP/1.1
GET requests sent by any standards-compliant browser) worked.

I don't see any provision for specifying the optional "myname" argument
through the "rc.conf" mechanisms, except perhaps to append to the
"httpd_wwwdir" variable (after all other uses of it, of course).  Maybe
the "rc.conf.d/httpd" feature can be employed to define extra variables
and place them appropriately in the command line.  I've only used that
once before, long ago...

True, I could simply not use the virtual host feature, but I figured
it would be a safeguard against rogue DNS entries.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645