[英]Trying to setup nginx as a reverse proxy for facebook, but getting facebook error
my fathers job requires him to use a VPN to access anything work related (emails, websites, etc) outside his office, and the VPN blocks facebook, currently whenever he wants to use facebook, he has to log off the VPN first. 我父亲的工作要求他使用VPN来访问办公室外与工作相关的任何内容(电子邮件,网站等),并且VPN阻止了facebook,目前,每当他要使用facebook时,都必须先注销VPN。 He asked me if I could set up something to try and get around that, so I am attempting to setup NGINX on Debian 9 to act as a reverse proxy, however I have very little experience with NGINX. 他问我是否可以设置一些方法来解决该问题,所以我试图在Debian 9上设置NGINX以充当反向代理,但是我对NGINX的经验很少。 I have found that if I include proxy_set_header Host $host;
我发现如果包含proxy_set_header Host $host;
then I can get to facebook but see "Sorry, something went wrong. We're working on getting this fixed as soon as we can." 然后我可以去facebook,但是看到“对不起,出了点问题。我们正在努力尽快修复此问题。” But if I don't include it the VPN still blocks facebook. 但是,如果我不包括它,VPN仍然会阻止facebook。 Any advice? 有什么建议吗?
You're not going to be able to reverse proxy Facebook, for a few reasons: 由于以下几个原因,您将无法反向代理Facebook:
facebook.com
isn't going to load from an alternative hostname, such as kyles-facebook-proxy-clone.com
. facebook.com
不会从备用主机名(例如kyles-facebook-proxy-clone.com
。 The browser sends a request header, Host
. 浏览器发送请求标头Host
。 Facebook's servers won't serve for a hostname that they aren't expecting. Facebook的服务器不会提供他们所期望的主机名。 facebook.com
without having a properly signed certificate for HTTPS. 没有HTTPS正确签名的证书,就无法为facebook.com
提供流量。 HTTPS is required for facebook.com
due to HSTS . 由于HSTS , facebook.com
需要HTTPS。 What can you do? 你能做什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.