Apache2 + Resin2.x cluster configuration
Test environment:
Required Software: apache2.x, Resin2.x
Required computers: 2
Machine A: IP 192.168.1.119
1. Install Apache2.x
2. Modify the apache httpd. conf configuration file, Include conf/include/remote-resin.conf
3. Generate a remote-resin.conf under the conf/include directory of apache, create
4. remote-resin.conf File Content
Restart apache and enter http: // 192.168.1.119/caucho-status in the address bar.
Machine B: IP 211.111.8.86
1. Install Resin2.x
2. Modify resin. con
<Http host = "127.0.0.1" port = '000000'/> only listens to the http port of localhost <srun host = '2017. 111.8.86 'port = '000000' srun-index = "1"/>
|
Open the srun listening port, which corresponds to the apache configuration.
Add a row
<web-app id="/ws2/" app-dir="/wwwroot/webapps/ws2"/>
|
Make sure that this object exists. Do not write the path wrong. Write it in http-server.
3. start resin and access http: // 192.168.1.119/caucho-status again. You will see another scenario. Access http: // 192.168.1.119/ws2 and you will see the deployed app ws2 on machine B.
If there are multiple machines, you can repeat steps B to install the machine, and srun has other usage. Please refer to the resin manual.
In practical applications, I feel pretty good. I no longer need to update the programs and data in N Access Locations. I can update a machine. Of course, I need to make restrictions on the firewall, otherwise, everyone can connect to resin. It is easier to configure than jk2 to connect to tomcat.