Php – How to run JBoss Application Server and Apache on the same server

apache-2.2jbossPHPvirtualhostweb-server

If multiple sites are hosted within a single server, how can someone able to use Apache for PHP and JBoss for Seam.

Example:  example.com  -> servered using PHP
          example2.com -> servered using JBoss

Best Answer

Well, if you have to use the same IP address, you will need name-based virtual hosting in combination with a reverse proxy. For instance, you could use Apache in front of JBoss and set one name virtual host to example.com:80 and configure it as you normally would with mod_php.

For example2.com:80, configure a 2nd Apache name virtual host, but use mod_proxy to set Apache up to proxy requests to JBoss configured and listening on some other port (like 8080). This isn't too hard to get working. This article, plus the Apache documentation, of course, will be helpful.

Related Topic