将 v2rayA 部署于前缀路径中
发表于|更新于
|阅读量:
Nginx
下面例子中将 v2rayA 部署到 http://example.com:8080/v2raya 。注意,例中未包含 TLS 相关配置,建议添加 TLS 相关配置。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| http { map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 8080; server_name example.com; location ^~ /v2raya { proxy_pass http://bla:2017/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade;
proxy_redirect http://bla:2017/ /v2raya/; sub_filter 'href="/' 'href="/v2raya/'; sub_filter 'src="/' 'src="/v2raya/'; sub_filter_once off; } } }
|