全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 2826|回复: 6

[nginx] 求个反代emby的教程

[复制链接]
发表于 2023-3-11 16:25:41 | 显示全部楼层 |阅读模式
是代理公益服的代码 手机上不想每次看一下还要开开梯子。。求大佬分享
发表于 2023-3-11 19:57:44 | 显示全部楼层
  1. client_max_body_size 6000M;
  2. proxy_set_header X-Real-IP $remote_addr;
  3. proxy_set_header X-Forwarded-For '$proxy_add_x_forwarded_for';
  4. proxy_set_header X-Forwarded-Proto $scheme;
  5. proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
  6. proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
  7. proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
  8. proxy_cache off;
  9. proxy_redirect off;
  10. proxy_buffering off;

  11. location / {
  12.     proxy_pass https://xxx.com/;#反代域名
  13.     proxy_set_header X-Forwarded-For $remote_addr;
  14.     proxy_ssl_verify off;
  15.     proxy_http_version 1.1;
  16.     proxy_set_header Host xxx.com;#反代域名
  17.     proxy_set_header Upgrade $http_upgrade;
  18.     proxy_set_header Connection "upgrade";
  19.     proxy_read_timeout 86400;
  20.     }
复制代码
发表于 2023-3-11 16:27:11 | 显示全部楼层
https://www.tofzl.com/index.php/archives/24/
 楼主| 发表于 2023-3-11 16:28:39 | 显示全部楼层
Timbaland 发表于 2023-3-11 16:27
https://www.tofzl.com/index.php/archives/24/

大佬 我试了这个了 会502
发表于 2023-3-11 16:31:15 | 显示全部楼层
proxy_set_header Host $http_host; 后面改成公益服域名就行了吧?
发表于 2023-3-11 16:33:12 来自手机 | 显示全部楼层
caddy也可以
 楼主| 发表于 2023-3-11 16:33:53 | 显示全部楼层
djs 发表于 2023-3-11 16:31
proxy_set_header Host $http_host; 后面改成公益服域名就行了吧?

不知道为啥 访问显示502
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-28 00:04 , Processed in 0.098858 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表