I am running php5, apache 2.2 and tomcat7 on ubuntu 12.10 all installed by apt-get.
I need to run both .php and .jsp files. I can run them separately on each each (tomcat and apache httpd)
I have search google but can't find a comprehensive and understandable solution for the above said versions.
Friends tell me I need a proxy (user first hits apache httpd and it forwards to tomcat if its a .jsp, then back to apache and then to the user. php is served by apache in the normal way)
1. what modules do I need? 2. what settings (*ALL) like proxy (many iam not aware of), virtual host for multiple sites do i need for both tomcat and apache.*
I think there a lack of specific guides on google or forums itself.
research:
mod_proxy_ajp replaces mod_jk
mod_php is dead
mod_php for legacy systems, fcgid for 2.2, and proxy_fcgi for 2.4
edit:
1 and 2 solved. 3 is left
I have the following vhost file below. but i have already tomcate running on 8080 for aplpinema "ROOT.war" in /home/ubuntu/tomcat/www/alpinemadotcom
(which is not extracted in webapps folder but in cache folder (despite auto deploy:true)
3-. where and how do I put similer of this:
ProxyPass /apps/jira ajp://backend.example.com:8009/jira
ProxyPassReverse /apps/jira http://www.example.com/jira
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName www.alpinema.com
ServerAlias alpinema.com
DocumentRoot /home/ubuntu/apache/www/alpinemadotcom
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/ubuntu/apache/www/alpinemadotcom/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>