How to use play framework behind a proxy


In this post, I’ll show you how to configure the play’s framework activator to work behind a proxy.

First, go to your home directory and create a directory named .activator. In that directory, add a file named activatorconfig.txt.

Second, add the following text in that file:

-Dhttp.proxyHost=<your proxy host>
-Dhttp.proxyPort=<your proxy port>
-Dhttps.proxyHost=<your proxy host>
-Dhttps.proxyPort=<your proxy port>
-Dhttp.proxyUser=<proxy user>
-Dhttp.proxyPassword=<proxy password>

An example could be:

Make sure you don’t add http or https in front of the host. That was my mistake too! I have set the log level to debug, so I can see if activator is doing something.

Now, in your home directory, create another directory named .sbt. In that directory, create another directory named jvmargs. In the jvmargs directory, add a copy of your created activatorconfig.txt file. This is needed because .sbt is used by activator but is an independent program.

After you have done that. Try to execute the command ‘activator ui’. Or another activator command. Hopefully it works. Enjoy!

1 comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Tag Cloud