2

My nginx is forwarding its incoming http web requests to a local unix socket (unix:/var/run/foo.sock). On the other end I have a separate web server (puma + ruby on rails, if it matters) reading from that websocket.

For debugging purposes, is there a way to "see" what my web server sees? In other words, can I read incoming traffic from that same socket to verify whether a request is coming through properly?

Thanks!

user2490003
  • 147
  • 5

1 Answers1

0

There are several apps: netcat or socat amongst others to read/write data from/to sockets.

For example:

nc -lU pathtosocket

For exact syntax check the manual of the program as there are several variations of netcat.

Martynas Saint
  • 1,221
  • 7
  • 15