Pass#
Allows passing the accepted connection directly to any configured listening
socket in HTTP, Stream, or
Mail modules. After the 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: Or as a path to a UNIX domain socket: Also, the address can be set with variables:Configuration Example#
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#
pass 127.0.0.1:12345;
pass unix:/tmp/stream.socket;
pass $upstream;