The servlet Redirector is provided for web servers that support the Java servlet specification version 2.3 and higher. The following procedure is an example of how to set up the servlet Redirector for Tomcat version 5.5.9 and Apache 2.0.55.
For information about version support, see Redirector in SQL Anywhere 10.0.1 Components by Platform.
There is also a native Redirector for Apache web servers. For more information, see Apache Redirector.
This section describes how to install the servlet version of the Redirector to work on an Apache web server in conjunction with the Tomcat servlet container.
Installation requires the following steps:
Complete the steps in Configuring Redirector properties (for Redirectors that don't support server groups).
Install the servlet version of the Redirector in Tomcat.
Configure the Apache web server to run as a proxy.
In the following procedure, %CATALINA_HOME% is the root directory of your Tomcat installation.
Install Tomcat as a standalone server.
Optionally, set the required Tomcat HTTP port.
Tomcat binds to port 8080 by default. If there is a conflict, perhaps because another web server is using this port,
Open the file: %CATALINA_HOME%/conf/server.xml.
Search for 8080 (which is in a <Connector> tag).
Change it to a port that is not in use.
Install the servlet Redirector as a web application.
Copy iaredirect.war file to %CATALINA_HOME%/webapps.
Shut down and restart Tomcat.
Tomcat expands the war file and creates the directory iaredirect for the Redirector web application.
Edit the file %CATALINA_HOME%/webapps/iaredirect/WEB-INF/web.xml. Search for redirector.config (in an <init-param> tag), and correct the path for the redirector.config file.
Change the entry redirector.config to read
drive:/path/redirector.config. Even on Windows operating systems, use a forward slash as a path separator, as in d:/redirector.config.
Shut down and restart Tomcat for the changes to take effect.
Once the changes have taken effect, you no longer need the war file in the deployed location.
The Redirector can now be invoked through the following URL:
where tc-host is the machine and tc-port the port on which Tomcat is listening.
In the following procedure, %APACHE_HOME% is the root directory of your Apache installation.
Install the Apache web server.
Optionally, change the Apache web server port:
Edit the file %APACHE_HOME%/conf/httpd.conf and change the Port setting to the desired port.
Configure Apache to run as a proxy:
In %APACHE_HOME%/conf/httpd.conf, add the following directives:
LoadModule proxy_module module-path/mod_proxy.so LoadModule proxy_connect_module module-path/mod_proxy_connect.so LoadModule proxy_http_module module-path/mod_proxy_http.so
where module-path is the location of the module. For example, the path may be modules/mod_proxy.so (the default).
Configure Apache to forward Redirector URLs to Tomcat.
In %APACHE_HOME%/conf/httpd.conf, add the following directive so that Apache forwards URLs of the form http://localhost/iaredirect/* to the Tomcat 5 Connector listening on port 8080:
ProxyPass /iaredirect http://localhost:8080/iaredirect
The port number must match the port number used for Tomcat. If Tomcat and Apache are not running on the same computer, provide the computer name where Tomcat is running instead of localhost.
Call the Redirector using the following syntax:
Check the log file to see if the Redirector logged a request.
Note: This test does not make a connection to the MobiLink server.