The try out of Mod_proxy_ajp model group of Apache22 and Apache22+php5+tomcat5 install a guideline quickly
12/13/2005
Note: ??mists dark blue basketry steals what finish below ?.3-RELEASE.But also should apply to platform of other Unix Like.
One, preparation works:
1, update Port first,#cvsup -g -L 2 Your-ports-supfile.
2, install JDK1.5
Recommend use JDK1.5p2(native way) ,The article that the JDK below introductory FreeBSD compiles is very much, the article no longer give uncecessary details.After installation finishs JDK,Did not forget to install environmental variable JAVA_HOME.Whether is JDK of test and verify installed later correct.Version of - of executive Java,See output correct.
Two, installation
1, install Tomcat
Install from Port can.
2, install Apache22
My Make parameter is as follows:Make WITH_AUTH_MODULES=yes WITH_DAV_MODULES=yes WITH_LDAP_MODULES=yes WITH_MISC_MODULES=yes WIHT_PROXY_MODULES=yes WITH_SSL_MODULES=yes WITH_SUEXEC_MODULES=yes WITH_PROXY_MODULES="proxy Proxy_http Proxy_ajp Proxy_balancer "Make InstallMake Clean
After installation is finished,Lynx Localhost checks.Ensure installation is correct.
3, install Php5Cd /usr/ports/lang/php5Make Install Clean
Install the team of Php patulous model of other needCd /usr/ports/lang/php5-extensionMake ConfigMakeMake InstallMake Clean
Editor Httpd.conf,Increase following travel:
AddType Application/x-httpd-php.php
AddType Application/x-httpd-php-source.phps
4, configuration Mod_proxy_ajp
In seeing Httpd.conf above all whether correct Load Mod_proxy model group.If do not have,Compile installation Apache22 afresh.The configuration of Mod_proxy_ajp is very simple.Be based on flexibility to consider,Had better configure in fictitious lead plane alone.My configuration is as follows:
%26lt;VirtualHost *%26gt;
ServerName Localhost
ProxyPass / Ajp://localhost:8009/
#ProxyPass / Http://localhost:8180/
ProxyPassReverse / Ajp://localhost:8009/
#ProxyPassReverse / Http://localhost:8180/
%26lt;/VirtualHost%26gt;
Explain:/ the 8080 port that express an all hair to visit a request to turn to Tomcat automatically to monitor toward the Http of 80 port (the Tomcat acquiesce that FreeBSD Port installs monitors 8180 port) .Lynx Localhost,The Welcome page that can see Tomcat.The specification installs a success.
Notice:As a result of / the visit that installs an all 80 port Forward arrived Tomcat,So this may not be our place hope,The Apache below this kind of circumstance is a transmit representative only.Usually,We hope Apache can provide function of Mod_perl, Php at the same time.Because this needs to be the application of Jsp alone,configure URI map.Configure same very simple ProxyPass /myapp Ajp://localhost:8009/ ,ProxyPassReverse /myapp Ajp://localhost:8009/ can.
Can see,Compared with before acting Mod_jk will tell,Mod_proxy_ajp goes to the lavatory very simply.The configuration of Mod_jk is a nightmare simply.With a ha breath out,What to still wait for,Fast upgrade.
Textual link:Http://bbs.et8.net/bbs/showthread.php? T=715943
...