# Unable to proxy request to containers running in same host

**URL:** <https://community.traefik.io/t/unable-to-proxy-request-to-containers-running-in-same-host/22577>\
**Category:** Traefik v3 (latest)\
**Tags:** docker\
**Created:** [May 5, 2024, 2:39am UTC](https://community.traefik.io/t/unable-to-proxy-request-to-containers-running-in-same-host/22577 "2024-05-05T02:39:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbipin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/rbipin/32/8659_2.png) [@rbipin](https://community.traefik.io/u/rbipin)\
**Post date:** [May 5, 2024, 2:39am UTC](https://community.traefik.io/t/unable-to-proxy-request-to-containers-running-in-same-host/22577/1 "2024-05-05T02:39:26Z")

</div>

I have traefik running in docker container on machine (192.162.3.178), the proxy container is listening on port 80. on the same machine I have another container running for piHole (port 81). I'm trying to proxy any request with `<ip>/pihole` to the pihole admin. I have tried different things at this point and it does not work on containers running the same machine. I'm using the dynamic file to configure the proxy.  
The configuration file is here

```auto
## DYNAMIC CONFIGURATION
http:
  routers:
    portainer-proxy:
      entryPoints:
        - web
        - secureWeb
      middlewares:
        - "strip-prefix"
      rule: "PathPrefix(`/portainer`)"
      service: portainer-service

    pihole-proxy:
      entryPoints:
        - web
        - secureWeb
      middlewares:
        - "strip-prefix"
        - "add-dashboard"
      rule: "PathPrefix(`/pihole`)"
      service: pihole-service

  middlewares:
    strip-prefix:
      stripPrefix:
        prefixes:
          - "/portainer"
          - "/pihole"
    add-dashboard:
      addPrefix:
        prefix: "/admin"

  services:
    portainer-service:
      loadBalancer:
        servers:
          - url: "https://192.162.3.177:9443"

    pihole-service:
      loadBalancer:
        servers:
          - url: "http://192.162.3.178:81"

    proxy-service:
      loadBalancer:
        servers:
          - url: "http://192.162.3.178:8080"

```

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [May 5, 2024, 6:11am UTC](https://community.traefik.io/t/unable-to-proxy-request-to-containers-running-in-same-host/22577/2 "2024-05-05T06:11:57Z")

</div>

What error do you get?

---

<div class="post-metadata">

**Author:** ![rbipin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/rbipin/32/8659_2.png) [@rbipin](https://community.traefik.io/u/rbipin)\
**Post date:** [May 6, 2024, 3:52am UTC](https://community.traefik.io/t/unable-to-proxy-request-to-containers-running-in-same-host/22577/3 "2024-05-06T03:52:09Z")

</div>

I get 404 page not found, I'm able to access the server `urls` separately

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [May 6, 2024, 7:35am UTC](https://community.traefik.io/t/unable-to-proxy-request-to-containers-running-in-same-host/22577/4 "2024-05-06T07:35:48Z")

</div>

Enable and check Traefik access log in JSON format to see which component is throwing the error (`OriginStatus` vs `DownstreamStatus`).

Note that placing a web app under a path (even when removing path with middleware) usually just works for APIs with single requests, not for GUI web apps with links, scripts and images.

Share your full Traefik static and dynamic config, and `docker-compose.yml` if used.

---

<div class="post-metadata">

**Author:** ![rbipin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/rbipin/32/8659_2.png) [@rbipin](https://community.traefik.io/u/rbipin)\
**Post date:** [May 6, 2024, 5:13pm UTC](https://community.traefik.io/t/unable-to-proxy-request-to-containers-running-in-same-host/22577/6 "2024-05-06T17:13:24Z")

</div>

Here is the **access logs**

```auto
{
  "ClientAddr": "192.168.3.122:4373",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4373",
  "DownstreamContentSize": 196629,
  "DownstreamStatus": 200,
  "Duration": 948336903,
  "OriginContentSize": 196629,
  "OriginDuration": 945064492,
  "OriginStatus": 200,
  "Overhead": 3272411,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 30,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/portainer/api/motd",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "RouterName": "portainer-proxy@file",
  "ServiceAddr": "192.162.3.177:9443",
  "ServiceName": "portainer-service@file",
  "ServiceURL": "https://192.162.3.177:9443",
  "StartLocal": "2024-05-06T16:50:39.662651042Z",
  "StartUTC": "2024-05-06T16:50:39.662651042Z",
  "downstream_Content-Type": "application/json",
  "downstream_Date": "Mon, 06 May 2024 16:50:40 GMT",
  "downstream_X-Content-Type-Options": "nosniff",
  "downstream_X-Xss-Protection": "1; mode=block",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "origin_Content-Type": "application/json",
  "origin_Date": "Mon, 06 May 2024 16:50:40 GMT",
  "origin_X-Content-Type-Options": "nosniff",
  "origin_X-Xss-Protection": "1; mode=block",
  "request_Accept": "application/json, text/plain, */*",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Referer": "http://192.162.3.178/portainer",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Prefix": "/portainer",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:50:40Z"
}
{
  "ClientAddr": "192.168.3.122:4373",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4373",
  "DownstreamContentSize": 8731,
  "DownstreamStatus": 200,
  "Duration": 55843444,
  "OriginContentSize": 8731,
  "OriginDuration": 53378133,
  "OriginStatus": 200,
  "Overhead": 2465311,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 39,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/portainer",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "RouterName": "portainer-proxy@file",
  "ServiceAddr": "192.162.3.177:9443",
  "ServiceName": "portainer-service@file",
  "ServiceURL": "https://192.162.3.177:9443",
  "StartLocal": "2024-05-06T16:53:22.865210388Z",
  "StartUTC": "2024-05-06T16:53:22.865210388Z",
  "downstream_Accept-Ranges": "bytes",
  "downstream_Cache-Control": "no-cache, no-store, must-revalidate",
  "downstream_Content-Encoding": "gzip",
  "downstream_Content-Type": "text/html; charset=utf-8",
  "downstream_Date": "Mon, 06 May 2024 16:53:22 GMT",
  "downstream_Last-Modified": "Thu, 07 Dec 2023 08:11:04 GMT",
  "downstream_Vary": "Accept-Encoding",
  "downstream_X-Content-Type-Options": "nosniff",
  "downstream_X-Xss-Protection": "1; mode=block",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "origin_Accept-Ranges": "bytes",
  "origin_Cache-Control": "no-cache, no-store, must-revalidate",
  "origin_Content-Encoding": "gzip",
  "origin_Content-Type": "text/html; charset=utf-8",
  "origin_Date": "Mon, 06 May 2024 16:53:22 GMT",
  "origin_Last-Modified": "Thu, 07 Dec 2023 08:11:04 GMT",
  "origin_Vary": "Accept-Encoding",
  "origin_X-Content-Type-Options": "nosniff",
  "origin_X-Xss-Protection": "1; mode=block",
  "request_Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Purpose": "prefetch",
  "request_Sec-Purpose": "prefetch;prerender",
  "request_Upgrade-Insecure-Requests": "1",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Prefix": "/portainer",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:53:22Z"
}
{
  "ClientAddr": "192.168.3.122:4369",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4369",
  "DownstreamContentSize": 19,
  "DownstreamStatus": 404,
  "Duration": 310352,
  "GzipRatio": 0,
  "OriginContentSize": 0,
  "OriginDuration": 0,
  "OriginStatus": 0,
  "Overhead": 310352,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 41,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/vendor.c6c227160a59d929ec43.js",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "StartLocal": "2024-05-06T16:53:22.930453342Z",
  "StartUTC": "2024-05-06T16:53:22.930453342Z",
  "downstream_Content-Type": "text/plain; charset=utf-8",
  "downstream_X-Content-Type-Options": "nosniff",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "request_Accept": "*/*",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Purpose": "prefetch",
  "request_Referer": "http://192.162.3.178/portainer",
  "request_Sec-Purpose": "prefetch;prerender",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:53:22Z"
}
{
  "ClientAddr": "192.168.3.122:4373",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4373",
  "DownstreamContentSize": 19,
  "DownstreamStatus": 404,
  "Duration": 469028,
  "GzipRatio": 0,
  "OriginContentSize": 0,
  "OriginDuration": 0,
  "OriginStatus": 0,
  "Overhead": 469028,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 40,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/runtime.942fa683274b3d3c26cf.js",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "StartLocal": "2024-05-06T16:53:22.930277165Z",
  "StartUTC": "2024-05-06T16:53:22.930277165Z",
  "downstream_Content-Type": "text/plain; charset=utf-8",
  "downstream_X-Content-Type-Options": "nosniff",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "request_Accept": "*/*",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Purpose": "prefetch",
  "request_Referer": "http://192.162.3.178/portainer",
  "request_Sec-Purpose": "prefetch;prerender",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:53:22Z"
}
{
  "ClientAddr": "192.168.3.122:4367",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4367",
  "DownstreamContentSize": 19,
  "DownstreamStatus": 404,
  "Duration": 344770,
  "GzipRatio": 0,
  "OriginContentSize": 0,
  "OriginDuration": 0,
  "OriginStatus": 0,
  "Overhead": 344770,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 42,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/vendor.b4533442c1cbb18b98a1.css",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "StartLocal": "2024-05-06T16:53:22.930456259Z",
  "StartUTC": "2024-05-06T16:53:22.930456259Z",
  "downstream_Content-Type": "text/plain; charset=utf-8",
  "downstream_X-Content-Type-Options": "nosniff",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "request_Accept": "text/css,*/*;q=0.1",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Purpose": "prefetch",
  "request_Referer": "http://192.162.3.178/portainer",
  "request_Sec-Purpose": "prefetch;prerender",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:53:22Z"
}
{
  "ClientAddr": "192.168.3.122:4367",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4367",
  "DownstreamContentSize": 19,
  "DownstreamStatus": 404,
  "Duration": 145259,
  "GzipRatio": 0,
  "OriginContentSize": 0,
  "OriginDuration": 0,
  "OriginStatus": 0,
  "Overhead": 145259,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 43,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/main.7d6053e1c574421c1788.css",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "StartLocal": "2024-05-06T16:53:23.056269142Z",
  "StartUTC": "2024-05-06T16:53:23.056269142Z",
  "downstream_Content-Type": "text/plain; charset=utf-8",
  "downstream_X-Content-Type-Options": "nosniff",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "request_Accept": "text/css,*/*;q=0.1",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Purpose": "prefetch",
  "request_Referer": "http://192.162.3.178/portainer",
  "request_Sec-Purpose": "prefetch;prerender",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:53:23Z"
}
{
  "ClientAddr": "192.168.3.122:4367",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4367",
  "DownstreamContentSize": 19,
  "DownstreamStatus": 404,
  "Duration": 140883,
  "GzipRatio": 0,
  "OriginContentSize": 0,
  "OriginDuration": 0,
  "OriginStatus": 0,
  "Overhead": 140883,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 44,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/main.712d6f30396f42406a3d.js",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "StartLocal": "2024-05-06T16:53:23.070859457Z",
  "StartUTC": "2024-05-06T16:53:23.070859457Z",
  "downstream_Content-Type": "text/plain; charset=utf-8",
  "downstream_X-Content-Type-Options": "nosniff",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "request_Accept": "*/*",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Purpose": "prefetch",
  "request_Referer": "http://192.162.3.178/portainer",
  "request_Sec-Purpose": "prefetch;prerender",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:53:23Z"
}
{
  "ClientAddr": "192.168.3.122:4367",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4367",
  "DownstreamContentSize": 19,
  "DownstreamStatus": 404,
  "Duration": 121924,
  "GzipRatio": 0,
  "OriginContentSize": 0,
  "OriginDuration": 0,
  "OriginStatus": 0,
  "Overhead": 121924,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 45,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/locales/en-US/translation.json",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "StartLocal": "2024-05-06T16:53:23.843007973Z",
  "StartUTC": "2024-05-06T16:53:23.843007973Z",
  "downstream_Content-Type": "text/plain; charset=utf-8",
  "downstream_X-Content-Type-Options": "nosniff",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "request_Accept": "*/*",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Purpose": "prefetch",
  "request_Referer": "http://192.162.3.178/portainer",
  "request_Sec-Purpose": "prefetch;prerender",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:53:23Z"
}
{
  "ClientAddr": "192.168.3.122:4373",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4373",
  "DownstreamContentSize": 19,
  "DownstreamStatus": 404,
  "Duration": 181136,
  "GzipRatio": 0,
  "OriginContentSize": 0,
  "OriginDuration": 0,
  "OriginStatus": 0,
  "Overhead": 181136,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 46,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/locales/en/translation.json",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "StartLocal": "2024-05-06T16:53:23.843005931Z",
  "StartUTC": "2024-05-06T16:53:23.843005931Z",
  "downstream_Content-Type": "text/plain; charset=utf-8",
  "downstream_X-Content-Type-Options": "nosniff",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "request_Accept": "*/*",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Purpose": "prefetch",
  "request_Referer": "http://192.162.3.178/portainer",
  "request_Sec-Purpose": "prefetch;prerender",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:53:23Z"
}
{
  "ClientAddr": "192.168.3.122:4373",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4373",
  "DownstreamContentSize": 19,
  "DownstreamStatus": 404,
  "Duration": 157801,
  "GzipRatio": 0,
  "OriginContentSize": 0,
  "OriginDuration": 0,
  "OriginStatus": 0,
  "Overhead": 157801,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 47,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/admin/",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "StartLocal": "2024-05-06T16:53:24.136231843Z",
  "StartUTC": "2024-05-06T16:53:24.136231843Z",
  "downstream_Content-Type": "text/plain; charset=utf-8",
  "downstream_X-Content-Type-Options": "nosniff",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "request_Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Upgrade-Insecure-Requests": "1",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:53:24Z"
}
{
  "ClientAddr": "192.168.3.122:4373",
  "ClientHost": "192.168.3.122",
  "ClientPort": "4373",
  "DownstreamContentSize": 19,
  "DownstreamStatus": 404,
  "Duration": 120466,
  "GzipRatio": 0,
  "OriginContentSize": 0,
  "OriginDuration": 0,
  "OriginStatus": 0,
  "Overhead": 120466,
  "RequestAddr": "192.162.3.178",
  "RequestContentSize": 0,
  "RequestCount": 48,
  "RequestHost": "192.162.3.178",
  "RequestMethod": "GET",
  "RequestPath": "/favicon.ico",
  "RequestPort": "-",
  "RequestProtocol": "HTTP/1.1",
  "RequestScheme": "http",
  "RetryAttempts": 0,
  "StartLocal": "2024-05-06T16:53:24.514086592Z",
  "StartUTC": "2024-05-06T16:53:24.514086592Z",
  "downstream_Content-Type": "text/plain; charset=utf-8",
  "downstream_X-Content-Type-Options": "nosniff",
  "entryPointName": "web",
  "level": "info",
  "msg": "",
  "request_Accept": "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8",
  "request_Accept-Encoding": "gzip, deflate",
  "request_Accept-Language": "en-US,en;q=0.9",
  "request_Connection": "keep-alive",
  "request_Cookie": "_pk_id.1.10f4=9689137501630716.1714758449.; PHPSESSID=mb691evh5hpd8t8q1oqpfvq4s0; _pk_ses.1.10f4=1",
  "request_Referer": "http://192.162.3.178/admin/",
  "request_User-Agent": "REDACTED",
  "request_X-Forwarded-Host": "192.162.3.178",
  "request_X-Forwarded-Port": "80",
  "request_X-Forwarded-Proto": "http",
  "request_X-Forwarded-Server": "68ba27031a77",
  "request_X-Real-Ip": "192.168.3.122",
  "time": "2024-05-06T16:53:24Z"
}

```

**my static configuration**

```auto
global:
  checkNewVersion: true
  sendAnonymousUsage: false

serversTransport:
  insecureSkipVerify: true

log:
  level: DEBUG
  format: common
  filePath: /var/log/traefik/traefik.log

accessLog:
  filePath: /var/log/traefik/accesslog.log
  format: json
  fields:
    defaultMode: keep
    names:
      ClientUsername: drop
      
    headers:
      defaultMode: keep
      names:
        User-Agent: redact
        Authorization: drop
        Content-Type: keep

api:
  dashboard: true
  insecure: true
  debug: false

entryPoints:
  web:
    address: :80
  secureWeb:
    address: :443

providers:
  docker:
    exposedByDefault: false
    endpoint: "unix:///var/run/docker.sock"
    watch: true
  file:
    directory: /etc/traefik/conf
    watch: true

```

**docker-compose.yml**

```auto
version: '3.8'

volumes:
  traefik-ssl-cert:
    driver: local
services:
  traefik:
    container_name: traefik-proxy
    image: "traefik:latest"
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - /etc/traefik:/etc/traefik
      - traefik-ssl-cert:/ssl-certs
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - skynet
networks:
    skynet:
        external: true
        name: skynet

```

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [May 6, 2024, 5:41pm UTC](https://community.traefik.io/t/unable-to-proxy-request-to-containers-running-in-same-host/22577/7 "2024-05-06T17:41:47Z")

</div>

As stated before, you can’t simply place a GUI web app under a path, see [explanation](https://community.traefik.io/t/404-page-not-found-when-using-with-pathprefix/22347/8).

Your first request `/portainer` will be forwarded as request to `/`, Portainer will respond with a page. Browser will then request `/vendor.js` as part of the initial page, Traefik doesn’t know where to route it, because is has no `/portainer` prefix, will respond with `404`.

**But** it seems Portainer does support setting a base path ([doc](https://docs.portainer.io/advanced/cli)), so just use that, don’t strip it. Traefik dashboard does not support a base path, use a sub-domain.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [May 9, 2024, 5:42pm UTC](https://community.traefik.io/t/unable-to-proxy-request-to-containers-running-in-same-host/22577/8 "2024-05-09T17:42:43Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
