Error 502: When accessing web server

Command used: curl 192.168.2.150:8006

response: curl: (7) Failed to connect to 192.168.2.150 port 8006 after 0 ms: Couldn't connect to server

I also have another server that I will need to get working. It is Pi-Hole and it is an http server giving me the same 502. But don’t worry about it right now because I can get it working later.

Also running curl 192.168.2.2:80 (Which is my pi-hole server) gives me the webpage that pi-hole displays, but still gives me 502 Error.