1.将原来的 location / {}
复制一份,粘贴到下面;
2.在原来的 location 块中加入一行:
proxy_redirect https://MisakaF视频推流地址/ https://你服务器的地址/;
3.在复制的 location 块中,将 location /
改成 location /p/
,将 proxy_pass 的目标地址改成 视频推流地址 /p/。
map $http_upgrade $connection_upgrade {
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# | |
# DUAL LICENSED: You are free to choose either or both of below licenses: | |
# | |
# 1. | |
# | |
# Published by zhuyifei1999 (https://wikitech.wikimedia.org/wiki/User:Zhuyifei1999) | |
# under the terms of Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) | |
# https://creativecommons.org/licenses/by-sa/3.0/ |