Reverse proxy - base url #540
-
Hi, I am running Windows Server machine with WSL2. In IIS I am running ASP.NET Core app on https://mydomain.com. I created sub-app in IIS to be located on https://mydomain.com/uptrace where I configured reverse-proxy for Uptrace like this (web.config): <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Reverse proxy to Uptrace" stopProcessing="true">
<match url="^(.*)" />
<conditions>
<add input="{CACHE_URL}" pattern="^(https?)://" />
</conditions>
<action type="Rewrite" url="http://INTERNAL_WSL_IP:14317/{R:1}" />
<serverVariables>
<set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
<set name="HTTP_ACCEPT_ENCODING" value="" />
</serverVariables>
</rule>
</rules>
<outboundRules>
<rule name="Add application prefix" preCondition="IsHTML">
<match filterByTags="A, Link, Script, Img, Form" pattern="^/(.*)" />
<conditions>
<add input="{URL}" pattern="^/.*" />
</conditions>
<action type="Rewrite" value="/uptrace/{R:1}" />
</rule>
<rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding">
<match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" />
<action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" />
</rule>
<preConditions>
<preCondition name="IsHTML">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
<preCondition name="NeedsRestoringAcceptEncoding">
<add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
</configuration> Right now I am trying via But let's dont talk about IIS configuration. Is any setting that I might set in docker to adjust base path? I already set this in Ofc I replaced mydomain.com for this screen purpose. I restarted only docker container for Uptrace. Or is it required to remove container and set it up again? Perhaps some other setting needed? I found out in source code base path in |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Based on issue: 5620cea then I found out parameter was removed in ec5bcbf However I think in this commit was made mistake? Its checking Path parameter which is not allowed right now to use, if its null then path is set always = '/' |
Beta Was this translation helpful? Give feedback.
-
You should just configure
Restarting the container should be enough. |
Beta Was this translation helpful? Give feedback.
-
This should be fixed in v2.0.1 |
Beta Was this translation helpful? Give feedback.
-
Thank you |
Beta Was this translation helpful? Give feedback.
This should be fixed in v2.0.1