# Set: not found???



## Sivan! (Jul 6, 2022)

Named starts on a FreeBSD 13.1 release desktop, apache24
It works!​but I have this error:

```
named status

/etc/rc.conf: Set: not found
/etc/rc.conf: Set: not found
named is running as pid xxx.
```
Relevant entries in my /etc/rc.conf


```
syslogd_flags="-ss -vv"
sendmail_enable="NONE"
... etc
pf_enable="yes"
kern_securelevel_enable="Yes"
kern_securelevel="3"
altlog_proglist="named"  # ???
named_enable="YES"
```


----------



## Bobi B. (Jul 6, 2022)

Have you tried `grep -A3 -B3 Set /etc/rc.conf`?


----------



## SirDice (Jul 6, 2022)

```
... etc
```
Yeah, post this bit too. It's very likely that's where the error is.


```
altlog_proglist="named"  # ???
```
To answer this question, you need this if you're running named(8) in a chroot(8). To run it in a chroot(8) you need these too:

```
named_chrootdir="/var/named"
named_chroot_autoupdate="YES"
```
As you don't have that, you don't need `altlog_proglist`


----------



## Sivan! (Jul 6, 2022)

SirDice said:


> Yeah, post this bit too. It's very likely that's where the error is.
> ...
> As you don't have that, you don't need `altlog_proglist`



Thank you SirDice .  Here is the /etc/rc.conf as it is

```
syslogd_flags="-ss -vv"
sendmail_enable="NONE"
sendmail_submint_enable="NONE"
sendmail_outbound_enable="NONE"
sendmail_msp_queue_enable="NONE"
hostname="BSD.myname.company"
ddclient_enable="YES"
keymap="us.kbd"
ifconfig_re0="DHCP"
ifconfig_re0_ipv6="inet6 accept_rtadv"
defaultroute_delay="1"  # Don't wait for a default route in the foreground
moused_enable="YES"
moused_port="/dev/psm0"
moused_type="auto"
moused_enable="YES"
ntpd_enable="YES"
Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
dbus_enable="YES"
kdm5_enable="YES"
kld_list="amdgpu"
nginx_enable="NO"
#apache_enable="YES"  # have apache24 enable=yes, so commented this out.
sddm_enable="yes"
clear_tmp_enable="YES"
syslogd_flags="-ss"
pf_enable="yes"
pflog_enable="yes"
pflog_logfile="/var/log/pflog"  # where pflogd should store the logfile
pflog_flags=""                  # additional flags for pflogd startup
nfs_reserved_port_only="NO"
linux_enable="YES"
kern_securelevel_enable="Yes"
kern_securelevel="3"
altlog_proglist="named"
apache24_enable="YES"
mysql_enable="YES"
#kern.elf64.aslr.enable=1
#kern.elf32.aslr.enable=1
# named_enable="YES"# these are settings that I copied from somewhere earlier today, not sure how to define every entry, have it disabled for the moment #
# named_enable (bool):              Run named, the DNS server (or NO).
# named_program (str):              Path to named, if you want a different one.
# named_conf (str):                 Path to the configuration file
# named_flags (str):                Use this for flags OTHER than -u and -c
# named_uid (str):                  User to run named as
# named_chrootdir (str):            Chroot directory (or "" not to auto-chroot it)
#                                   Historically, was /var/named
# named_chroot_autoupdate (bool):   Automatically install/update chrooted
#                                   components of named.
# named_symlink_enable (bool):      Symlink the chrooted pid file
# named_wait (bool):                Wait for working name service before exiting
# named_wait_host (str):            Hostname to check if named_wait is enabled
# named_auto_forward (str):         Set up forwarders from /etc/resolv.conf
# named_auto_forward_only (str):    Do "forward only" instead of "forward first"
#named_enable="YES"[/COLOR]
named_enable="YES"
```

Bobi B. suggested that I run `grep -A3 -B3 Set /etc/rc.conf`. This is what it says:

```
grep -A3 -B3 Set /etc/rc.conf
moused_type="auto"
moused_enable="YES"
ntpd_enable="YES"
Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
dbus_enable="YES"
--
# named_symlink_enable (bool):      Symlink the chrooted pid file
# named_wait (bool):                Wait for working name service before exiting
# named_wait_host (str):            Hostname to check if named_wait is enabled
# named_auto_forward (str):         Set up forwarders from /etc/resolv.conf
# named_auto_forward_only (str):    Do "forward only" instead of "forward first"
#
#named_enable="YES"
```

The bigger problem is to find a way to make a apache24 webserver and/or nginx work with DHCP.  Google Domain settings allow
ddclient, I could use that feature. The trouble is that most of the configuration help that I find online assumes that the setup would have one or more static IP addresses.


----------



## Emrion (Jul 6, 2022)

In rc.conf, put a # at the beginning of this line:


> Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable


----------



## Sivan! (Jul 6, 2022)

Emrion said:


> In rc.conf, put a # at the beginning of this line:



Thank you. Changed anther line of code also, as SirDice indicated.

`#Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
#altlog_proglist="named"`

`service named status` now shows process id without errors.

Thank you.


----------



## SirDice (Jul 6, 2022)

Sivan! said:


> The bigger problem is to find a way to make a apache24 webserver and/or nginx work with DHCP.


Don't need to.


----------



## Sivan! (Jul 6, 2022)

SirDice said:


> Don't need to.



What I meant by having to make my web server "work with DHCP" is about mapping the domain name to a Static IP addresses.  At the moment I am respectfully arguing with those with incontrovertible technical mastery that I need a Static address for my computer. Am I totally wrong?


----------



## zirias@ (Jul 7, 2022)

In general, you don't need static IP addresses for hosting websites, only DNS names.

In the simple case of hosting only one domain, it doesn't matter at all, just let your webserver listen on any address and serve the content for this one domain.

For multiple domains, you needed multiple IP addresses in the past, and configure them for "virtual hosts" in your webserver to distinguish between these domains. With HTTP/1.1 introducing the Host: header (containing the domain name for the request) a really long time ago, this wasn't necessary any more for plain http. It continued to be necessary for https, because the webserver needs to present the correct certificate for the domain _before_ receiving the actual request, but this problem is also long gone thanks to SNI which is supported by any browser and webserver nowadays. So, you can base your virtual hosts entirely on names.

Still, it would be pretty uncommon _not_ to have a static IP address for a webserver. Maybe it would help if you explain in detail what you're trying to achieve here.


----------

