Nextcloud & Reverse Proxy

Hi all,

I’ve got a Windows Server. Since Nextcloud doesen’t support Windows, I just installed docker on my machine and used that https://hub.docker.com/r/greyltc/nextcloud/ image to start up with a Nextcloud container.
after a few minutes I got a running Nextcloud instance.
But now I have a problem. I use another WIndows Server with IIS 10.0 installed on it as a reverse Proxy.

Here is my actual web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<system.webServer>
	<rewrite>
		<outboundRules>
			<rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
				<match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="^http(s)?://internal.ip.of.nextcloud:80/(.*)" />
				<action type="Rewrite" value="http{R:1}://cloud.publicdomain.de/{R:2}" />
			</rule>
			<preConditions>
				<preCondition name="ResponseIsHtml1">
					<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
				</preCondition>
			</preConditions>
		</outboundRules>
		<rules>
			<rule name="ReverseProxyInboundRule1" stopProcessing="true">
				<match url="(.*)" />
				<action type="Rewrite" url="http://internal.ip.of.nextcloud:80/{R:1}" />
				<serverVariables>
				</serverVariables>
			</rule>
		</rules>
	</rewrite>
	<staticContent>
		<clientCache cacheControlMode="NoControl" />
	</staticContent>
	<httpProtocol allowKeepAlive="true">
		<customHeaders>
			<add name="Strict-Transport-Security" value="max-age=15552001" />
		</customHeaders>
	</httpProtocol>
	<security>
		<requestFiltering allowDoubleEscaping="true" />
	</security>
	</system.webServer>
</configuration>

And this is my actual config.php:

<?php
$CONFIG = array (
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'instanceid' => '*****',
  'trusted_domains' => 
  array (
    0 => 'internal.ip.of.nextcloud',
  ),
  'trusted_proxies' => 
  array (
    0 => 'internal.ip.of.proxy',
    1 => 'proxyinternalname',
    2 => 'proxyinternalname.fqdn.local',
  ),
  'overwritehost' => 'cloud.publicdomain.de',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/nextcloud',
  'overwritecondaddr' => '^ip\\.of\\.the\\.proxy$',
  'forwarded_for_headers' => 
  array (
    0 => 'HTTP_X_FORWARDED_FOR',
    1 => 'HTTP_X_FORWARDED',
    2 => 'HTTP_FORWARDED_FOR',
  ),
  'passwordsalt' => '********',
  'secret' => '*******',
  'datadirectory' => '/usr/share/webapps/nextcloud/data',
  'overwrite.cli.url' => 'https://cloud.publicdomain.de/nextcloud',
  'dbtype' => 'mysql',
  'version' => '11.0.1.2',
  'dbname' => 'nextcloud_data',
  'dbhost' => 'ip.of.database.server',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin',
  'dbpassword' => '**********',
  'logtimezone' => 'UTC',
  'installed' => true,
);

When I go to https://cloud.publicdomain.de - I think this is correct - I see this:

Index of /

and here are some links…
But whe I browse to https://cloud.publicdomain.de I see this:

Forbidden

You don’t have permission to access /nextcloud on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

I also tried some other combinations of config.php and especially th web.config found here: NextCloud 11 with IIS Reverse Proxy - Some Images links not correct and here: NX12 IIS SSL reverse proxy issue

But no matter which combination I try to use, either the IIS throws a 500.3 Bad Gateway error or the Nextcloud Server (apache webserver) throws a 403 unauthorized error…

Please can anybody help me here?

Greetings from Germany…

Can nobody help me? :frowning: