How to configure Http Port in Play?

1,060 views
Skip to first unread message

Sriram P

unread,
Mar 20, 2016, 7:27:40 AM3/20/16
to play-framework

I have found the below settings for http port configuration.

$ /path/to/bin/<project-name> -Dhttp.port=1234 -Dhttp.address=127.0.0.1

or

$ run 8001

But I am expecting the configuration as part of application.conf or any other configuration file.

Any idea how to configure the http port?

Greg Methvin

unread,
Mar 21, 2016, 3:12:20 AM3/21/16
to play-framework
The config setting is play.server.http.port. See the play-server reference.conf for the other settings.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/db56c42b-2a22-43d9-8f4a-918bc32d4943%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Greg Methvin
Senior Software Engineer

Sriram P

unread,
Mar 27, 2016, 4:22:03 AM3/27/16
to play-framework
Hi Greg,

I am sorry for the delayed reply.

The below statement is not working for me, which is added in application.conf.

play.server.http.port = 80

Output: [info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

Please let me know, the right way of configuring the Netty port.

Best Regards,
Sriram

Greg Methvin

unread,
Mar 27, 2016, 4:36:24 AM3/27/16
to play-framework
Are you using the sbt "run" command? If so that won't work. Here's an explanation why: https://www.playframework.com/documentation/2.4.x/Configuration#Using-with-the-run-command


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages