saike
saike

Reputation: 1056

How to start PlayFramework on server

I created Play app. But when i starting it on web-server, it's not working.

Here is a link: podulli.com

When i run it in DEV mode on port 9000, browser not connect, and play application only shows: waiting for first request to start.

When i run it by command: play start, shell write that application is started, but browser shows only files on server.

Is it possible, to run Play apps in dev mode, and then use them througth WWW ??

What i'm doing wrong? And What can i Do to my app start working on server?

THANK U!

Upvotes: 0

Views: 387

Answers (1)

aaberg
aaberg

Reputation: 2273

Yes, that is possible. But your application has to run on port 80.

You have two options.

  1. You configure your application to run on port 80. This will limit your server to only run this application, as only one application can use port 80 at the time.

  2. You set up a reverse proxy on your server to listen to port 80, and proxy the requests to port 9000.

for you it is probably best to use option 2, since you are already running apache on the server. Apache and play cannot use port 80 at the same time. You can start your play application to use port 9000 (or any port you prefer), and configure apache to reverse proxy requests to this port.

Remember, when you are finished debugging your application, it is important to run it in production mode. Production mode is not only much faster, but also more secure. For instance, everyone would be able to kill your application, by going to http://podulli.com/@kill. This "feature" is turned off in production mode.

Upvotes: 1

Related Questions