add reference ssl echo server using websockets and nginx reverse proxy to terminate ssl
This commit is contained in:
36
test/compatibility/python/websockets/nginx.conf
Normal file
36
test/compatibility/python/websockets/nginx.conf
Normal file
@ -0,0 +1,36 @@
|
||||
|
||||
error_log stderr warn;
|
||||
|
||||
daemon off;
|
||||
|
||||
events {
|
||||
worker_connections 32;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
upstream websocket {
|
||||
server localhost:8766;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8765 ssl;
|
||||
|
||||
ssl_certificate trusted-client-crt.pem;
|
||||
ssl_certificate_key trusted-client-key.pem;
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
location / {
|
||||
proxy_pass http://websocket;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user