Use Apache to configure Tomcat Application Integration PHP Forum-Discuz

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.