danb35 / freenas-iocage-nextcloud

Script to create an iocage jail on FreeNAS for the latest Nextcloud 28 release, including Caddy, MariaDB or PostgreSQL, and Let's Encrypt
GNU General Public License v3.0
258 stars 71 forks source link

LAN access #83

Closed The-Jaeger closed 4 years ago

The-Jaeger commented 4 years ago

I initially ran the script to have access through a domain, but now I want to configure it to only be accessible from the lan with just the lan IP. I'm looking through the Caddyfile and every file in /usr/local/www/nextcloud/ and I do not see an equivalent nginx/html/apache config file to adjust the settings for https access.

I currently get this error when trying to access it from the lan: 404 Site 192.168.1.12 is not served on this interface. (http) I get this error when attempting to access https://192.168.1.7 : This site can't provide a secure connection

danb35 commented 4 years ago

The Caddyfile (the web server configuration file) is, by default, designed to only be accessed by the hostname. You can edit it to use the IP address, but you'll lose SSL unless you use a self-signed certificate (no CA will issue a cert for your internal IP address, so you'd have certificate errors).

Use the Caddyfile-nossl file as an example, but in short, you'd make two changes:

You can find the Caddyfile in the jail at /usr/local/www/Caddyfile.

PrivatePuffin commented 4 years ago

@danb35 I think your advice was pretty clear (and its not a bug), I think this can also be byebye (closed)...