It's possible
I set up one reverse proxy that runs one PHP website (Drupal) and one Java website (for business logic) that are stored on the same server using a reverse proxy with 2 locations. The advantage of this configuration is that it does not provide the port that Tomcat uses for the URL, which was mandatory for me for security reasons.
Here's how I got it:
<VirtualHost *:80> ProxyPreserveHost On DocumentRoot "/srv/www/htdocs/" ErrorLog /var/log/httpd/app_error_log.log CustomLog /var/log/httpd/app_log.log combined ServerName myapp.com #Drupal PHP Content, stored at / as the main site. <Location /> ProxyPass http://localhost/ ProxyPassReverse http://localhost Order allow,deny Allow from all </Location> #Tomcat/java content, secondary site used to process payments and business logic: <Location /javaApp> ProxyPass http://localhost:8080/javaApp/ ProxyPassReverse http://localhost:8080/javaApp/ Order allow,deny Allow from all </Location> </VirtualHost>
Restart Apache:
service httpd restart;
Test your reverse proxies: PHP / Drupal (in my case, I use drupal, but I can use any PHP code):
http://yourserverip/ or http://localhost/
Java:
http://yourserverip/javaApp or http://localhost/javaApp
I hope someone can find this helpful. It was hard for me to understand this. :)
Sincerely.
Israelm
source share