更新 Others/根据gpu使用率调度/openresty配置.md
This commit is contained in:
parent
db19836f35
commit
7113d0fe14
1 changed files with 28 additions and 0 deletions
|
@ -1,2 +1,30 @@
|
|||
```txt
|
||||
upstream danceaiStream {
|
||||
server 106.12.210.129:30963;
|
||||
}
|
||||
|
||||
# resolver 8.8.8.8;
|
||||
lua_package_path '/usr/local/openresty/lualib/lb/?.lua;;';
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name 1.94.8.122;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Connection "";
|
||||
proxy_http_version 1.1;
|
||||
|
||||
set $backend '';
|
||||
|
||||
rewrite_by_lua_file /usr/local/openresty/lualib/lb/lb.lua;
|
||||
content_by_lua_block {
|
||||
ngx.log(ngx.INFO, "backend ", $backend)
|
||||
}
|
||||
proxy_pass http://$backend;
|
||||
}
|
||||
}
|
||||
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue