Your webserver is not set up to serve `.js.map` files. Since Nextcloud 28 (Now: 30)

Nextcloud version (eg, 29.0.5): 30.0.0
Operating system and version (eg, Ubuntu 24.04): openSUSE Tumbleweed
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.61 (Linux/SUSE)
PHP version (eg, 8.3): PHP 8.3.9

THE ISSUE

<VirtualHost *:443t>
    Alias /nextcloud /srv/www/htdocs/nextcloud/
...

config.php:

  'htaccess.RewriteBase' => '/nextcloud',
  'overwrite.cli.url' => 'https://myhost.net/nextcloud',

Then I can access https://myhost.net/nextcloud

BUT: I get warnings like so:

    * Your webserver is not set up to serve `.js.map` files. Without these files, JavaScript Source Maps won't function properly, making it more challenging to troubleshoot and debug any issues that may arise.

    * Unable to run check for JavaScript support. Please remedy or confirm manually if your webserver serves `.mjs` files using the JavaScript MIME type. To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule.

    * Could not check that your web server serves security headers correctly, unable to query `/nextcloud/heartbeat` For more details see the documentation ↗.

If I remove the Alias from <VirtualHost>, and do:

config.php:

  'htaccess.RewriteBase' => '/',
  'overwrite.cli.url' => 'https://myhost.net/',

The tests work, and I get rid of the warnings in Nextcloud.
BUT: now I have to access through the host URL, without the /nextcloud -part

https://myhost.net/

The warnings became an issue sometime in NC 28 or 29: Upgrade to Nextcloud 28 — Nextcloud latest Administration Manual latest documentation
I never bothered with it, but now it’s getting annoying enough.

Any tips how to be able to use the URL https://myhost.net/nextcloud AND NOT have the warnings?

ADDTIONAL INFO:
./occ maintenance:update:htaccess has been run when making config.php changes.

1 Like

Still not working without the warnings, but I’ve seemed to have messed up my earlier config a bit.

So, the Alias /nextcloud ... part is really not needed.

<VirtualHost *:443>
   # The actual Nextcloud content is in /srv/www/htdocs/nextcloud
  DocumentRoot /srv/www/htdocs
  ServerName myhost.net

So, I am able to access https://myhost.net/nextcloud just fine.

Still I have the warnings and my config.php now containing:

  'htaccess.RewriteBase' => '/nextcloud',
  'overwrite.cli.url' => 'https://myhost.net/nextcloud',

Also, these return 200 OK, when executed on my Nextcloud web server host:

 curl --insecure -I https://myhost.net/nextcloud/apps/settings/js/esm-test.mjs
 curl --insecure -I https://myhost.net/nextcloud/heartbeat

Effectively it seems that the tests cannot take into account the fact that the service URL has /nextcloud at the end, which is why the warnings are produced.

So, as far as I could read this, since I can access nextcloud/heartbeat and apps/settings/js/esm-test.mjs, the warnings actually are not correct?

2 Likes