Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Coolify + Gitea with IIS Reverse Proxy - Getting 404#7659

Unanswered
alexricciuti88-glitch asked this question inQ&A
Discussion options

Hello!

After 20 hours of struggle, I'm trying to ask you for help.

My Goal:
Use Coolify + Gitea behind IIS Reverse Proxy.

Access Coolify at "http://coolify.example.com".
Access Gitea at "http://gitea.example.com".

Run HTTP initially before moving to HTTPS.

What I Did:
Installed Kubuntu 24.04 LTS.
Ran curl -fsSLhttps://cdn.coollabs.io/coolify/install.sh | sudo bash.
v4.0.0-beta.454
Accessed 127.0.0.1:8000 to use Coolify (the admin interface).
Added Gitea as a project and clicked "Deploy".

The part I'm unsure about (Domain Access):
I want to access Coolify and Gitea via a domain.

Coolify -> Settings -> Configuration -> General -> Domain =http://coolify.example.com
Coolify -> Settings -> Configuration -> General -> Instance's Public IPv4 = [MY-PUBLIC-IP]
Coolify -> Projects -> Gitea -> Configuration -> General -> Services -> Domains =http://gitea.example.com:3000

Since I use Microsoft IIS as the web server for my public websites, I don't want to disrupt my existing setup. I am trying to run Coolify behind IIS, using IIS as a Reverse Proxy.

IIS Reverse Proxy Setup:
Created a new website in IIS:

New site = example.com (http)
Installed ARR + Rewrite.

Created web.config (with help from ChatGPT & Gemini):

XML

<configuration>  <system.webServer>    <rewrite><rules>                <rule name="CATCH ALL PROXY TO COOLIFY" stopProcessing="true">                    <match url="(.*)" />                    <action type="Rewrite" url="http://192.168.1.142:80/{R:1}" />                    <serverVariables>                        <set name="HTTP_HOST" value="{HTTP_HOST}" />                        <set name="HTTP_X_FORWARDED_HOST" value="{HTTP_HOST}" />                        <set name="HTTP_X_FORWARDED_PROTO" value="http" />                        <set name="HTTP_X_FORWARDED_SCHEME" value="http" /><set name="HTTP_X_FORWARDED_FOR" value="{REMOTE_ADDR}" />                    </serverVariables>                </rule></rules>    </rewrite>  </system.webServer></configuration>

The Result:
When I try to visit:
http://coolify.example.com
http://gitea.example.com

I receive the response:
404 page not found (I think it is from Traefik).

If I turn off the Coolify proxy, I get an IIS error:

502 - Web server received an invalid response while acting as a gateway or proxy server.There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

My Questions:
Am I approaching this correctly?
Could the IIS Reverse Proxy be causing issues?
Have I missed anything in Coolify's configuration?
Am I fundamentally misunderstanding something?

You must be logged in to vote

Replies: 2 comments

Comment options

Don't alter the http_host just set preserve host headers to true and remove that line
Traefik routes on the host header.

You must be logged in to vote
0 replies
Comment options

Thank you!

I updated my web.config to the following:

<configuration>  <system.webServer>    <rewrite>      <rules>        <rule name="CATCH ALL PROXY TO COOLIFY" stopProcessing="true">          <match url="^(.*)" />          <action type="Rewrite" url="http://192.168.1.142:80/{R:1}" />        </rule>      </rules>    </rewrite>  </system.webServer></configuration>

I also ran the following command in an administrative command prompt:
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/proxy -preserveHostHeader:true /commit:apphost

I found the solution via this guide:https://grafana.com/tutorials/iis/

It is working perfectly now! :)

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@alexricciuti88-glitch@djsisson

[8]ページ先頭

©2009-2025 Movatter.jp