Skip to page content

亚洲太平洋地区 (Chinese Simplified) 更改

How Many Ports Does EZproxy Use?

In its default configuration, EZproxy operates in proxy by port. In proxy by port, EZproxy uses one TCP port for login processing. By default, the first port used by EZproxy is 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/ezproxy.cfg. As an example, EZproxy might assign port 2050 for www.somedb.com, 2051 for search.somedb.com, 2052 for www.otherdb.com, and 2053 for www.otherdb.com:180. 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. By default, EZproxy will use up to 200 ports ranging from 2048 to 2252. See MaxVirtualhosts for details on why 2252 is the highest port.

In its default configuration, EZproxy will not create more than 200 virtual web servers. For information on how to change this limit, see Changing Limits.

If your site uses a firewall, your firewall may need to be configured to allow incoming connections on these ports. Under the default limit, EZproxy will use no more than ports 2048 - 2248 (skipping 2049, which the firewall administrator may choose to leave blocked if your EZproxy system runs NFS). 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.

One way to avoid the arbitrary number of ports required for proxy by port, EZproxy can operate in another mode called proxy by hostname. In proxy by hostname, EZproxy uses one to three pre-identified ports for all processing--one for http processing, an optional one for https processing, and an optional one to allow old URLs to work if you move from using port 2048 to using port 80 for http. Using the previous example, EZproxy might represent www.somedb.com as www.somedb.com.ezproxy.yourlib.org, search.somedb.com as search.somedb.com.ezproxy.yourlib.org, www.otherdb.com as www.otherdb.com.ezproxy.yourlib.org, and www.otherdb.com:180 as p180-www.otherdb.com.ezproxy.yourlib.org.