2

Current setup as follows:

stream  {
    server {
        server_name stream.kingdomgame.org; # this line is resulting in an error
        proxy_pass http://localhost:1935;
    }
}

Works just fine without server_name, but I'd like to use a domain if possible.

vy.pham
  • 121
  • 1
  • 4

1 Answers1

6

server_name is used to specify HTTP virtual host name for a server block.

stream module is a TCP stream proxy module, and TCP streams have no concepts of virtual host names.

So, the answer is that you cannot use server_name with stream module.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63