adis
adis

Reputation: 5951

How to deploy a Play Framework Site to an Apache based domain

I have tested Play now for quite a while and everything is set up locally. Now I came to the next level:

Let's say that I am a n00b, and I am. I registered myself a domain via www.antagonist.nl. My domain is wwww.tus***.eu. I have no right to change anything on their 'server', I guess.

But how can I deploy a Play Framework Application\Website on such a domain??

Thanks all for helping out.

Upvotes: 0

Views: 1764

Answers (2)

Robi Moller
Robi Moller

Reputation: 17

If you have access ( ssh access ) to the server ( apache, httpd ) where you intend to deploy to, then once you register your domain say using Godaddy, have the A (host) to point to the IP of the hosting server ( where your application is runnnig )

host = @
ip = "the ip of the hosting server"

In the server you will need to navigate to the file /etc/httpd/conf/sites-available/
or the equivalent in apache2
and change the file corresponding to your site to this type of file. save the file.

<VirtualHost *:80> 
ProxyPreserveHost On
ProxyRequests Off
ServerName www.yourdomain.com
ServerAlias yourdomain.com
ProxyPass / http://localhost:9000/
ProxyPassReverse / http://localhost:9000/
</VirtualHost> 

And then restart the server, your application should run just fine. Later you can have other applications running on other ports, just do the same and change the corresponding fields, with port numbers also changed.

These guys are doing the same for other applications that are running on other ports but 80 StackOverflow answer : Apache redirect to another port

Upvotes: 0

i.am.michiel
i.am.michiel

Reputation: 10404

Hm. What you registered is a domain with webhosting for PHP/Mysql web sites. What you are looking for is a Play! hosting service. You cannot deploy a Java solution to a PHP Server.

You will have to host your play application on one of those services and then redirect your domain via DNS redirection toward the platform hosting your app. The DNS modification should be possible via your registar (antagonist.nl) but that procedure is specific for each registrat so I can't help you.

By the way, here are a few Play! hosters :

Upvotes: 3

Related Questions