jameskimmel/Nextcloud_Ubuntu

Admin center warning

Closed this issue · 4 comments

For Nextcloud behind the NGINX proxy I get the error

"Could not check for JavaScript support. Please check manually if your webserver serves .mjs files using the JavaScript MIME type."

Not sure if this also happens on the apache installation.

curl -I https://cloud.mydomain.com/nextcloud/apps/settings/js/esm-test.mjs

should return text/javascript but currently does not for nginx reverse proxy

Maybe this helps?

I added:
application/javascript mjs;
in /etc/nginx/mime.types

and in vhost config:
location ~ .(?:css|mjs|js|svg|gif|png|jpg|ico|wasm|tflite|map)

JavaScript MIME (not done yet!)

sudo nano /etc/nginx/mime.types

    # disabled because of nextcloud    application/javascript                           js;
    text/javascript                                  js mjs;
sudo nano /etc/nginx/sites-available/cloud.x_youromain.conf
    # Add .mjs as a file extension for javascript
    # Either include it in the default mime.types list
    # or include you can include that list explicitly and add the file extension
    # only for Nextcloud like below:
    include mime.types;
#    types {
#        text/javascript js mjs;
#    }

was a networking issue, not a setup issue.