danb35
Hall of Famer
- Joined
- Aug 16, 2011
- Messages
- 15,504
Committed to the repo. Thanks for finding it, and to @TimvH for the PR!Hey the link I posted was the correct fix.
Committed to the repo. Thanks for finding it, and to @TimvH for the PR!Hey the link I posted was the correct fix.
Yes. You'll be assigning a static IP address to your jail, and ports 80 and 443 will need to be forwarded to that IP address. The router shouldn't know or care whether there's something active on that IP address at the time you set up the forwarding. If it does, honestly, that's a problem with your router. However, you can set up the forward while the script is running. The jail is created (and thus the IP address activated) at the beginning (you'll see the output of "nextcloud successfully created"), and as long as you have the forwarding set up by the time acme.sh tries to obtain your certificate, you should be fine--you should have at least 10 minutes.i have to forward port 80 and 443 to my Jail, which has not yet been created?
Yes. You'll be assigning a static IP address to your jail, and ports 80 and 443 will need to be forwarded to that IP address. The router shouldn't know or care whether there's something active on that IP address at the time you set up the forwarding. If it does, honestly, that's a problem with your router. However, you can set up the forward while the script is running. The jail is created (and thus the IP address activated) at the beginning (you'll see the output of "nextcloud successfully created"), and as long as you have the forwarding set up by the time acme.sh tries to obtain your certificate, you should be fine--you should have at least 10 minutes.
Strange--which version of FreeNAS are you running? IIRC, @cunningorb reported the same thing under 11.1-U2, but said it worked under 11.1-U4. I haven't seen this behavior under either version.But now i'm getting redirected to the Freenas Gui
iocage destroy -f nextcloud
), and run the script again.That's probably due to the virtualhost file not being bound to the domain name. We'll need to fix that.Thank you! Setting the port forwarding was possible after starting the script and the script finished successful!
But now i'm getting redirected to the Freenas Gui (not to nextcloud) if i type in my Jail IP. In the Freenas Gui i suddenly found this:
![]()
Usually i reach the Gui only under 192.168.178.2.
My Config for Nextcloud was like this:
JAIL_IP="192.168.178.15"
DEFAULT_GW_IP="192.168.178.1"
INTERFACE="igb0"
That really confuses me. May be it's an iocage problem?!
Thanks & Greetings
Nico
iocage exec ${JAIL_NAME} sed -i '' "s/*/${HOST_NAME}/" /usr/local/etc/apache24/Includes/${HOST_NAME}.conf
Why do you think that's the case? The Apache docs seem to prefer the IP address, permit the wildcard, and state the FQDN is "not recommended." But if the FreeNAS web GUI is responding instead, it seems we're dealing with a completely different issue than Apache configuration.That's probably due to the virtualhost file not being bound to the domain name.
That's probably because Freenas is bound to whatever network interface is connected by default, vnet's are always seperated and imo the way to go.Why do you think that's the case? The Apache docs seem to prefer the IP address, permit the wildcard, and state the FQDN is "not recommended." But if the FreeNAS web GUI is responding instead, it seems we're dealing with a completely different issue than Apache configuration.
cat /usr/local/etc/nginx/nginx.conf
you can tell it listens to every attached nic on port 80/443. When you configure a NIC through the webui you can specify the IP you want it to listen to and then it should work like intended.Cool--as long as it uses a sensible database implementation (at least at one point, the Owncloud plugin was using SQLite, which just isn't) and webserver setup.there are plugins, Nextcloud included!
It appears to be using nginx and mysql.Cool--as long as it uses a sensible database implementation (at least at one point, the Owncloud plugin was using SQLite, which just isn't) and webserver setup.
Seems reasonable. Wonder if nginx is configured for http/2, but that's a lower-priority performance issue, and nginx is often reported to perform better than Apache anyway.It appears to be using nginx and mysql.
It seems a very basic install though, they haven't even configured https.Seems reasonable. Wonder if nginx is configured for http/2, but that's a lower-priority performance issue, and nginx is often reported to perform better than Apache anyway.
echo '{"pkgs":["nano","nginx","mariadb101-server","redis","php70-bz2","php70-ctype","php70-curl","php70-dom","php70-exif","php70-fileinfo","php70-filter","php70-gd","php70-hash","php70-iconv","php70-intl","php70-json","php70-mbstring","php70-mcrypt","php70-pdo_mysql","php70-openssl","php70-posix","php70-session","php70-simplexml","php70-xml","php70-xmlreader","php70-xmlwriter","php70-xsl","php70-wddx","php70-zip","php70-zlib","php70-opcache"]}' > /tmp/pkg.json
cat <<__EOF__ >/tmp/pkg.json {"pkgs":["nano","nginx" ... ... ... "php70-opcache"]} __EOF__
the single quote was a typo as I added it after the copy/paste.I know next to nothing about json, but is it essential that everything be on a single line? Or can it be broken into several lines? If the latter, you could do something like this:
Code:echo <<__EOF__ >/tmp/pkg.json {"pkgs":["nano","nginx" ... ... ... "php70-opcache"]} __EOF__
I also note that you have a single quote before nano--if this is a copy/paste from what you're running, it might explain what's happening.
iocage create --name "${JAIL_NAME}" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="${INTERFACE}|${JAIL_IP}/24" defaultrouter="${DEFAULT_GW_IP}" boot="on" host_hostname="${JAIL_NAME}" vnet="${VNET}"
It's a simple fix if it isn't.Wonder if nginx is configured for http/2
listen 443 ssl;
listen 443 ssl http2;
Yes, a good bit simpler than changing that with Apache.It's a simple fix if it isn't.