I’m trying to get Nextcloud up and running on OpenShift with Docker with Nginx and PHP-FPM. The initial work has been done, all containers are up and running and I can access the webinterface and I’m greeted by the installation wizard. So far so good, but no JS and CSS files are delivered. The Nginx configuration and Dockerfiles are on Github: Nginx configuration, Nginx Dockerfile and the Nextcloud Dockerfile is in the same repo (can’t add more than two links as I’m a new forum user).
The issue is, that f.e. a call to
/core/vendor/autosize/dist/autosize.js?v=RANDOMSTRING returns not the content of
autosize.js but just the HTML content of the installation wizard.
Any help is appreciated.
Nextcloud version: 11.0.1
Operating system and version: Docker Image
Apache or nginx version: Docker Image
PHP version: 5.6
Is this the first time you’ve seen this error and can you replicate it?: Yes, I can replicate it.
$CONFIG = array (
'instanceid' => 'oceedjs14mffmyeedq',
'appstoreenabled' => false,
'apps_paths' => array(
'path' => '/var/www/nextcloud/apps',
'url' => '/apps',
'writable' => false,
If it doesn’t serve the JS and CSS files then your server redirects in your nginx.conf are not functioning properly. Please see the docs https://docs.nextcloud.com/server/10/admin_manual/installation/nginx_nextcloud_9x.html
I almost had the same problem, but the nginx configuration omitted the mime types and therefore Firefox did not want to apply CSS and JS files.
After reviewing everything again I came to the conclusion that Nginx must have access directly to the JS and CSS files. It isn’t possible to “proxy” them through index.php as I thought it could be made. Therefore I reworked the integration so the Nginx and Nextcloud PHP-FPM run in the same Pod. It now works, but there are still some todos before considering Nextcloud a success on OpenShift. Will keep all posted on the progress.
Any chance you can elaborate a little?
I can share what I have, or any logs if that might help!
I think the issue was due to a bad nginx virtualhost!
Hello I try to run nextcloud container through nginx docker container, and i have the same issue with js. I believe its some configuration in nginx virtual host but i cant find it, can you send the configuration you used.