And you should be investigating why that isn't working right and not trying to circumvent things that you think are wrong. Something else is wrong if nginx isn't doing its job, and that should be where you should be troubleshooting. Maybe try reinstalling FreeNAS to a different USB stick in case its corrupted.
I'm not too concerned about things being lost after reboot. I'm more concerned with months later when you have a problem and because you did what you did you have a config file that is corrupted because of confusion and you are forced to reset your FreeNAS installation and start over. For many people that's far from trivial to deal with.
As for it getting the same DHCP server, if you aren't happy with the IP then go into you DHCP server and assign it another IP address or manually force an IP from the FreeNAS GUI. Notice no CLI commands needed. ;)
If you were using the manual you'd know what the 0.0.0.0 means as its clearly described in the section of the manual for the General Tab of the GUI(section 4.7).
Please don't take this as an insult, but you are trying to jury-rig FreeNAS to work in a situation where you should be asking what is actually wrong. It seems like you are very confused on how networks actually work and are too busy trying to mess with FreeNAS than solve your network configuration issues. I'd slow down and consult a friend or co-worker to help you with this as you seem very confused. The manual really is well written and answers many questions for newbies.
Just trying to save you from a lot of potential headaches later.
I know why it is not running. It is because it gets confused if the DHCP address is changes.
Location 1: DHCP provides 10.175.196.24
Location 2: DHCP provides 10.175.196.245
When the FreeNAS server is in location it tries to listen to the DHCP lease of location 1.
That is the core of the problem, and this I consider a bug.
If you move the FreeNAS to another location this bug results in the user interface
not beeing availalbe, and any suggestion to reconfigure the NAS using a web browser
is impossible.
- As for changing DHCP leases, In theory it would work, but not so easy for me...
I am using the same network range in both locations, because I have a lot of embedded H/W using fixed addresses.
One of the routers restricts the range of DHCP leases to a defined subrange
incompatible with the other setup, so they will not get the same address.
The other router does not allow you to *change* the lease. You can only define the lease
before you connect the first time. I consider this a bug in the router.
- Not that it is an el cheapo router. Was over $200 from Linksys.
(Maybe not connecting for the lease time, will get you out of the mess, but that is not feasible,
resetting the router and set it up from scratch is also a pain).
Anyway, I do not consider this to be the core of the problem. It is another workaround.
The real problem is that FreeNAS remembers DHCP leases between reboots,
and that is where I think we should focus the discussion on this point.
What in FreeNAS is generating /etc/local/nginx/nginx.conf at boot and why
does that look at the prveious boot, instead of the current DHCP lease?
Once that problem is fixed, then I do not have any problems.
---------------------------
BTW; I have read the manual and it explains that 0.0.0.0 is "any address", but it does not explain why I have two "0.0.0.0"
----