Plesk, Subdomains and (Wildfly) Docker Images

I'm running a Docker container with Wildfly 9 on my server for testing purposes. The server is managed with Plesk, so setting up the subdomain is really easy. For rewriting the subdomain path to the Docker path (and port) there is still some work necessary:

  • At first you have to install mod_proxy for the Apache Web Server under "Server" - "Tools and Settings" -> "General Settings" -> "Apache Web Server". Activate "proxy" and "proxy_http".

  • Second go to your subdomains "Web Server Settings" and fill in the following lines under "Additional directives for HTTP" (assuming that your Docker image runs on port 8089):

ProxyPass / http://localhost:8089/  
ProxyPassReverse / http://localhost:8089/