On a CentOS 7 server, httpd
is configured to use AJP
to route http
traffic to a Tomcat
instance running on the same server.
What specific bash
commands will list and count the AJP
connections that exist between httpd
and tomcat
?
In case it helps, here is the background:
The httpd
configuration that sends requests to Tomcat via AJP
is:
[root@remote-host-name ~]# vi /etc/httpd/conf.d/mydomain.com.conf
<VirtualHost www.mydomain.com:80>
ServerName www.mydomain.com
ServerAlias mydomain.com
ErrorLog /var/log/httpd/mydomain_com_error.log
CustomLog /var/log/httpd/mydomain_com_requests.log combined
ProxyPass / ajp://my.public.ip.addr:8012/
ProxyPassReverse / ajp://my.public.ip.addr:8012/
</VirtualHost>
And the Tomcat config for receiving the AJP
-routed connections includes:
[root@remote-host-name ~]# vi /opt/tomcat/conf/server.xml
.....
<Connector port="8012" protocol="AJP/1.3" redirectPort="8446" connectionTimeout="10000" keepAliveTimeout="10000" />
.....
How do I list and count the live AJP connections between httpd
and tomcat
at any given moment?
You can use netstat to find the connections to ajp port 8012 here as per your config netstat -an | grep 8012
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.