digitalocean / digitalocean/nginxconfig.io

Allow to add stream entry

Open
#239 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
28.3k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

## Feature request

### Feature description

As we have **Add site** button, it would be nice to have **Add stream** button. File **nginx.conf** will look like:

```nginx
// ...
http {
// ...
include /etc/nginx/sites-enabled/*;
}
stream {
// ...
include /etc/nginx/streams-enabled/*;
}
```

### How the feature is useful

It is really good for reverse proxy. I run all apps as docker containers and some of them are not a http. For example git repository is ssh. Previous I had to expose container port to public `host_port_public:container_port`, with "stream reverse proxy" I can keep my containers not public `127.0.0.1:host_port_local:container_port`.

My **nginx.conf** looks like:

```nginx
// ...
http {
// ...
}
stream {
upstream ssh {
server 127.0.0.1:host_port_local;
}

server {
listen host_port_public;
proxy_pass ssh;
}
}
```

I don't know if there are some general configs for streams like for http (nginxconfig.io/*) or each stream has to have individual settings.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the existing Add site flow and how it produces nginx.conf. Compare that flow with the requested stream and streams-enabled include blocks, and determine which general and per-stream settings the tool should support. Done means the tool can add a stream configuration without breaking existing HTTP site generation and produces valid NGINX configuration for the stated reverse-proxy case.

Written by the indexing model from the issue text.

Assessment

Tech stack
nginx
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.