Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3663538
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:32:30+00:00 2026-05-19T01:32:30+00:00

I have developed 2 applications with Play Framework, accessing different information, so it does

  • 0

I have developed 2 applications with Play Framework, accessing different information, so it does not make sense to merge then as a single app.

Now I need to deploy both apps on the same hostname, each one in a separate sub-folder (URI), for example:
example.com/payment/
example.com/cms/

And I am having problems with routes. I configured a nginx webserver to work as reverse proxy. It deliveries first page as expected.

But once I click anything, instead of going to /cms/Application/index it links back to /Application/index (without /cms/).

IMHO I believe I need change my routes file, hardcoding /cms/ on all paths, but it seems a bad approach because if I need to deploy the APP on another URI I will need to change routes again.

What is the best way to deploy two apps on the same hostname?

----- 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 -----
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:32:30+00:00Added an answer on May 19, 2026 at 1:32 am

    If you take a look at this thread on the Google Groups, you will see that the preferred approach is to the the context path.

    The recommendation is to use a bootstrap job to set the context per application in the following way

    Play.ctxPath="/project1";
    Router.detectChanges(Play.ctxPath);
    

    So your code would be

    Play.ctxPath="/cms";
    Router.detectChanges(Play.ctxPath);
    

    etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I developed a web application using phone gap framework for android platform. I only
I have developed a asp.net application using Visual Studio 2008 and it was working
I'd like to play with Java/Flx and build RIA with Java as backend and
I have recently started playing around with iOS development and have got most of
Merry Christmas. I have two questions on In App Purchase. iAP application process: do
I'm a newbie in the field, but in the near future I have to
I have a HTTP Live streaming server setup that serves segmented mp3 audio content
I'm developing a two player checkers website. The idea is to allow people sign
I am trying to develop a system where this application allows user to book

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.