Push Play application in production
I'm working on Fancy project closed to be released. I'm using Debian Squeeze 6 but I seems that the Play documentation is not enough clear about this subject.
What are the steps ?
Install apache module:
Active modules needed, not only proxy as the play documentation said.
a2enmod proxy a2enmod proxy_http /etc/init.d/apache2 restart
Update your configuration the module configuration
cat /etc/apache2/mods-available/proxy.conf
<IfModule mod_proxy.c>
# If you want to use apache2 as a forward proxy, uncomment the
# 'ProxyRequests On' line and the <Proxy *> block below.
# WARNING: Be careful to restrict access inside the <Proxy *> block.
# Open proxy servers are dangerous both to your network and to the
# Internet at large.
#
# If you only want to use apache2 as a reverse proxy/gateway in
# front of some web application server, you DON'T need
# 'ProxyRequests On'.
ProxyRequests Off
<Proxy *>
AddDefaultCharset off
Order deny,allow
# Deny from all
Allow from app.kassandre.org
</Proxy>
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
ProxyVia Full
</IfModule>
Setup your virtual host
cat /etc/apache2/sites-available/app-kassandre
# Connect play to Apache2
<virtualhost *:80>
ServerName mysite.org
ServerAlias mysite.org
ServerAdmin victor@unhook.eu
ErrorLog /home/mysite/logs/mysite.error.log
CustomLog /home/mysite/logs/mysite.access.log common
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:9000/
ProxyPassReverse / http://127.0.0.1:9000/
</virtualhost>
Restart apache
/etc/init.d/apache2 restart # or, more safe /etc/init.d/apache2 reload