打包外网环境
This commit is contained in:
@@ -33,37 +33,76 @@ http {
|
||||
gzip_vary on;
|
||||
gzip_disable "MSIE [1-6].";
|
||||
|
||||
server {
|
||||
listen 20081;
|
||||
server_name localhost;
|
||||
|
||||
location ^~/znzq {
|
||||
proxy_pass http://127.0.0.1:8080/znzq;
|
||||
proxy_set_header Host 127.0.0.1;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
location /znzq/websocket {
|
||||
proxy_pass http://127.0.0.1:8080/znzq/websocket;
|
||||
proxy_http_version 1.1;
|
||||
proxy_connect_timeout 3600s;
|
||||
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html/;
|
||||
index index.html index.htm;
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^(.*)$ /index.html?s=$1last;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
server
|
||||
{
|
||||
listen 80;
|
||||
listen 443 ssl http2;
|
||||
server_name localhost;
|
||||
ssl_certificate /usr/share/nginx/html/cert.pem;
|
||||
ssl_certificate_key /usr/share/nginx/html/key.pem;
|
||||
|
||||
|
||||
|
||||
|
||||
location /uniapp_im/ {
|
||||
alias /usr/share/nginx/html/im-uniapp/dist/;
|
||||
}
|
||||
|
||||
location /hd-glasses-app/ {
|
||||
alias /usr/share/nginx/html/hd-glasses-app/dist/;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# For SRS homepage, console and players
|
||||
# http://r.ossrs.net/console/
|
||||
# http://r.ossrs.net/players/
|
||||
location ~ ^/(console|players)/ {
|
||||
proxy_pass http://127.0.0.1:8080/$request_uri;
|
||||
}
|
||||
|
||||
# For SRS streaming, for example:
|
||||
# http://r.ossrs.net/live/livestream.flv
|
||||
# http://r.ossrs.net/live/livestream.m3u8
|
||||
location ~ ^/.+/.*\.(flv|m3u8|ts|aac|mp3)$ {
|
||||
proxy_pass http://127.0.0.1:8080$request_uri;
|
||||
}
|
||||
# For SRS backend API for console.
|
||||
# For SRS WebRTC publish/play API.
|
||||
location ~ ^/(api|rtc)/ {
|
||||
proxy_pass http://127.0.0.1:1985$request_uri;
|
||||
}
|
||||
|
||||
|
||||
# For SRS streaming, for example:
|
||||
# http://r.ossrs.net/live/livestream.flv
|
||||
# http://r.ossrs.net/live/livestream.m3u8
|
||||
location ~ /.+/.*\.(flv|m3u8|ts|aac|mp3)$ {
|
||||
proxy_pass http://127.0.0.1:8080$request_uri;
|
||||
}
|
||||
|
||||
location /demos/ {
|
||||
proxy_pass http://127.0.0.1:1989/demos/;
|
||||
}
|
||||
|
||||
location /sig/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_pass http://127.0.0.1:1989/sig/;
|
||||
}
|
||||
|
||||
access_log /home/wwwlogs/srslog;
|
||||
}
|
||||
|
||||
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user