powerman

powerman

V2EX 第 544685 号会员,加入于 2021-05-07 17:13:45 +08:00
根据 powerman 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
powerman 最近回复了
2024-08-09 09:55:41 +08:00
回复了 powerman 创建的主题 Node.js 有偿求助: nginx 域名隐性(地址栏域名不变)跳转
@dallaslu 感谢,我试了一下真的可以隐性跳转了。就是出其他 bug 了😭
2024-08-08 21:05:42 +08:00
回复了 powerman 创建的主题 Node.js 有偿求助: nginx 域名隐性(地址栏域名不变)跳转
@buffzty 不太理解,我这个 tom 是动态的,单一的反代好像搞不了
2024-08-08 20:32:40 +08:00
回复了 powerman 创建的主题 Node.js 有偿求助: nginx 域名隐性(地址栏域名不变)跳转
@buffzty

现在是这样配置的 nginx

server {
listen 80;
server_name *.mirror.com;

location / {
proxy_pass http://localhost/:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
2024-08-08 20:21:43 +08:00
回复了 powerman 创建的主题 Node.js 有偿求助: nginx 域名隐性(地址栏域名不变)跳转
@buffzty

正经小工具。

[需求补充如下]

我的网站有点类似镜像站 mirror.com
源站是 example.com

当用户访问 tom.mirror.com ,我用 js 去查询 API:比如 tom.mirror 返回的值是 uid1 ,那对应的源站的二级目录是 example.com/uid1
现在需要实现的功能是 用户访问二级域名 tom.mirror.com ,实际指向 example.com/uid1 ,但浏览器地址栏仍然显示 tom.mirror.com

tom 和 uid 这些都是会变的,不知道这样讲能理解吗

(特别感谢 V 友 @Jianrry 帮我总结上述需求)
2024-08-08 20:08:16 +08:00
回复了 powerman 创建的主题 Node.js 有偿求助: nginx 域名隐性(地址栏域名不变)跳转
@buffzty 方便留个联系方式吗或者 gmail
2024-08-08 19:37:14 +08:00
回复了 powerman 创建的主题 Node.js 有偿求助: nginx 域名隐性(地址栏域名不变)跳转
可是我的需求反代的域名和目录都是不固定的,能做吗。
2024-08-08 17:39:44 +08:00
回复了 powerman 创建的主题 Node.js 有偿求助: nginx 域名隐性(地址栏域名不变)跳转
@zhangjiashu2023 你好已发
2024-08-08 15:52:58 +08:00
回复了 powerman 创建的主题 Node.js 有偿求助: nginx 域名隐性(地址栏域名不变)跳转
@Jianrry 已加
2024-08-08 13:12:51 +08:00
回复了 powerman 创建的主题 Node.js 有偿求助: nginx 域名隐性(地址栏域名不变)跳转
@sead 方便留个 gmail 联系吗
2024-08-08 12:59:44 +08:00
回复了 powerman 创建的主题 Node.js 有偿求助: nginx 域名隐性(地址栏域名不变)跳转
@Jianrry 你好麻烦看一下 gmail
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1336 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 00:00 · PVG 08:00 · LAX 17:00 · JFK 20:00
♥ Do have faith in what you're doing.