Skip to main content
OCLC Support

Host (H)

Learn how to use the Host config.txt directive to specify a protocol/host/port to be written by EZproxy.

Host (also written as H) specifies a specific protocol/ host/ port which should be rewritten by EZproxy. If http:// and https:// are both omitted, then EZproxy assumes that the protocol is http. If port is omitted, the default is 80 for http or 443 for https.

The Host directive also authorizes the specified protocol /host/port for use in Starting Point URLs, similar to the behavior of the URL directive.

The URL directive is an implicit Host directive, making it redundant to specify the same protocol/ host/ port in both a URL directive and a Host directive.

Qualifiers

Qualifier Description
host Name of the host to authorize for proxying.

Options

Option Description
http://

May appear in front of a hostname to indicate that http should be used. This value is the assumed value unless https:// is specified.

https:// Must appear in front of the hostname if the host should be proxied using https.
port Specific remote port to authorize for proxying. If unspecified, defaults up to 80 for http or 443 for https.
listenport Specific local port to associate with this host. This option is primarily intended to assign a fixed port for use in proxy by port. When used with proxy by hostname, if specifies that the hostname should not be rewritten, and instead this host should be proxied using the base name of the EZproxy server of the specified port.

Syntax

Host [[http:// | https:// ]]host[:port] [listenport]

Examples

Direct EZproxy to proxy access to:

  • http://www.somedb.com
  • http://www.somedb.com:8080
  • http://history.somedb.com
  • https://store.somedb.com
Title Some Database
URL http://www.somedb.com
Host www.somedb.com:8080
Host http://history.somedb.com
Host https://store.somedb.com

Related directives 

Domain, DomainJavaScript, HostJavaScript, URL