Issues with proxy after update

Hi I have issues with my somewhat unusual setup.

I have nextcloud docker installed on Ubuntu 22.04.4 LTS.
I’m using Apache 2.4.52 as a proxy.
I had installed Nexcloud version 24 for some time without problems.
I decided to upgrade it yesterday, so i used instructions from your help:

  • manually increase major version in docker-compose by 1
  • docker compose pull
  • docker compose up -d

but at the end i noticed that web interface broke down, no css.
I checked developer tools and found out that css and js had wrong url.

Now my setup.
My nextcloud is on my LAN, and i do not have public IP, therefore i don’t have domain name.
This means that i’m using mDNS, but mDNS has limitations that it doesn’t support subdomains.
Therefore my nextcloud runs on server.local/nextcloud.

HTML files were correctly requested from this url, but css and js are missing that nextcloud folder now.


  GNU nano 6.2                                                                                                        config/config.php                                                                                                                  
$CONFIG = array (
  'trusted_proxies' => 
  array (
    0 => '',
  'overwritehost' => 'server.local',
  'overwriteprotocol' => 'http',
  'overwritewebroot' => '/nextcloud',
  'overwritecondaddr' => '^127\\.0\\.0\\.1$',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
  'instanceid' => 'ocsa1b0l7w53',
  'htaccess.RewriteBase' => '/',
  'passwordsalt' => 'Cau2Ncfr4mMma60b/qhDqi16FThq6r',
  'secret' => 'zaQfTg+5x+uJY0vLRbM2Vrb3zuzktKwrpM9PiZoOJ+R1jdjs',
  'trusted_domains' => 
  array (
    0 => '',
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'nextcloud',
  'installed' => true,
  'loglevel' => 2,
  'maintenance' => false,

apache conf:

<VirtualHost *:80>
        ServerName server.local
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        ProxyRequests Off
        <Proxy *>
          Order deny,allow
          Allow from all

        ProxyPass /munin
        ProxyPassReverse /munin

        ProxyPass /nextcloud
        ProxyPassReverse /nextcloud

        <Location />
          Order allow,deny
          Allow from all



version: '2'

    image: mariadb
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
      - /nextcloud/db:/var/lib/mysql
      - MYSQL_PASSWORD=nextcloud
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

    image: nextcloud
    restart: always
      - 8081:80
      - db
      - /nextcloud/nextcloud:/var/www/html
      - /nextcloud/data:/var/www/html/data
      - MYSQL_PASSWORD=nextcloud
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db

i don’t really remeber how i installed my nextcloud so if you need any information, feel free to ask for it.

I’m confused because this indicates you only use the IP address to access your Nextcloud instance.

Where is the version tag? Are you certain this is your real Compose file?

This may actually be the source of your problems. You’re double escaping, which likely is not what you want here. The only reason the slashes exists is to escape the periods. This appears to be escaping the slashes themselves.

As it stands you likely don’t need the entire overwritecondaddr line based on your described topology. The condaddr is only used if you want to have the other overwrite parameters applies sometimes but not other times. It sounds like you want them to be active all the time (and that’s most common).

thanks for your siggestions.

after i posted this question, I also noticed that IP in trusted_domains and changed it to server.local but it didn’t help.

so i removed overwritecondaddr and it now works, i have no idea why it was there in the first place. Thanks again for solution.

if i understand docker sompose correctly, when you do not specify version, you mean latest version.

EDIT: just to clarify, i did both changes ie. trusted_domains and overwritecondaddr

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.