Posts

Showing posts with the label Tomcat

Configuring Apache to Proxy Tomcat Using the AJP Protocol.

Step 1. Configure Tomcat Comment out the normal connector above, and uncomment the AJP connector: Adjust the port if you wish and add in the URIEncoding="UTF-8" attribute. <!-- <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> --> <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> Step 2. Configure Apache Open httpd.conf and scroll to the large LoadModule section. Ensure you have the following uncommented #LoadModule proxy_module libexec/apache24/mod_proxy.so #LoadModule proxy_ajp_module libexec/apache24/mod_proxy_ajp.so In my httpd.conf, right at the bottom there is a line: Include etc/apache24/Includes/*.conf Create an ajp.conf file. You could put the configuration for AJP in the main httpd.conf file but I prefer t...

Install Tomcat8.5 on FreeBSD

Perform this command to install Tomcat8.5 $ sudo pkg install tomcat85 Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 2 package(s) will be affected (of 0 checked): New packages to be INSTALLED: tomcat85: 8.5.23 jakarta-commons-daemon: 1.0.15 Number of packages to be installed: 2 The process will require 13 MiB more space. 9 MiB to be downloaded. Proceed with this action? [y/N]: y [1/2] Fetching tomcat85-8.5.23.txz: 100% 9 MiB 9.0MB/s 00:01 [2/2] Fetching jakarta-commons-daemon-1.0.15.txz: 100% 89 KiB 91.5kB/s 00:01 Checking integrity... done (0 conflicting) [1/2] Installing jakarta-commons-daemon-1.0.15... [1/2] Extracting jakarta-commons-daemon-1.0.15: 100% [2/2] Installing tomcat85-8.5.23... Extracting tomcat85-8.5.23: 100% add tomcat85_enable=YES to /etc/rc.conf file. $ sudo sysrc tomcat85_enable=YES tomcat85_enable: -> YES start tomcat8.5 $ sudo service tomcat85 s...