*New 11.3 series Release:
2019-10-05: XigmaNAS 11.3.0.4.6928 - released, 11.2 series are soon unsupported!

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

files used to generate lighttpd conf

For "upgrading" from FreeNAS/NAS4Free Legacy to XigmaNAS and upgrading XigmaNAS to newer builds.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
radarjd
NewUser
NewUser
Posts: 7
Joined: 22 Sep 2018 16:28
Status: Offline

files used to generate lighttpd conf

#1

Post by radarjd » 22 Sep 2018 16:39

Hi, everyone. I've been using NAS4Free (now XigmaNAS) for a few years with almost no issues. It's an excellent piece of software. After the most recent upgrade, I was getting a 403 (Forbidden) message when I tried to access the Web GUI from outside of my LAN.

I logged into the Web GUI and went to the General Setup to allow my networks, e.g.

Code: Select all

192.168.1.0/24 192.168.0.1/24 127.0.0.1
And rebooted.

Upon the reboot, lighttpd fails to start. As best as I can tell, the lighttpd configuration is generated and output to /var/etc/lighttpd.conf from /etc/rc.d/lighttpd which has a function called lighttpd_mkconf. When the config is generated, it has two lines which say:

Code: Select all

$HTTP["remoteip"] == "127.0.0.1" { url.access-deny = ( "~", ".inc", ".htpasswd" ) }
My mistake appears to have been that I put 127.0.0.1 in my hosts allow explicitly, because the generation code throws the local host into the allow list.

My problem now is that lighttpd won't start, so I can't use the Web GUI to make the fix. I cannot, for the life of me, figure out where lighttpd_mkconf is getting the xml to generate the lighttpd.conf file. Does anyone know where that's located, or have a suggestion as to how I can fix this??

thanks!

User avatar
tony1
Moderator
Moderator
Posts: 172
Joined: 14 Jul 2016 19:04
Status: Offline

Re: files used to generate lighttpd conf

#2

Post by tony1 » 22 Sep 2018 18:07

you can use options #10 and #11 in the console to restore the default values.

radarjd
NewUser
NewUser
Posts: 7
Joined: 22 Sep 2018 16:28
Status: Offline

Re: files used to generate lighttpd conf

#3

Post by radarjd » 22 Sep 2018 22:34

tony1 wrote:
22 Sep 2018 18:07
you can use options #10 and #11 in the console to restore the default values.
Thanks!

Two questions:
1) How do I access the console?
2) Is there a way to modify the underlying files without resetting everything? I'm comfortable with modifying the config files, if I could find them.

User avatar
ms49434
Developer
Developer
Posts: 715
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: files used to generate lighttpd conf

#4

Post by ms49434 » 22 Sep 2018 22:44

option 12) "Restart WebGUI, force HTTP on port 80" should reset hostallow
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

radarjd
NewUser
NewUser
Posts: 7
Joined: 22 Sep 2018 16:28
Status: Offline

Re: files used to generate lighttpd conf

#5

Post by radarjd » 23 Sep 2018 02:27

ms49434 wrote:
22 Sep 2018 22:44
option 12) "Restart WebGUI, force HTTP on port 80" should reset hostallow
Thanks, where would I find that option?

User avatar
ms49434
Developer
Developer
Posts: 715
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: files used to generate lighttpd conf

#6

Post by ms49434 » 23 Sep 2018 09:50

Option 12 is available on the console screen:
tui.menu.png
Another option is to execute script /etc/rc.initial.hostsallow from the shell.
You do not have the required permissions to view the files attached to this post.
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

radarjd
NewUser
NewUser
Posts: 7
Joined: 22 Sep 2018 16:28
Status: Offline

Re: files used to generate lighttpd conf

#7

Post by radarjd » 23 Sep 2018 14:06

ms49434 wrote:
23 Sep 2018 09:50
Option 12 is available on the console screen:
tui.menu.png
Another option is to execute script /etc/rc.initial.hostsallow from the shell.
Thanks again for your response and your patience -- do you mean serial console or ssh console? If it's reachable by ssh, what's the command to start the console?

The machine running XigmaNAS isn't easily accessible. I can definitely run the rc script but I'm curious about the console for future reference

Thanks again.

