Path: blob/main/xml/en/docs/stream/ngx_stream_pass_module.xml
1 views
<?xml version="1.0"?>12<!--3Copyright (C) Nginx, Inc.4-->56<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">78<module name="Module ngx_stream_pass_module"9link="/en/docs/stream/ngx_stream_pass_module.html"10lang="en"11rev="1">1213<section id="summary">1415<para>16The <literal>ngx_stream_pass_module</literal> module (1.25.5) allows17passing the accepted connection directly to any configured listening socket18in <literal>http</literal>, <literal>stream</literal>, <literal>mail</literal>,19and other similar modules.20</para>2122</section>232425<section id="example" name="Example Configuration">2627<para>28<example>29http {30server {31listen 8000;3233location / {34root html;35}36}37}3839stream {40server {41listen 12345 ssl;4243ssl_certificate domain.crt;44ssl_certificate_key domain.key;4546pass 127.0.0.1:8000;47}48}49</example>50In the example,51after terminating SSL/TLS in the <literal>stream</literal> module52the connection is passed to the <literal>http</literal> module.53</para>5455</section>565758<section id="directives" name="Directives">5960<directive name="pass">61<syntax><value>address</value></syntax>62<default/>63<context>server</context>6465<para>66Sets server address to pass client connection to.67The address can be specified as an IP address68and a port:69<example>70pass 127.0.0.1:12345;71</example>72or as a UNIX-domain socket path:73<example>74pass unix:/tmp/stream.socket;75</example>76</para>7778<para>79The address can also be specified using variables:80<example>81pass $upstream;82</example>83</para>8485</directive>8687</section>8889</module>909192