I am using Play 2.0 framework, which I know use the Netty HTTP server by default. How can you set virtual host so that http://www.domain1.com redirect to http://www.maindomain.com/sites/domain1.com/?
Since Play 2.0, the routing is much more restreint and nobody seems to answer this question anywhere.
In Play 1.0, it was possible to do it inside the route file but now it is impossible 🙁
I am also using the jar production files (with dist), just to be clear, and I know Netty is there but I have no clue how to add virtual host.
It seems like I’ve found the answer of my own question. Having a lot of PHP background and no Web application background, I wasn’t understanding correctly the principle of front-end and back-end with Play 2.0.
What I need to do is keep Play running on 9000 and have a front-end Apache server (a different one!). Then, virtual hosts are as easy as before. I don’t need to touch to the Netty HTTP server.
You can get more infos at http://www.playframework.org/documentation/2.0.4/HTTPServer