cheeselemon / ophiuchi-desktop

A local https proxy server using docker as backend
MIT License
1.25k stars 47 forks source link

[BUG]502 Bad Gateway #12

Closed AvinashDalvi89 closed 5 months ago

AvinashDalvi89 commented 5 months ago

Describe the bug

After completed all steps not able to test URL.

502 Bad Gateway

502 Bad Gateway


nginx/1.23.2

To Reproduce Steps to reproduce the behavior:

Expected behavior URL should give 200 status.

Screenshots

Screenshot 2024-06-05 at 2 15 27 PM Screenshot 2024-06-05 at 2 15 32 PM

Desktop (please complete the following information):

cheeselemon commented 5 months ago

Please run docker exec -it ophiuchi-nginx ping host.docker.internal ?

AvinashDalvi89 commented 5 months ago
~ % docker exec -it ophiuchi-nginx ping host.docker.internal
PING host.docker.internal (192.168.65.254): 56 data bytes
64 bytes from 192.168.65.254: seq=0 ttl=63 time=2.281 ms
64 bytes from 192.168.65.254: seq=1 ttl=63 time=0.948 ms
64 bytes from 192.168.65.254: seq=2 ttl=63 time=0.956 ms
64 bytes from 192.168.65.254: seq=3 ttl=63 time=1.061 ms
64 bytes from 192.168.65.254: seq=4 ttl=63 time=0.973 ms
64 bytes from 192.168.65.254: seq=5 ttl=63 time=1.086 ms
64 bytes from 192.168.65.254: seq=6 ttl=63 time=0.944 ms
64 bytes from 192.168.65.254: seq=7 ttl=63 time=0.812 ms
64 bytes from 192.168.65.254: seq=8 ttl=63 time=1.095 ms
64 bytes from 192.168.65.254: seq=9 ttl=63 time=0.935 ms
cheeselemon commented 5 months ago

can you try docker exec -it ophiuchi-nginx curl -I http://host.docker.internal:8000 ?

1) If the application at host.docker.internal:8000 is reachable from container's side, it should return something like this:

HTTP/1.1 200 OK
vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding
cache-control: no-store, must-revalidate
x-powered-by: Next.js
content-type: text/html; charset=utf-8
date: Thu, 06 Jun 2024 14:23:48 GMT
connection: close

2) Is the app at 8000 hosted as a docker container also?

AvinashDalvi89 commented 5 months ago

Its works my bad was pointing to wrong port. Thanks. Closing this issue.