[details=“Support intro”]
My first personal cloud started with Owncloud and back then users were able to access their contents using the following address style:
Then Nextcloud came along.
With the migration from Owncloud to Nextcloud, I had to maintain server configuration as close to the original Owncloud setup and in order to do that I had to make manual changes in several key files. If any of the key files weren’t properly modified, then I would loose access to the server and I had to spend significant amount of time trying to debug the issue.
I am running Nextcloud on Freenas 11-2 within an iocage jail and thanks to Danb35, Freenas users have access to a streamlining script installation available on Git.
As part of the automated install process, I am still required to make adjustment to the config files, before install and to other key files after install has completed in order to get everything back in order.
As the script is being updated on a regular basis, and because the Web update process is not always foolproof due to php dependancies and the like, I need to create a new iocage jail where I can validate if the new install is functional and no hidden issues will arise from the update itself.
I want to make my life easier and for that I need to move away from my current config and stick as much as possible to the default install process.
It would be much easier if I could just perform the install and be done with it but that would require updating all the user’s Windows and android apps to point to just the default domain without entering the “/owncloud” subdirectory.
I have looked at the RewriteRule as one of the solution.
To validate this approach, I have setup two iocage jails one based on the fully customized setup for NC14 and the other using the standard install of NC14.
Only one jail is enabled and running at any one time, because both Nextcloud instances are using the same IP address, domain name, files, db location and contents.
The intent is to prove I can proceed with the migration without causing any access issue for the various users.
The standard install of NC14 will only have the RewriteRule added to it to perform the https redirection.
The commend is written in the “domain.conf” file section of the VirtualHost:
RewriteEngine On
RewriteRule ^/owncloud “https://domain.com/” [R,L]
RewriteCond %{HTTP:Authorization} ^(.)
RewriteRule . - [e=HTTP_AUTHORIZATION:%1]
Restarting the jail and accessing it using the old address with “https://domain.com/owncloud” will work on the web browser redirecting me to the new “https://domain.com/” location.
The problem I am now experiencing is that the Nextcloud app running on Windows and Android and set to point to the old “https://domain.com/owncloud” address is being denied.
When I connect to my account (being the Admin), I see the following information on the top window:
Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files.
Under Web interface, I get the following message in the Security section within Personal Settings page:
Basic encryption module
Your private key password no longer matches your log-in password.
Set your old private key password to your current log-in password:
I am not able to update the Private key password.
At this point, I am not sure what to search for.
Did I miss something with the RewriteRule?
Interestingly enough, creating a new Windows App account and using the old address fails to connect but using the new one works.
Any input would be greatly appreciated.