如何启动两个播放应用程序实例?

我正在尝试在不同的端口部署相同播放应用程序的两个实例,然后通过前面的nginx进行负载平衡。

根据手册 ,要启动多个播放实例,这些是命令。

$ start -Dhttp.port=9998 $ start -Dhttp.port=9999 

但是,如果我给出了这些,第一个命令正确地在端口9998中启动我的应用程序,但第二个命令无法通过提供以下消息来执行此操作。

 This application is already running (Or delete /play/app/folder/RUNNING_PID file) 

我正在使用Ubuntu 12.05。

那么,如何启动单个播放实例的多个实例?

 $ start -Dhttp.port=9998 -Dpidfile.path=/path/to/app1/pidfile $ start -Dhttp.port=9999 -Dpidfile.path=/path/to/app2/pidfile 

只需确保传递给每个应用程序的两个pidfile路径不同。

这在此记录:

http://www.playframework.com/documentation/2.2.x/ProductionConfiguration