Here are some instructions to get a Play Application working with Apache2 as a proxy.
I am using Ubuntu 10.04 and assume that Apache has already been installed.
Create a file that contains the name of your virtual host at “/etc/apache/sites-enabled”.
To easily distinguish it, name it after your domain name. Ex. mysite
The contents of this file should be similar the following:
<VirtualHost *:80> ProxyPreserveHost On ProxyPass / http://127.0.0.1:9000/ ProxyPassReverse / http://127.0.0.1:9000/ ServerAdmin email@example.com ServerName mysite.com ServerAlias www.mysite.com <Location /> Order allow,deny Allow from all </Location> ErrorLog /var/log/apache2/mysite-error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/mysite-access.log combined </VirtualHost>
To use the setting you must have the correct modules loaded by Apache. The ones you need are proxy and proxy_http.
Enable these by running
To enable your new site you should run