Vhost für nextcloud (v31) on UCS5.2

I have managed to move my nextcloud-app from a 5.0 server to another on running 5.2.
Everything works fine only one thing isn’t: the rewrite to nextcloud.domain.de

Working:

my old 5.0 vhost looked like this:

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin admin@domain.de
        ServerName nextcloud.domain.de
        DocumentRoot /var/www
        <Directory /var/www>
          Options +FollowSymlinks
          AllowOverride All
         <IfModule mod_dav.c>
          Dav off
         </IfModule>

         SetEnv HOME /var/www
         SetEnv HTTP_HOME /var/www

        </Directory>
        SSLEngine on
        SSLProxyEngine on
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        SSLCertificateFile /etc/univention/letsencrypt/signed_chain.crt
        SSLCertificateKeyFile /etc/univention/letsencrypt/domain.key

<IfModule mod_headers.c>
 Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>

        ProxyPass / http://127.0.0.1:40002/ retry=0
        ProxyPassReverse / http://127.0.0.1:40002/

I of course have changed the port to the new value, but that isn’t enough.
When I access nextcloud.domain.de I get an Internal Server Error (500 I guess).

I can paste my config.php too - but the changes to

 'trusted_domains' => ...,
 'overwrite.cli.url' => ...,
  'overwriteprotocol' => 'https',
  'overwritewbroot' => '/',
  'htaccess.RewriteBase' => '/',

worked the on the last install.

Maybe someone allready has a vhost and config.php to share.

Best,
Bernd

  1. who saw the typo? ok, it is ‘overwritewebroot’
  2. with vhost-proxy section:
        ProxyPreserveHost On
        ProxyPass / http://127.0.0.1:40000/nextcloud/
        ProxyPassReverse / http://127.0.0.1:40000/nextcloud/

        # Setzen von HTTP-Headern für den Proxy-Betrieb
        RequestHeader set X-Forwarded-Proto "https"
        RequestHeader set X-Forwarded-Host "nextcloud.domain.de"

it is working.

Best,
Bernd

can you be clear please what and which file you modified.

need to rewrite nextcloud, groupware and relution
thx

For nextcloud you need to modify two files:

  1. the config.php which has two locations: a) inside the docker container, b) inside the app-folder: /var/lib/univention-appcenter/apps/nextcloud/data/integration/config/config.php

  2. a new apache-vhost file for your nextcloud URL, like: /etc/apache2/sites-available/nextcloud.conf/etc/apache2/sites-enabled/nextcloud.conf

Best,
Bernd