nginx FritzBox Web 界面反向代理
以下 nginx 配置允许通过 VPN 等远程访问本地 FritzBox。你需要在代理请求中显式将 Host 头设置为 fritz.box - 否则,FritzBox 将作为其重绑定保护的一部分拒绝请求。
nginx_fritzbox_proxy.conf
server {
listen 80 default_server;
access_log off;
error_log off;
location / {
proxy_pass http://192.168.241.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host 'fritz.box';
}
}在大多数 Linux 发行版(如 Debian 或 Ubuntu)上,使用 sudo apt -y install nginx 或类似命令安装 nginx,并将我们的配置文件放置为 /etc/nginx/sites-enabled/default。
Check out similar posts by category:
Networking, Nginx
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow