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 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"?>
			<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}://{R:2}" />
				<preCondition name="ResponseIsHtml1">
					<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
			<rule name="ReverseProxyInboundRule1" stopProcessing="true">
				<match url="(.*)" />
				<action type="Rewrite" url="http://internal.ip.of.nextcloud:80/{R:1}" />
		<clientCache cacheControlMode="NoControl" />
	<httpProtocol allowKeepAlive="true">
			<add name="Strict-Transport-Security" value="max-age=15552001" />
		<requestFiltering allowDoubleEscaping="true" />

And this is my actual config.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' => '',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/nextcloud',
  'overwritecondaddr' => '^ip\\.of\\.the\\.proxy$',
  'forwarded_for_headers' => 
  array (
    1 => 'HTTP_X_FORWARDED',
  'passwordsalt' => '********',
  'secret' => '*******',
  'datadirectory' => '/usr/share/webapps/nextcloud/data',
  'overwrite.cli.url' => '',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'nextcloud_data',
  'dbhost' => 'ip.of.database.server',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin',
  'dbpassword' => '**********',
  'logtimezone' => 'UTC',
  'installed' => true,

When I go to - I think this is correct - I see this:

Index of /

and here are some links…
But whe I browse to I see this:


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: