I have Nextcloud on running on an Ubuntu 23.10 server with Apache2 virtual hosts.(LAMP). I had previously duplicated the instance to a second server. I have 5 hosts. They all work fine except the second cloud.
/
/webmin
/zoneminder
/firstcloud
/secondcloud
It worked fine and I’m trying to do it again (lost it - don’t ask) but I’m missing something.
I’ve duplicated the first instance in /var/www/html, created the new virtual host, duplicated the mysql database, and updated the /config/config.php.
The index.html is being read, loads index.php, but then sends me to the 500 page. FYI - all sites use SSL (let’s encrypt) from the base URL. I checked the log and error log for this instance and there is nothing in them.
Does anyone have any hints as to what I may be missing?
When I inspect the network traffic I see this:
X Refused to execute script from 'https://***REDACTED***.org/cloud/index.php/js/core/merged-template-prepend.js?v=0a4006a4-25' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Maybe something to do with the csrftoken? But I honestly do not know what that is.
So I tried this again with success for 3 different instances.
I’m not sure what I was doing wrong before.
The steps are relatively simple:
Create an Apache virtual host directory for each instance
/var/www/html/firstcloud/
/var/www/html/secondcloud/
Create Apache virtual host config files for each instance, and enable them
/etc/apache2/sites-available/firscloud.conf
/etc/apache2/sites-available/firstcloud-ls-ssl.conf
/etc/apache2/sites-available/secondcloud.conf
/etc/apache2/sites-available/secondcloud-le-ssl.conf
Be sure to add an alias line in the non-secure config like
Alias /fristcloud “/var/www/html/firstcloud”
Create a unique mysql database for each cloud. I copied the original database and the added a new user and “ALLOW ALL” for that user.
Edit the /var/www/html/firstcloud/config/config.php to point to the correct locations, server names, and mysql databases.