forked from supermy/mytools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,4 +155,6 @@ http { | |
# } | ||
#} | ||
|
||
} | ||
} | ||
|
||
include /usr/local/openresty/nginx/conf/stream.conf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
stream { | ||
upstream backend { | ||
hash $remote_addr consistent; | ||
|
||
#server backend1.example.com:12345 weight=5; | ||
server mq:5672 max_fails=3 fail_timeout=30s; | ||
server unix:/tmp/backend3; | ||
} | ||
|
||
#upstream dns { | ||
# server 192.168.0.1:53535; | ||
# server dns.example.com:53; | ||
#} | ||
|
||
server { | ||
listen 5672; | ||
proxy_connect_timeout 1s; | ||
proxy_timeout 3s; | ||
proxy_pass backend; | ||
} | ||
|
||
#server { | ||
# listen 127.0.0.1:53 udp; | ||
# proxy_responses 1; | ||
# proxy_timeout 20s; | ||
# proxy_pass dns; | ||
#} | ||
|
||
server { | ||
listen [::1]:12345; | ||
proxy_pass unix:/tmp/stream.socket; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters