I came accross this thread looking up how to do exactly what you are wondering about.
The reason why a lot of people will set it up nginx -> varnish -> nginx is because varnish does not support ssl and they have no plans to ever support ssl. If you do not need https anywhere then there is no need to have nginx as a reverse proxy for varnish.
I do not understand the language the sites are in but from the looks of it they are setting it up so nginx can forward the request to two different ports. one for the sites and another for the apps. My guess is that varnish is only listening to one of them and something else is listening for the other.
likewise you could set it up so that you completly bypass varnish if using a specific port. This can be usefull for debugging but I would not recoomend it personally.
The reason why a lot of people will set it up nginx -> varnish -> nginx is because varnish does not support ssl and they have no plans to ever support ssl. If you do not need https anywhere then there is no need to have nginx as a reverse proxy for varnish.
I do not understand the language the sites are in but from the looks of it they are setting it up so nginx can forward the request to two different ports. one for the sites and another for the apps. My guess is that varnish is only listening to one of them and something else is listening for the other.
likewise you could set it up so that you completly bypass varnish if using a specific port. This can be usefull for debugging but I would not recoomend it personally.