Why Is This Important?
If you are using the recommended Proxy by Hostname method to proxy resources, EZproxy will use one to three pre-identified ports for processing.
If you are using the default Proxy by Port method to proxy resources, the number of ports used will vary with the number of resources you have configured in your config.txt. Based on the number of resources configured, you may need to make additional changes to your EZproxy configuration as described below.
To avoid the arbitrary number of ports required for proxy by port, EZproxy can operate using the recommended proxy by hostname configuration. In proxy by hostname, EZproxy uses one to three pre-identified ports for all processing:
Using the example above, EZproxy will use rewritten URLs using the hostnames in config.txt and would represent the URLS above as follows:
In its default configuration, EZproxy operates in proxy by port and uses one TCP port for login processing, with the first port being 2048. This port is used by EZproxy to handle user authentication. EZproxy always skips port 2049 since it is used by NFS.
In proxy by port, EZproxy creates "virtual web servers" by assigning one additional TCP port for every web host used by the databases you have configured in config.txt. As an example, EZproxy might assign the following ports to resources:
Since the ports are assigned based on the web server names chosen by database vendors, it is not possible to predict the exact number of ports that EZproxy will require for any given configuration. EZproxy will not create more than 200 virtual web servers. For information on how to change this limit, see MaxVirtualhosts.
If your site uses a firewall, it may need to be configured to allow incoming connections on these ports. Under the default limit, EZproxy will use no more than ports 2048 - 2252 (skipping 2049, which the firewall administrator may choose to leave blocked if your EZproxy system runs NFS, and 2064, 2115, and 2140, which are also commonly assigned to other services). You can also determine the highest port number in use with the administrative /status URL. Since EZproxy dynamically creates virtual web servers as needed, you should always leave at least a few extra ports available.
In default configurations using port 2048 as their start and not using any SkipPort directives, the highest port that EZproxy will assign may be found by the formula:
MaxVirtualHosts + 2052
If you have no interest to know why this is the case, you may skip the rest of this section.
The actual formula to compute the worst case highest port that EZproxy may assign is:
FirstPort + MaxVirtualHosts + #NoUse + #SkipPort - 1
where these values are defined as:
|FirstPort||The first port assigned by EZproxy; default 2048|
|MaxVirtualHosts||The value of MaxVirutalHosts; default 200|
|#NoUse||The number of ports that EZproxy will not assign as discussed earlier in this page; default 5|
|#SkipPort||The number of SkipPort directives in config.txt; default 0|
In the default EZproxy configuration, the worst case value is 2048+200+5+0-1 or 2252.
The astute reader will realize that 2251 is actually the highest port that can be assigned in the default configuration, since #NoUse has a practical value of 4 until EZproxy reaches port 2401. The value of 5 is used throughout for convenience.
This page last revised: May 31, 2016.