mod_proxy_ajp is a connector to connect Tomcat and Apache Httpd, it is activated from Apache Httpd. When it is activated the requests will be sent using AJP protocol into Tomcat and recieve results back.To test if the following steps works type the url that contains the folder you want to send its requests into Tomcat and the url has to change to the address given in the configuration (ajp).
Steps:
1.Enable the AJP connector for one or more tomcat installations by editing TOMCAT_HOME/conf/server.xml and uncommenting the AJP connector included with the default distribution:
2.uncomment the "LoadModule proxy_module ...." and "LoadModule proxy_ajp_module ...." in the file APACHE_HTTPD_HOME/conf/httpd.conf
3. Add the following lines
#The client makes ordinary requests for content in the name-space of the reverse proxy. The reverse proxy then decides where to send those requests, and returns the content as if it was itself the origin. a reverse proxy (using the ProxyPass directive with ProxyRequests Off)
<IfModule proxy_module>
ProxyRequests Off
#Activate reverse proxy
<Proxy *>
Order Deny,Allow
Allow from all
</Proxy>
ProxyPass /OATS ajp://localhost:8009/OATSMoodle
ProxyPassReverse /OATS ajp://localhost:8009/OATSMoodle
#OATS is which folder we will access in Apache in order to be passed into Tomcat address
Which is (OATSMoodle) in this case. When you type URL (or send requests) that contains OATS it will be send into "localhost:8080/OATSMoodle" which is the folder in Tomcat.
</IfModule>
No comments:
Post a Comment