radarjd
NewUser
NewUser
Posts: 7
Joined: 22 Sep 2018 16:28
Status: Offline

Re: files used to generate lighttpd conf

#8

Post by radarjd » 23 Sep 2018 15:00

Okay, I executed /etc/rc.initial.hostsallow from the shell

I'm making progress in that I'm getting a new error. Now, when I attempt to start lighttpd (i.e. service lighttpd start), it says:

Code: Select all

2018-09-23 08:57:22: (sock_addr.c.495) getaddrinfo failed:  hostname nor servname provided, or not known ' 192.168.1.11\n192.168.1.111 '
192.168.1.11 is the host ip
192.168.1.111 is the ip for the finch chroot running. I did not intentionally set up lighttpd to serve its ip, and I have no idea where to unset it.

Any suggestions as to next steps?

User avatar
Maurizio
Starter
Starter
Posts: 57
Joined: 05 Jul 2018 21:49
Location: Linate (MIlan)
Status: Offline

Re: files used to generate lighttpd conf

#9

Post by Maurizio » 23 Sep 2018 15:13

lighttpd does not work if you have and aliased IP. Look at this thread for the solution: Vlan and web admin control panel
XigmaNAS 11.2.0.4 on Dell R710 144GB RAM - RootOnZFS zroot on 2x 64GB 15k HDDs in mirror, zdata on 3x 1TB SSD in RAIDZ1.
2x XigmaNAS 11.2.0.4 - RootOnZFS on HPE Proliant Microserver gen10 X3216 - 3x 4TB WD RED. In mirror with zrep.

User avatar
ms49434
Developer
Developer
Posts: 715
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: files used to generate lighttpd conf

#10

Post by ms49434 » 23 Sep 2018 15:24

radarjd wrote:
23 Sep 2018 15:00
Okay, I executed /etc/rc.initial.hostsallow from the shell

I'm making progress in that I'm getting a new error. Now, when I attempt to start lighttpd (i.e. service lighttpd start), it says:

Code: Select all

2018-09-23 08:57:22: (sock_addr.c.495) getaddrinfo failed:  hostname nor servname provided, or not known ' 192.168.1.11\n192.168.1.111 '
192.168.1.11 is the host ip
192.168.1.111 is the ip for the finch chroot running. I did not intentionally set up lighttpd to serve its ip, and I have no idea where to unset it.

Any suggestions as to next steps?
It would be nice to know your answers you were asked by /etc/rc.initial.hostsallow...

Code: Select all

# /etc/rc.initial.hostallow
-> Do you want to disable Hosts allow? No
-> Do you want to reset to allow LAN only? Yes
# reboot
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

radarjd
NewUser
NewUser
Posts: 7
Joined: 22 Sep 2018 16:28
Status: Offline

Re: files used to generate lighttpd conf

#11

Post by radarjd » 24 Sep 2018 14:48

ms49434 wrote:
23 Sep 2018 15:24
It would be nice to know your answers you were asked by /etc/rc.initial.hostsallow...

Code: Select all

# /etc/rc.initial.hostallow
-> Do you want to disable Hosts allow? No
-> Do you want to reset to allow LAN only? Yes
# reboot
Okay, so I had answered as you suggest, but I had not rebooted. When I rebooted, lighttpd started correctly. I was able to re-enter the WebGUI and allow my subnets.

However, I still have the issue that I cannot reach the finch jail running on the XigmaNAS box. That is something that changed when I did the most recent update. It looks like another posted said that VLANs are no longer supported by default, so I will look in to his suggestions. Is that something that changed?

thanks again for all of your help!

radarjd
NewUser
NewUser
Posts: 7
Joined: 22 Sep 2018 16:28
Status: Offline

Re: files used to generate lighttpd conf

#12

Post by radarjd » 01 Oct 2018 16:09

I'm posting a follow up in case anyone has this issue in the future.

There was never any problem with XigmaNAS whatsoever. The nagios server was running in a finch jail. Sometime during my last system update, a line to load libphp5.so was added to my apache24 config. Apache was attempting to load php5 after php7. All I had to do was uncomment the line loading the php5 shared library, and everything worked.

Post Reply

Return to “Upgrade XigmaNAS”