I developed 2 applications with the Play Framework, referring to various information, so it makes no sense to merge while one application.
Now I need to deploy both applications on the same host name, each of which is in a separate subfolder (URI), for example: example.com/payment/ example.com/cms/
And I have problems with routes. I configured the nginx web server to work as a reverse proxy. It sends the first page as expected.
But as soon as I click on something, instead of going to / cms / Application / index, it refers to / Application / index (without / cms /).
IMHO I believe that I need to change the routes file, hardcoding / cms / in all paths, but this seems like a bad approach, because if I need to deploy APP on a different URI, I will need to change the routes again.
What is the best way to deploy two applications on the same name?
----- nginx.conf ----- ... ... ... location /cms { proxy_pass http://localhost:9001/; 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; } location /payment { proxy_pass http://localhost:9002/; 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; } ... ... ... ----- nginx.conf -----
nginx deployment playframework
arjones
source share