Pass#
Allows passing the accepted connection directly to any configured listening socket in HTTP, Stream, or Mail modules.
Configuration Example#
After the stream
module handles the SSL/TLS termination,
it forwards the connection to the http
module:
http {
server {
listen 8000;
location / {
root html;
}
}
}
stream {
server {
listen 12345 ssl;
ssl_certificate domain.crt;
ssl_certificate_key domain.key;
pass 127.0.0.1:8000;
}
}
Directives#
pass#
This directive sets the server address to which the client connection should be passed. The address can be given as an IP address and port:
pass 127.0.0.1:12345;
Or as a path to a UNIX domain socket:
pass unix:/tmp/stream.socket;
Also, the address can be set with variables:
pass $upstream;