Question

I am sure this is very easy to solve, but I am in a rush, and could not find a quick way

I have an app based on Play 1.2.5 and I wanted to run three instances of it on the same machine. They won't use / as root, but /inst1/ /inst2/ and /inst3/ respectively.

If I simply let them run like this, all the automatically created links such as the one for the static resources, as well as the one that map to controller actions fail, becuase they always point to /.

I thought applciation.baseUrl would solve this, but either I am not doing it right, or it is not the right thing.

How do I do this? I want to avoid adding a custom configuration property and prefixing every path

Was it helpful?

Solution

In your application.conf:

#
# Use this if you don't host your Play application at the root of the domain
# you're serving it from. This parameter has no effect when deployed as a
# war, because the path will be handled by the application server.
http.path=/inst1/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top