user985358
user985358

Reputation:

To deploy Play! 2 application on a path with its name at Apache or Tomcat

How can I have my application made in Play! 2.0.4 (latest "production ready" package) exported to run on either Apache 2.2 or Tomcat 6.0.18 at a path like e.g. tomcatserver:8080/myApp/?

The application always runs at / under localhost:9000 on either Dev or Prod environment.

Please, can someone share a light here on how to get it deployed on one of those?

Upvotes: 3

Views: 517

Answers (1)

ndeverge
ndeverge

Reputation: 21564

You should take a look at the HTTP Fronted documentation, especially the Apache integration.

It should be something like:

LoadModule proxy_module modules/mod_proxy.so
…
<VirtualHost *:80>
  ProxyPreserveHost On
  ServerName www.loadbalancedapp.com
  ProxyPass  /excluded !
  ProxyPass /myApp http://127.0.0.1:9000/
  ProxyPassReverse /myApp http://127.0.0.1:9000/
</VirtualHost>

You'll need to deploy the Play application in standalone mode, ie without any Java EE container (Tomcat & co). Play 2 core does not provide a way to generate a .war file.

If you want to absolutely use a Java EE container, take a look at the play2-war-plugin.

Upvotes: 3

Related Questions