Question: Consider this example:

```
class C {};

class B {
public:
  B(C& c) : c_(c) {};
private:
  C& c_;
};

class A {
public:
  A(C& c) : b(c) {};
private:
  B& b;
};

```

`A` has a reference member `b` of class `B`. `B` has a constructor that takes a reference of class `C`. `A`'s constructor takes a reference of class `C` and tries to initialize `b` by calling the latter's constructor with `c`.

But clang complains with the following message:

```
wtf.cpp:12:13: error: non-const lvalue reference to type 'B' cannot bind to a value of unrelated type 'C'
  A(C& c) : b(c) {};
            ^ ~
1 error generated.

```

It sounds almost as if clang thought I was assigning `c` to `b`, but my intent is to call `B`'s constructor with `c`. What am I doing wrong here?

Answer: 
You should add "Host" to the request header to determine which server the request should be routed to. For example, you can do the following:

```sh
curl -H 'Host: myserver.com' localhost:80/hello

```
The `server_name` directive used to identify virtual hosts, it is not used to set the binding. Since the `listen 80` directive makes NGINX serve requests on all IP addresses, including 127.0.0.1, you can use:

```
curl http://127.0.0.1/hello

```

or

```
curl http://localhost/hello

```

without `/etc/hosts` changes, the latter assuming that `127.0.0.1 localhost` is already in there by default.