【HestiaCP面板系列】HestiaCP 反向代理其他网站设置

简单介绍一下反向代理如何设置

本博客用什么VPS?创作不易,欢迎请咕咕喝杯咖啡☕☕☕

面板介绍:【服务器面板】自带邮件服务!宝塔面板替代品——HestiaCP 面板 保姆级教程 海外开源面板 颜值不错

视频

YouTube:https://youtu.be/EbklLLRO7FE

哔哩哔哩:https://www.bilibili.com/BV1tv4y1g7vw

反向代理

cd /home/gugu/conf/web/halo2.gugu.ge

vim nginx.ssl.conf

image-20220618122725389
image-20220618122823974

location / {
  proxy_pass http://144.202.92.52:8090/;
  rewrite ^/(.*)$ /$1 break;
  proxy_redirect off;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Upgrade-Insecure-Requests 1;
  proxy_set_header X-Forwarded-Proto https;
}
nginx -s reload

image-20220618123012227

解决办法:

编辑vim /etc/nginx/nginx.conf,在http里面增加

proxy_headers_hash_max_size 51200;
proxy_headers_hash_bucket_size 6400;
nginx -s reload

image-20220618123331437

---------------
如何觉得文章内容不错,欢迎点击一下广告,支持一下咕咕😍😍😍

原创文章,作者:Roy,如若转载,请注明出处:https://iwanlab.com/hestiacp-reverse-proxy/

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
Roy的头像Roy
上一篇 2023年6月15日 下午7:24
下一篇 2023年6月19日 上午11:21

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注