Skip to content

split nginx.tmpl to support stream module #2608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

lloydzhou
Copy link

@lloydzhou lloydzhou commented Apr 10, 2025

split nginx.tmpl to support stream module

nginx.tmpl with env TARGET=streamupstream --> stream.conf.d/10-upstream.conf
nginx.tmpl --> default.conf

then, can include upstream.conf in stream block

#2606

usage

# stream.conf
stream {
    include stream.conf.d/10-upstream.conf;

    server {
        listen     8000;
        #TCP traffic will be forwarded to the specified server
        proxy_pass web1.nginx-proxy.example;
    }
}

docker run --detach \
    --name nginx-proxy \
    --publish 80:80 \
    --publish 8000:8000 \
    --volume /var/run/docker.sock:/tmp/docker.sock:ro \
    --volume ./stream.conf:/etc/nginx/toplevel.conf.d/stream.conf:ro \
    nginxproxy/nginx-proxy

@lloydzhou lloydzhou force-pushed the feature-split-dest-config branch from fa95bcb to 856a582 Compare April 12, 2025 05:52
@lloydzhou lloydzhou marked this pull request as draft April 12, 2025 07:10
@lloydzhou lloydzhou marked this pull request as ready for review April 12, 2025 08:35
@lloydzhou lloydzhou marked this pull request as draft April 12, 2025 08:44
@lloydzhou lloydzhou marked this pull request as ready for review April 12, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy