Issues with a reverse proxy


I was wondering if I could get some help. I’m trying to use Nginx as a reverse proxy for an audio streaming server called Icecast.

Just to explain my setup, I have a server with 2 IPv4 addresses and 1 IPv6. Icecast binds to both an IPv4 and v6 address on port 8000. Nginx is set to listen on port 80 of those same addresses.

The problem is that I receive a 502 bad gateway error when accessing the domain. I think the issue has something to do with the fact that Icecast doesn’t bind to all of the IP addresses that are available on the server, but that’s just a guess.

I’ve uploaded a copy of my Nginx configuration.

I was hoping one of you may have an idea about what might be misconfigured.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


The 502 Bad Gateway error means that your Nginx server received an invalid response from your Icecast service. I would recommend starting with the following:

  • First as you said check if Icecast is listening correctly:
netstat -plant
  • If you can not see the lcecast in the output, I would suggest double checking your lcecast configuration and any logs if available
  • Also check your Nginx error log for more detailed information

Hope that this helps! Bobby