I just finished following Samuel Dowling’s guide to installing NextCloud in a FreeNAS jail, located here:
It was incredibly helpful!
I’m running into just one small issue that I cannot figure out, despite a couple of hours of trial-and-error and experimenting.
Here’s a quick rundown of my setup:
NextCloud 15
Running on FreeBSD 11.2-RELEASE-p9
Duck DNS DynDNS Service with Port Forwarding Working
I have two Apache rules in a configuration file:
<VirtualHost *:80>
ServerName DuckDNS_address
Redirect permanent / https://DuckDNS_address
and
<VirtualHost *:443>
ServerAdmin me@here.com
ServerName server_name
<FilesMatch .php$>
SetHandler "proxy:fcgi://127.0.0.1:9000/"
</FilesMatch>
DirectoryIndex /index.php index.php
DocumentRoot "/usr/local/www/nextcloud"
SSLCertificateFile correct_path
SSLCertificateKeyFile correct_path
SSLEngine on
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; >
</IfModule>
</VirtualHost>
When I first start apache, and I use either http://DuckDNS_address or https://DuckDNS_address, it works (always directing to https://DuckDNS_address) from either within my network or from outside of it. However, after about 20 seconds, the UI will no longer resolve from within my network, but it continues to work fine from outside my network.
If I add an additional directive in the CONF file, matching the local IP address of the NextCloud instance (and port 80), I can get it to work internally. However, this causes a problem with mobile devices: I either have to use the local address and not have the instance work outside my network) or the DuckDNS address (and not have the instance work while I’m connected to my local network).
I can reliably reproduce this behavior, but cannot for the life of me figure out what might be failing. I’d be grateful for any help or guidance!