user root;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
location / {
root /home/html/www/dist;
index login.html index.html;
}
location ^~ /im_client {
root /home/html/www/dist;
index im_client.html;
try_files $uri $uri/ /im_client.html;
}
location ^~ /vi/css/apiChart { //代理
proxy_pass http://172.****;
rewrite /v1/css/apiChart / break; //代理刪除baseurl
}
location ^~ /v1/ccs {
proxy_pass http://172.*****;
client_max_body_size 100m;
}
location ^~ /p_socket { //socket鏈接的配置
proxy_pass http://172.****;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
server { //多個服務
listen 8888;
location / {
root /home/p_sdk;
index index.html;
}
}
}
nginx 代理配置 多個服務配置 socke配置
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.