[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115]
[0116]
[0117]
[0118]
[0119]
[0120]
[0121]
[0122]
[0123]
[0124]
[0125]
[0126]
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135]
[0136]
[0137]
[0138]
[0139]
[0140]
[0141]
[0142]
[0143]
[0144]
[0145]
[0146]
[0147]
[0148]
[0149]
[0150]
[0151]
[0152]
[0153]
[0154]
[0155]
[0156]
[0157]
[0158]
[0159]
[0160]
[0161]
[0162]
[0163]
[0164]
[0165]
[0166]
[0167]
[0168]
[0169]
[0170]
[0171]
[0172]
[0173]
[0174]
[0175]
[0176]
[0177]
[0178]
[0179]
[0180]
[0181]
[0182]
[0183]
[0184]
[0185]
[0186]
[0187]
[0188]
[0189]
[0190]
[0191]
[0192]
[0193]
[0194]
[0195]
[0196]
[0197]
[0198]
[0199]
[0200]
[0201]
[0202]
[0203]
[0204]
[0205]
[0206]
[0207]
[0208]
[0209]
[0210]
[0211]
[0212]
[0213]
[0214]
[0215]
[0216]
[0217]
[0218]
[0219]
[0220]
[0221]
[0222]
[0223]
[0224]
[0225]
[0226]
[0227]
[0228]
[0229]
[0230]
[0231]
[0232]
[0233]
[0234]
[0235]
[0236]
[0237]
[0238]
[0239]
[0240]
[0241]
[0242]
[0243]
[0244]
[0245]
[0246]
[0247]
[0248]
[0249]
[0250]
[0251]
[0252]
[0253]
[0254]
[0255]
[0256]
[0257]
[0258]
[0259]
[0260]
[0261]
[0262]
[0263]
[0264]
[0265]
[0266]
[0267]
[0268]
[0269]
[0270]
[0271]
[0272]
[0273]
[0274]
[0275]
[0276]
[0277]
[0278]
[0279]
[0280]
[0281]
[0282]
[0283]
[0284]
[0285]
[0286]
[0287]
[0288]
[0289]
[0290]
[0291]
[0292]
[0293]
[0294]
[0295]
[0296]
[0297]
[0298]
[0299]
[0300]
[0301]
[0302]
[0303]
[0304]
[0305]
[0306]
[0307]
[0308]
[0309]
[0310]
[0311]
[0312]
[0313]
[0314]
[0315]
[0316]
[0317]
[0318]
[0319]
[0320]
[0321]
[0322]
[0323]
[0324]
[0325]
[0326]
[0327]
[0328]
[0329]
[0330]
[0331]
[0332]
[0333]
[0334]
[0335]
[0336]
[0337]
[0338]
[0339]
[0340]
[0341]
[0342]
[0343]
[0344]
[0345]
[0346]
[0347]
[0348]
[0349]
[0350]
[0351]
[0352]
[0353]
[0354]
[0355]
[0356]
[0357]
[0358]
[0359]
[0360]
[0361]
[0362]
[0363]
[0364]
[0365]
[0366]
[0367]
[0368]
[0369]
[0370]
[0371]
[0372]
[0373]
[0374]
[0375]
[0376]
[0377]
[0378]
[0379]
[0380]
[0381]
[0382]
[0383]
[0384]
[0385]
[0386]
[0387]
[0388]
[0389]
[0390]
[0391]
[0392]
[0393]
[0394]
[0395]
[0396]
[0397]
[0398]
[0399]
[0400]
[0401]
[0402]
[0403]
[0404]
[0405]
[0406]
[0407]
[0408]
[0409]
[0410]
[0411]
[0412]
[0413]
[0414]
[0415]
[0416]
[0417]
[0418]
[0419]
[0420]
[0421]
[0422]
[0423]
[0424]
[0425]
[0426]
[0427]
[0428]
[0429]
[0430]
[0431]
[0432]
[0433]
[0434]
[0435]
[0436]
[0437]
[0438]
[0439]
[0440]
[0441]
[0442]
[0443]
[0444]
[0445]
[0446]
[0447]
[0448]
[0449]
[0450]
[0451]
[0452]
[0453]
[0454]
[0455]
[0456]
[0457]
[0458]
[0459]
[0460]
[0461]
[0462]
[0463]
[0464]
[0465]
[0466]
[0467]
[0468]
[0469]
[0470]
[0471]
[0472]
[0473]
[0474]
[0475]
[0476]
[0477]
[0478]
[0479]
[0480]
[0481]
[0482]
[0483]
[0484]
[0485]
[0486]
[0487]
[0488]
[0489]
[0490]
[0491]
[0492]
[0493]
[0494]
[0495]
[0496]
[0497]
[0498]
[0499]
[0500]
[0501]
[0502]
[0503]
[0504]
[0505]
[0506]
[0507]
[0508]
[0509]
[0510]
[0511]
[0512]
[0513]
[0514]
[0515]
[0516]
[0517]
[0518]
[0519]
[0520]
[0521]
[0522]
[0523]
[0524]
[0525]
[0526]
[0527]
[0528]
[0529]
[0530]
[0531]
[0532]
[0533]
[0534]
[0535]
[0536]
[0537]
[0538]
[0539]
[0540]
[0541]
[0542]
[0543]
[0544]
[0545]
[0546]
[0547]
[0548]
[0549]
[0550]
[0551]
[0552]
[0553]
[0554]
[0555]
[0556]
[0557]
[0558]
[0559]
[0560]
[0561]
[0562]
[0563]
[0564]
[0565]
[0566]
[0567]
[0568]
[0569]
[0570]
[0571]
[0572]
[0573]
[0574]
[0575]
[0576]
[0577]
[0578]
[0579]
[0580]
[0581]
[0582]
[0583]
[0584]
[0585]
[0586]
[0587]
[0588]
[0589]
[0590]
[0591]
[0592]
[0593]
[0594]
[0595]
[0596]
[0597]
[0598]
[0599]
[0600]
[0601]
[0602]
[0603]
[0604]
[0605]
[0606]
[0607]
[0608]
[0609]
[0610]
[0611]
[0612]
[0613]
[0614]
[0615]
[0616]
[0617]
[0618]
[0619]
[0620]
[0621]
[0622]
[0623]
[0624]
[0625]
[0626]
[0627]
[0628]
[0629]
[0630]
[0631]
[0632]
[0633]
[0634]
[0635]
[0636]
[0637]
[0638]
[0639]
[0640]
[0641]
[0642]
[0643]
[0644]
[0645]
[0646]
[0647]
[0648]
[0649]
[0650]
[0651]
[0652]
[0653]
[0654]
[0655]
[0656]
[0657]
[0658]
[0659]
[0660]
[0661]
[0662]
[0663]
[0664]
[0665]
[0666]
[0667]
[0668]
[0669]
[0670]
[0671]
[0672]
[0673]
[0674]
[0675]
[0676]
[0677]
[0678]
[0679]
[0680]
[0681]
[0682]
[0683]
[0684]
[0685]
[0686]
[0687]
[0688]
[0689]
[0690]
[0691]
[0692]
[0693]
[0694]
[0695]
[0696]
[0697]
[0698]
[0699]
[0700]
[0701]
[0702]
[0703]
[0704]
[0705]
[0706]
[0707]
[0708]
[0709]
[0710]
[0711]
[0712]
[0713]
[0714]
[0715]
[0716]
[0717]
[0718]
[0719]
[0720]
[0721]
[0722]
[0723]
|1Service Configuration||

|^ By default, the logical name |*WASD_CONFIG_SERVICE| locates a common service
configuration file.  The service configuration file is optional.  If the
WASD_CONFIG_SERVICE logical is not defined or the file does not exist service
configuration is made using the WASD_CONFIG_GLOBAL [Service]
|*|/.(deprecated)||| directives.  For simple sites, those containing one or two
services, the use of a separate service configuration file is probably not
warranted.  Once the number begins to grow this file offers a specific
management interface for those services.

|^ Precedence of service specifications:

|number|
|item| /SERVICE= command line qualifier
|item| WASD_CONFIG_SERVICE configuration file (if logical defined and file
exists)
|item| WASD_CONFIG_GLOBAL [Service] directive |*|/.(deprecated)|||
|!number|

|^ WASD |/services| are also known as |/virtual servers| or |/virtual hosts|
and can provide multiple, autonomous sites from the one HTTP server.  Services
can each have an independent IP address or multiple virtual sites share a
single or set of multiple IP addresses.  Whichever the case, the host name
entered into the browser URL must able to be resolved to the IP address of an
interface configured on the HTTP server system.  There is no design limit to
the number of services that WASD can support.   It can listen on any number of
IP ports and for any number of virtual services for any given port.

|^ The server must be able to resolve its own host name/address.  It is not
unknown for completely new systems to have TCP/IP configuration overlooked. 
The server must also be able to resolve the IP addresses of any configured
virtual services (|link|Virtual Services||).  Failure to do so will result in
the service not being configured.  To avoid startup issues in the absence of a
usable DNS it is suggested that for fundamental, business-critical or otherwise
important services, static entries be provided in the system TCP/IP agent's
local database.

|^ Changes to the service configuration file can be validated at the
command-line before restart.  This detects and reports any syntactical and 
fatal configuration errors but of course cannot check the |/intent| of
the rules.

|code|
$ HTTPD /DO=SERVICE=CHECK
|!code|

|2Specific Services|

|^ In common with other configuration files, directives associated with a
specific virtual services are introduced using a double-bracket delimited host
specification (|link|Virtual Services||).  When configuring a service the
following three components specify the essential characteristics.

|bullet|

|item| |*scheme |-| | HTTP scheme (sometimes refered to as |/protocol||).  If
|/http:| (or omitted) it is a standard HTTP service.  If |/https:| an SSL
service is configured.

|item| |*host |-| | Host name or dotted-decimal address.  If omitted, or
specified as an asterisk ("*"), defaults to the system's IP host name.

|item| |*port |-| | IP port the service is offered on.  If omitted it defaults to
80 for an |/http:| service, and to 443 for an |/https:| (SSL) service.

|!bullet|

|^ These WASD_CONFIG_SERVICE examples illustrate the directive.

|code|
[[http://alpha.example.com:80]]
[[http://alpha.example.com:8080]]
|!code|

|2Generic Services|

|^ A |/generic| service is one that specifies a scheme and/or port but no
specific host name.  This is useful in a cluster where multiple systems all
provide a basic service (e.g. a port 80 service).  If the host name is omitted
or specified as an asterisk the service substitutes the system's IP host name.

|code|
[[http://*:80]]
[[http://*:8080]]
|!code|

|2SSL Services|

|^ See
|link%|../features/##Transport Layer Security| of
|link%|../features/##|WASD Features and Facilities||.

|^ Multiple virtual SSL services (https:) sharing the same certificate can
essentially be configured against any host name (unique IP address or alias)
and/or port in the same way as standard services (http:).  Services requiring
unique certificates can only be configured for the same port number against
individual and unique IP addresses (i.e. not against aliases).  This is not a
WASD restriction, it applies to all servers for significant SSL technical
reasons.

|^ For example, unique certificates for https://www.company1.com:443/ and
https://www.company2.com:443/ can be configured only if COMPANY1 and COMPANY2
have unique IP addresses.  If COMPANY2 is an alias for COMPANY1 they must share
the same certificate.  During startup service configuration the server checks
for such conditions and issues a warning about "sharing" the service
with the first configured.

|code|
[[https://alpha.example.com]]
[[https://*:443]]
|!code|

|2Administration Services|

|^ When multiple instances are configured Server Administration page access, in
common with all request processing, is automatically shared between those
instances.  There are occasions when consistent access to a single instance is
desirable.  The [ServiceAdmin] directive indicates that the service port number
should be used as a |_base| port and all instances create their own service
with unique port for access to that instance alone. The first instance to
create an |/administration service| uses the specified port, or the next
successive if it's already in use, the next instance will use the next
available port number, and so on.  A high port number should be specified.  The
Server Administration page lists these services for all server instances in the
cluster.  This port configuration is not intended for general  request
activity, although with appropriate mapping and other configuration there is
nothing specifically precluding the use (remembering that the actual port in
use by any particular instance may vary across restarts).  In all other
respects the services can (and should) be  mapped, authorized and otherwise
configured as any other.

|code|
[[https://alpha.example.com]]
[ServiceAdmin]  enabled
|!code|

|2IPv4 and IPv6|

|^ Both IP version 4 and 6 are concurrently supported by WASD.  All networking
functionality, service creation, SSL, proxy HTTP, proxy FTP and RFC1413
authorization is IPv6 enabled.  If system TCP/IP services do not support IPv6
the expected error would be

|code|
%SYSTEM-F-PROTOCOL, network protocol error
|!code|

during any attempted IPv6 service creation.  Of course IPv4 service creation
would continue as usual.

|^ Server configuration handles the standard dotted-decimal addresses of IPv4,
as well as "normal" and "compressed" forms of standard IPv6 literal addresses,
and a (somewhat) standard variation of these that substitutes hyphens for the
colons in these addresses to allow the colon-delimited port component of a
"URL" to be resolved.  Alteratively,  use the de facto standard method of
enclosing the IPv6 address within square brackets, followed by any port
component.

|0IPv6 Literal Addresses|

|table|
|~_ |: Normal|: Compressed
|~
|~ |. 1070:0:0:0:0:800:200C:417B |. 1070::800:200C:417B
|~ |. 0:0:0:0:0:0:13.1.68.3 |. ::13.1.68.3
|~ |.  0:0:0:0:0:FFFF:129.144.52.38 |. ::FFFF:129.144.52.38
|~_ |: hyphen-variants|: 
|~
|~ |. 1070-0-0-0-0-800-200C-417B |. 1070--800-200C-417B
|~ |. 0-0-0-0-0-0-13.1.68.3 |. --13.1.68.3
|~ |. 0-0-0-0-0-FFFF-129.144.52.38 |. --FFFF-129.144.52.38
|!table|

|^ In common with all virtual services, if a connection can be established with
the system and service port the server can respond to that request.  The first
example binds a service to accept IPv4 connections for any address, while the
second the same for IPv6 (and for IPv4 if the interface has IPv4
configuration).

|code|
[[https://alpha.example.com:80]]
[ServiceBind]  0.0.0.0

[[https://alpha6.example.com:80]]
[ServiceBind]  ::0
|!code|

|^ If a service needs to be bound to a specific IP address then that can be
specified  using the [ServiceBind] directive using any of the literal address
formats described above.

|code|
[[http://alpha.example.com:80]]
[ServiceBind]  168.192.0.3

[[https://alpha6.example.com:80]]
[ServiceBind]  fe80::200:f8ff:fe24:1a22

[[https://[fe80::200:f8ff:fe24:1a22]:80]]
|!code|

|0IPv6 Name Resolution||

|^ TCP/IP Services for OpenVMS |/does not| provide an asynchronous name
resolution ACP call for IPv6 as it does for IPv4.  This means that dynamic name
resolution in IPv6 environments is (currently) an issue.  See the server code
module [SRC.HTTPD]TCPIP6.C for further detail and workarounds.  Let's hope this
significant deficiency in VMS' IPv6 support is addressed sooner than later!

|2To www. Or Not To www.|

|^ In the twenty-first century the |/www.| prefix to Web services is largely
redundant.  Generally |/www.host.name| and |/host.name| are treated as
synonymous.  WASD conditionals often need to distinguish precisely on the
service name and in some cases this can mean a service for the |/www.host.name|
and the |/host.name||.

|^ The WASD global configuration directive
|
|code|
# WASD_CONFIG_GLOBAL
[WWWimplied]  enabled
|!code|
|
(by default, and for backward-compatibility reasons, disabled) results in the
server matching a request specifying  a leading |/www.| matching a virtual
service identical |_except| for the |/www.||.  So for the configured service.
|
|code|
[[http://the.host.name]]
|!code|
|
a request to http://the.host.name/ (request header "Host: the.host.name") or to
http://www.the.host.name/ (request header "Host: www.the.host.name") will be
matched to it and allow conditionals, etc., to match to the one
"the.host.name".

|2Service Directives|

|^ Where a service directive has an equivalent configuration directive (e.g.
error report path) the service directive takes precedence.  This allows
specific virtual services to selectively override the generic configuration.

|table&margin-top:-1em;|
|~ |. |0_Service Directives|
|~#* |. [[virtual-service]] |. scheme://host:port
|~ |. [ServiceAdmin] |. an |/instance| Server Administration page service
|~ |. [ServiceBind] |. if different to host's
|~ |. [ServiceBodyTag] |. <BODY> tag for server reports., etc
|~ |. [ServiceClientSSLcert] |. proxy SSL connect client certificate file
|~ |. [ServiceClientSSLkey] |. proxy SSL connect client private key file
|~ |. [ServiceClientSSLcipherList] |. proxy SSL connect ciphers
|~ |. [ServiceClientSSLverifyCA] |. verify CA of proxied requests
|~ |. [ServiceClientSSLverifyCAfile] |. location of proxy CA file
|~ |. [ServiceClientSSLversion] |. proxy SSL version to use
|~ |. [ServiceConnect] |. respond to a connection on a port
|~ |. [ServiceErrorReportPath] |. path to script, SSI or "flat" error document
|~ |. [ServiceHttp2Protocol] |. per-service HTTP/2 disabled
|~ |. [ServiceLogFormat] |. per-service access log format
|~ |. [ServiceNoLog] |. suppress logging
|~ |. [ServiceNonSSLRedirect] |. redirect non-SSL on SSL service
|~ |. [ServiceProxy] |. proxy service
|~ |. [ServiceProxyAffinity] |. make origin server "sticky"
|~ |. [ServiceProxyAuth] |. require proxy authorization
|~ |. [ServiceProxyCache] |. proxy caching
|~ |. [ServiceProxyChain] |. chained proxy service host
|~ |. [ServiceProxyChainCred] |. up-stream proxy service access credentials
|~ |. [ServiceProxySSL] |. provide proxy of SSL (connect:)
|~ |. [ServiceProxyTunnel] |. enable tunneling of octets
|~ |. [ServiceRawSocket] |. enable "RawSocket" scripting
|~ |. [ServiceShareSSH] |. share service with SSH
|~ |. [ServiceSSLcert] |. SSL service certificate
|~ |. [ServiceSSLcipherList] |. list of accepted SSL ciphers
|~ |. [ServiceSSLkey] |. SSL service private key
|~ |. [ServiceSSLoptions] |. SSL options
|~ |. [ServiceSSLsessionLifetime] |. SSL session lifetime
|~ |. [ServiceSSLstrictTransSec] |. HSTS maxiumum age in seconds
|~ |. [ServiceSSLverifyPeer] |. access only using verified peer certificate
|~ |. [ServiceSSLverifyPeerCAfile] |. location of CA file
|~ |. [SSLverifyPeerDataMax] |. maximum kBytes of request data buffered during renegotiation
|~ |. [ServiceSSLverifyPeerDepth] |. depth of certificate chain
|~ |. [ServiceSSLversion] |. SSL version to use
|!table|

|^ Configuration keywords equivalent to many of these WASD_CONFIG_SERVICE
directives but usable against the deprecated WASD_CONFIG_GLOBAL [Service]
directive and the /SERVICE qualifier  are available for backward compatibility. 
See section |/Command Line Parameters| in source file [SRC.HTTPD]SERVICE.C for
a list of these keywords.

|2Directive Detail|

|^ Some of these directives control the behaviour of proxy services.  Other
directive are Secure Sockets Layer (SSL) specific.

|number|

|item| |*.[[virtual-service]]||
|/.(default: |/none||)||

|^ Specifies the scheme, host name (or asterisk) and port of a service.

|item| |*.[ServiceAdmin] |=ENABLED\|DISABLED||||
|/.(default: DISABLED)| 

|^ Marks the port as |/administration| service
(|link|Administration Services||).

|item| |*.[ServiceBind] |/literal address||||
|/.(default: |/none||)| 

|^ If the system has a multi-homed network interface this binds the service to
the specific IP address and not to INADDR_ANY.  Generally this will not be
necessary.  The literal address may be in IPv4 dotted-decimal or IPv6
normal or compressed hexdecimal.

|item| |*.[ServiceBodyTag]  |/string||||
|/.(default: <BODY>)||

|^ Specifies the HTML <BODY> tag for server error and other report pages.  This
allows some measure of site "look-and-feel" in page colour, background, etc. to
be maintained.

|item| |*.[ServiceClientSSL] |=ENABLED\|DISABLED||||
|/.(default: DISABLED)| 

|^ Enables a proxy service to |/originate| HTTP-over-SSL requests.  This is
different to the CONNECT service enabled using [ServiceProxySSL].  It allows
requests to be gatewayed between standard HTTP and Secure Sockets Layer.

|note><|
|0TLS/SSL Configuration|
See
|link%|../features/##Transport Layer Security| of
|link%|../features/##|WASD Features and Facilities||.
|!note|

|item| |*.[ServiceClientSSLcert] |/string||||
|/.(default: none)| 

|^ Location of client certificate file if required to authenticate client
connection.

|item| |*.[ServiceClientSSLcipherList] |/string||||
|/.(default: none)| 

|item| |*.[ServiceClientSSLkey] |/string||||
|/.(default: none)| 

|^ Location of client private key file if required to authenticate client
connection.

|^ A comma-separated list of SSL ciphers to be used by the gateway to connect
to SSL services.  The use of this parameter might allow the selection of
stronger ciphers to be forced to be used or the connection not allowed to
procede.

|note|
These |/ServiceClientSSL..| directives are used to control behaviour when
outgoing SSL connections are established (as with HTTP-to-SSL gatewaying). 
This should not be confused with verification of client certificates, which is
better refered to as peer verification.  See [ServiceSSLverifyPeer] and
[ServiceSSLverifyPeerCAfile] directives.
|!note|

|item| |*.[ServiceClientSSLverifyCA] |=ENABLED\|DISABLED||||
|/.(default: DISABLED)| 

|^ Unless this directive is enabled the Certificate Authority (CA) used to
issue the service's certificate is not verified.  Requires that a CA file be
provided.  See note in [ServiceClientSSLcipherList] above.

|item| |*.[ServiceClientSSLCaFile] |/string||||
|/.(default: none)| 

|^ Specifies the location of the collection of Certificate Authority (CA)
certificates used to verify the connected-to server's certificate (VMS file
specification).  See note in [ServiceClientSSLcipherList] above.

|item| |*.[ServiceClientSSLversion] |/string||||
|/.(default: SSLV2/V3)| 

|^ The abbreviation for the SSL protocol version to be used to connect to the
SSL service.  See note in [ServiceClientSSLcipherList] above.

|item| |*.[ServiceConnect] |/string||||
|/.(default: none)| 

|^ Request-on-connects do not wait for client data but immediately generate a
pseudo request for that service which can be detected and mapped for processing
by the server.

|^ See |link|Service Examples||.

|item| |*.[ServiceErrorReportPath] |/string||||
|/.(default: none)| 

|^ Specifies the |*URL-format path| to an optional, error reporting SSI
document or script (|link|Error Reporting||). This path can subsequently be
remapped during request processing.

|item| |*.[ServiceHttp2Protocol]
|=ENABLED\|DISABLED||||
|/.(default: ENABLED)| 

|^ When HTTP/2 is enabled globally this allows an HTTP/1.|/n||-only
service to be defined.

|^ See
|link%|../features/##HTTP/2| of
|link%|../features/##|WASD Features and Facilities||.

|item| |*.[ServiceLogFormat] |/string||||
|/.(default: none)| 

|^ Per-service access log format.  See |\<REFERENCE>(hd_log_format)||.

|item| |*.[ServiceNoLog] |=ENABLED\|DISABLED||||
|/.(default: DISABLED)| 

|^ When request logging is enabled then by default all services are logged.
This directive allows logging to be suppressed for this service. 

|item| |*.[ServiceNonSSLRedirect] |=[code][host-name\|IP-address][:port]||||
|/.(default: none)| 

|^ The default behaviour when a non-SSL HTTP request is begun on an SSL service
is to return a 400 error and short message.  This directive instead  redirects
the client to the specified non-SSL service.  The parameter can be an optional
scheme (i.e. http:// or https://), optional full host name or IP address with
optional port, or only a colon-delimited port number which will redirect using
the current service name.  A single colon is the minimum parameter and
redirects to port 80 on the current service name. The default redirect code is
307 but this can be changed by providing a leading 301 or 302.

|item| |*.[ServiceProxy] |=ENABLED\|DISABLED||||
|/.(default: DISABLED)| 

|^ Enables and disables proxy request processing for this service.

|item| |*.[ServiceProxyAffinity] |=ENABLED\|DISABLED||||
|/.(default: DISABLED)||

|^ Uses cookies to allow the proxy server to make every effort to relay
successive requests from a given client to the same origin host.  This is also
known as client to origin affinity or proxy affinity capability.

|item| |*.[ServiceProxyAuth] |=|/none||
CHAIN\|LOCAL\|NONE\|PROXY||||
|/.(default: none)| 

|^ Makes a proxy service require authorization before a client is allowed
access via it.
|=CHAIN| allows an up-stream proxy server to request
authorization.
|=LOCAL| enables standard server authorization.
|=NONE| disables authorization (default).
|=PROXY| enables HTTP proxy authorization.
authentication.

|item| |*.[ServiceProxyCache] |=ENABLED\|DISABLED||||
|/.(default: DISABLED)||

|^ Enables and disables proxy caching for a proxy service.

|item| |*.[ServiceProxyChain] |/string||||
|/.(default: none)| 

|^ Specifies the next proxy host if chained.

|item| |*.[ServiceProxyChainCred] |/string||||
|/.(default: none)| 

|^ Credentials for the up-stream proxy server (BASIC authentication only); in
the format |/username:password||.

|item| |*.[ServiceProxyTunnel] |=CONNECT\|FIREWALL\|RAW||||
|/.(default: none)| 

|^ Transfers octets through the proxy server.
|=FIREWALL| accepts a host and port specification before connecting. 
|=CONNECT| is the traditional CONNECT protocol.
|=RAW| connects to a configured host an port. 

|item| |*.[ServiceProxySSL] |=ENABLED\|DISABLED||||
|/.(default: DISABLED)| 

|^ Specifies the service as providing proxying of SSL requests.  This is
sometimes refered as a "CONNECT" service.  This proxies "https:" requests
directly and is different to the HTTP-to-SSL proxying enabled using
[ServiceProxyHttpSSL].

|item| |*.[ServiceRawSocket] |=ENABLED\|DISABLED||||
|/.(default: DISABLED)||

|^ Enable "RawSocket" processing on the service.  See the chapter on
WebSocket scripting in
|link%|../scripting/##WebSocket| in
|link%|../scripting/##|WASD Web Services - Scripting|

|item| |*.[ServiceShareSSH] |/integer||||
|/.(default: 0 (disabled))| 

|^ Non-zero enables service sharing with an SSH server and sets the number of
seconds for input timeout.

|^ See
|link%|../features/##Shared SSH Tunnel| of
|link%|../features/##|WASD Features and Facilities||.

|item| |*.[ServiceSSLcert] |/string||||
|/.(default: none)| 

|^ Specifies the location of the SSL certificates (VMS file specification).

|note><|
|0TLS/SSL Configuration|
See
|link%|../features/##Transport Layer Security| of
|link%|../features/##|WASD Features and Facilities||.
|!note|

|item| |*.[ServiceSSLcipherList] |/string||||
|/.(default: none)| 

|^ A colon-separated list (OpenSSL syntax) of TLS/SSL ciphers allowed to be
used by clients to connect to SSL services. The use of this parameter might
allow the selection of stronger ciphers to be forced to be used or the
connection not allowed to procede. 

|item| |*.[ServiceSSLkey] |/string||||
|/.(default: none)| 

|^ Specifies the location of the SSL private key (VMS file specification).

|item| |*.[ServiceSSLsessionLifetime] |/hh:mm:ss||||
|/.(no default)| 

|^ The default maximum period for session reuse is five minutes.  This is the
per-service equivalent of the global directive [SSLsessionLifetime].

|item| |*.[ServiceSSLstrictTransSec] |/hh:mm:ss||||
|/.(no default)| 

|^ When non-zero represents the number of seconds, or maximum age, of a HSTS
"Strict-Transport-Security:" response header field.
See
|link%|../features/##Transport Layer Security| of
|link%|../features/##|WASD Features and Facilities||.

There is an equivalent global directive.

|item| |*.[ServiceSSLverifyPeer] |=ENABLED\|DISABLED||||
|/.(default: DISABLED)||

|^ To access this service a client must provide a verified CA client
certificate.

|item| |*.[ServiceSSLverifyPeerCAfile] |/string||||
|/.(default: none)| 

|^ Specifies the location of the collection of Certificate Authority (CA)
certificates used to verify a peer certificate (VMS file specification).

|item| |*.[ServiceSSLverifyPeerDataMax] |/integer||||
|/.(default: 1024)||

|^ When a client certificate is requested for authentication via TLS/SSL
renegotiation this is the maximum kilobytes POST/PROPFIND/PUT data buffered
during the renegotiation.  There is an equivalent global directive.

|item| |*.[SSLverifyPeerDepth] |/integer||||
|/.(default: 0)||

|^ Level through a certificate chain a client is verified to.

|item| |*.[ServiceSSLversion] |/string||||
|/.(default: TLS family of protocols)| 

|^ The abbreviation for the TLS/SSL protocol version allowed to be used to
connect to an SSL service.  Using the directive a service may select prefered
protocols.

|!number|

|2Administration|

|^ A service configuration file can be maintained using a simple text editor
and WASD_CONFIG_SERVICE.

|^ Alternatively the Server Administration facility may be used When using this
interface for the first time ensure the WASD_CONFIG_SERVICE logical is
correctly defined.  If the file did not exist at server startup any services
will have been created from the WASD_CONFIG_GLOBAL [Service] directive.  These
will be displayed as the existing services and will be saved to the
configuration file the first time it is saved.  Changes to the service
configuration file require a server restart to put them into effect. 

|^ The [IncludeFile] is a directive common to all WASD configuration, allowing
a separate file to be included as a part of the current configuration
(|link|Include File Directive||).

|^ Not all configuration directives may be shown depending on the type of
service.  For instance, unless a service is configured to provide proxy, only
the [ServiceProxy] directive is displayed.  To fully configure such a service
enable it as proxy, save the file, then reload it.  The additional directives
will now be available.

|^ There is always one empty service displayed each time the configuration
menu is generated.  This information may be changed appropriately and then
saved to add new services to the configuration (of course, these will not be
available until the server is restarted).  To configure multiple new services
add one at a time, saving each and reloading the file to provide a new blank
service.

|2Service Examples|

|number|

|item| The following example shows three services being configured.  The first
is  standard HTTP on the default (and well-known) port 80.  The second is a
proxy service on port 8080.  This service provides both standard HTTP (with
response caching enabled), SSL (connect:) access and proxy authorization
required.  The third service is SSL, with a host-specific certificate and key.

|code|
[[http://alpha.example.com:80]]

[[http://alpha.example.com:8080]]
[ServiceProxy]  enabled
[ServiceProxyAuth]  PROXY
[ServiceProxyCache]  enabled
[ServiceProxySSL]  enabled

[[https://alpha.example.com:443]]
[ServiceSSLcert] WASD_ROOT:[local]alpha.pem
|!code|

|item| This example shows a generic service service being configured on the
well-known port 80.

|code|
[[http://*:80]]
|!code|

If a cluster of four systems, ALPHA, BETA, GAMMA and DELTA all use this
configuration each will have a service accessible via the following four URLs.

|code|
http://alpha.example.com/
http://beta.example.com/
http://gamma.example.com/
http://delta.example.com/
|!code|

|item| The following example show two services configured against specific IP
addresses.  The first is an IPv4 and the second a compressed IPv6.

|code|
[[http://alpha.example.com:80]]
[ServiceBind]  168.192.0.3

[[https://alpha6.example.com:80]]
[ServiceBind]  fe80::200:f8ff:fe24:1a22
|!code|

|item| An |/administration port| is a special configuration used to support the
Server Administration facility when multiple per-node instances are configured
See description above.

|code|
[[https://alpha.example.com:44443]]
[ServiceAdmin]  enabled
[ServiceSSLcert] WASD_ROOT:[local]alpha.pem
[ServiceSSLkey] WASD_ROOT:[local]alpha.pem
|!code|

|item|

|^ A classic [ServiceConnect] use case is to generate a response when a port is
connected to.  In this example, a disabled telnet service.

|code|
# WASD_CONFIG_SERVICE
[[http://*:23]]
[ServiceConnect] enabled
|!code|

|code|
# WASD_CONFIG_MAP
# TELNET port advisory
[[*:23]]
pass * /web/online/port23.txt response=var=crlf
|!code|

|code|
$ TYPE WEB:[ONLINE]PORT23.TXT
************************************************

TELNET terminal access to the.host.name is unavailable!

Please use the instructions available at...
https://the.host.name/online/ssh

************************************************
|!code|

|^ While the above example shows a simple |/pass| to a static file, the mapping
could just as simply been mapped to a script to provide a more dynamic
response.

|code|
# WASD_CONFIG_MAP
# TELNET port advisory
[[*:23]]
map * /cgi-bin/port23
|...|
exec /cgi-bin/* /cgi-bin/*
|!code|

|!number|