Hello,
I’ve got a problem after moving Seafile Server 6.0.7 to https (on Windows Server 2016 and IIS 10). All works fine except web interface. I’m trying to access it via https://seafile.company.com, but it redirects to http://localhost:8000/accounts/login?next=/.
There is a IIS redirect rule.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxUrl="6144" maxQueryString="4096" />
</requestFiltering>
</security>
<rewrite>
<rules>
<clear />
<rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{SERVER_PORT_SECURE}" pattern="^0$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
</rule>
<rule name="Seafile" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://localhost:8000/{R:1}" />
<serverVariables>
<set name="HTTP_X_FORWARDED_HOST" value="{HTTP_HOST}" />
<set name="HTTP_X_FORWARDED_SCHEME" value="https" />
<set name="HTTP_X_FORWARDED_PROTO" value="https" />
</serverVariables>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
The same rule works perfectly with other internal services except Seafile.
Seafile configs:
ccnet.conf:
[General]
USER_NAME = company-seafile
ID = 44fece35473682084bfa71f7b3236ac170363b4d
NAME = company-seafile
SERVICE_URL = https://seafile.company.com
[Network]
PORT = 10001
[Client]
PORT = 13418
[LDAP]
HOST = localhost:389
BASE = dc= company,dc=local
USER_DN = seafile@company.local
PASSWORD = password
LOGIN_ATTR = mail
seafile.conf:
[database]
type = sqlite
[network]
port = 12001
[fileserver]
port = 8082
[seahub]
port = 8000
fastcgi = false
It seems I need to set some extra IIS redirection rule specially for Seafile? Have anybody faced with the similar problem?
Thank you.

