I'm using Play framework 2.0. I'm creating a standalone app using "play dist".
Also I'm using Nginx as a frontend. So, I have Nginx config:
location /terra {
proxy_pass http://127.0.0.1:9000;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
My routing file looks like:
GET / controllers.Application.index()
GET /projects controllers.Application.projects()
When I start an application like
sh start -Dhttp.address=127.0.0.1 -Dhttp.port=9000
or just
sh start
and go to http://hostnamehere/terra I get: Action not found For request 'GET /terra'
If I change GET / controllers.Application.index() to GET /terra controllers.Application.index() - it doesn't work too.
Also when I run my app locally and go to "localhost:9000/WRONG_ROUTING_NAME" I get the same error, but I can see "These routes have been tried, in this order: " and the listing of the methods. I can't see the same listing after the app is deployed.
When I use curl myhost.com:9000 I get: curl: (52) Empty reply from server – Azee 12 secs ago edit