update
This commit is contained in:
parent
8c0e6e29a1
commit
377516ab62
2 changed files with 46 additions and 0 deletions
42
examples/reverse-proxy.nginx.conf
Normal file
42
examples/reverse-proxy.nginx.conf
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
events {}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
include kit/http/websocket-map.conf;
|
||||||
|
|
||||||
|
upstream app_backend {
|
||||||
|
server 127.0.0.1:9000;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
listen 443 ssl;
|
||||||
|
listen [::]:443 ssl;
|
||||||
|
|
||||||
|
http2 on;
|
||||||
|
|
||||||
|
server_name app.example.com;
|
||||||
|
|
||||||
|
include snippets/cert/mydomain.com.conf;
|
||||||
|
include kit/security.conf;
|
||||||
|
include kit/ssl/security.conf;
|
||||||
|
include kit/ssl/hsts.conf;
|
||||||
|
include kit/ssl/force.conf;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
include kit/proxy_pass/forwarded.conf;
|
||||||
|
include kit/proxy_pass/timeout-300.conf;
|
||||||
|
proxy_pass http://app_backend;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /ws/ {
|
||||||
|
include kit/proxy_pass/forwarded.conf;
|
||||||
|
include kit/proxy_pass/websocket.conf;
|
||||||
|
include kit/proxy_pass/timeout-300.conf;
|
||||||
|
proxy_pass http://app_backend;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
4
http/websocket-map.conf
Normal file
4
http/websocket-map.conf
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue