Use Apache to configure Tomcat Application Integration PHP Forum-Discuz
A Web application recently developed. The main site is a Tomcat-based Java application, which needs to be integrated with the PHP Forum Discuz.
The Tomcat application port is 8101, The apahce port is 80, and the website domain name is www.bkjia.com
Use the xampp server to directly integrate apache and php to install discuz.
To access the tomcat main site through www.bkjia.com, use www.bkjia.com/bbs] to access the discuzforum.
Because tomcat port is 8101 and cannot be accessed directly through www.bkjia.com, you need to use apache VirtualHost to implement
The configuration is as follows:
<VirtualHost *: 80>
ProxyPass/bbs!
ProxyPass/http://bkjia.com: 8101/myweb/
ProxyPassReverse/http://bkjia.com: 8101/myweb/
ProxyPassReverseCookiePath //
</VirtualHost>
Explanation
ProxyPass/http://bkjia.com: 8101/myweb/
Indicates that proxy access will be performed to access the root directory of the website. The access address is the tomcat application address. Note that the end of the path must end with a slash (/); otherwise, access will fail.
ProxyPassReverse/http://bkjia.com: 8101/myweb/
The reverse proxy is consistent with ProxyPass.
ProxyPassReverseCookiePath //
Cookie Path, which must be configured. Otherwise, the website session will be lost and the cookie cannot be saved. The configuration here indicates that the cookie Path of the root node is/(you can also set it to another one, for example :)
ProxyPassReverseCookiePath // myweb
ProxyPass/bbs!
Indicates that the/bbs directory is not accessed by proxy, that is, bbs uses apache for direct access. If this item is not configured,/bbs will use tomcat for access.
Access can be properly configured as expected. However, there is a problem:
Key points after upgrading Apache 14.04 to 2.2 in Ubuntu 2.4
Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04
Compile and install LAMP in CentOS 5.9 (Apache 2.2.44 + MySQL 5.6.10 + PHP 5.4.12)
Source code for Web server architecture in RedHat 5.4 build the LAMP environment and application PHPWind
Build a WEB Server Linux + Apache + MySQL + PHP in the LAMP source code Environment
This article permanently updates the link address: