When using internal ELB with tomcat integration with Apache 2.4, a "too long" error occurs

My name is Ito and I am an infrastructure engineer.
I think a common AWS server configuration is one where a web server receives access and proxies requests to the application server behind it
In that case, if you consider availability, it's best to make each server redundant.
So the configuration is like this.

I think it's common to see a configuration where Apache is used as the web server and Tomcat is used as the application server
So, I ran into a problem when Apache was throwing it to tomcat, so I'd like to leave the solution here
I got stuck with ProxyPass settings
Write a statement in the Apache virtual host that will route received requests to Tomcat
ProxyPass / ajp://internal-elb-xxxxxxxxxxxxxx.ap-northeast-1.elb.amazonaws.com:8009/
Using ProxyPass, the access is sent to ajp's port 8009.
"internal-elb-~~" indicates the internal ELB.
However, if you run a syntax check on Apache in this state, the following error will be output:
# httpd -t ProxyPass worker hostname (internal-elb-xxxxxxxxxxxxxx.ap-northeast-1.elb.amazonaws.com) too long
The hostname sent to ProxyPass is too long...
Even if I was told that, the internal ELB hostname looks like this, and the IP address isn't fixed, so what should I do
?!
Rewrite rules
In this configuration, it is OK if the request is sent directly to tomcat using ProxyPass, so
I changed the rule to the following.
RewriteEngine on RewriteRule ^/(.*)$ ajp://internal-elb-xxxxxxxxxxxxxx.ap-northeast-1.elb.amazonaws.com:8009/$1 [P,L]
We use a rewrite rule.
The rewrite rule is to throw all messages to ajp.
Now Apache requests can be successfully sent to Tomcat (internal ELB)
0