I am trying to use Apache as proxy server to send request to Lucee-tomcat but I am getting the error
HTTP Status 403 – Forbidden - The server understood the request but refuses to authorize it.
I have proxy server configured and when I make http request it works perfectly
ProxyPass / http://localhost:8888/
ProxyPassReverse / http://localhost:8888/
but as soon as I change the request to be ajp it does not work and gives me 403 error.
Tomcat server.xml file
<Connector protocol=“AJP/1.3”
port="8009"
secret="mySecret"
secretRequired="true"
redirectPort="8443" />
httpd.conf file in Apache
< VirtualHost *:80>
ServerName localhost
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Require all granted
</Proxy>
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
access.log of Apache
“GET / HTTP/1.1” 403 618
OS: 10
Java Version: 19
Tomcat Version: 9.0.85
Lucee Version: 5.4.4.38
Apache Web Server: 2.4.58
11 posts - 4 participants