add s6
This commit is contained in:
parent
b2f2ebb59b
commit
638c025ae2
6 changed files with 59 additions and 4 deletions
40
root/etc/nginx.conf
Normal file
40
root/etc/nginx.conf
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
error_log stderr;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events { }
|
||||
|
||||
stream {
|
||||
map_hash_bucket_size 64;
|
||||
|
||||
map $ssl_preread_server_name $internalport {
|
||||
# redirect all requests, which contain "mq" in the SNI -> MQTT
|
||||
~^.*(mq).*\.eco(vacs|user)\.(net|com)$ 8883;
|
||||
|
||||
# the rest of eco(user|vacs) requests
|
||||
~^.*eco(vacs|user)\.(net|com)$ 443;
|
||||
|
||||
# mapping default to MQTT as the bots are connecting directly to the ip without SNI
|
||||
default 8883;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
ssl_preread on;
|
||||
proxy_pass 127.0.0.1:$internalport;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 5223;
|
||||
proxy_pass 127.0.0.1:5223;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8007;
|
||||
proxy_pass 127.0.0.1:8007;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8883;
|
||||
proxy_pass 127.0.0.1:8883;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue