给1panel的反代整不会了

想要反代始皇的https://new.oaifree.com
但是我的1panel就是怎么设置都不成功

求大佬帮忙把把脉,看看该咋修改~

location ^~ / {
    proxy_pass http://new.oaifree.com; 
    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 REMOTE-HOST $remote_addr; 
    proxy_set_header Upgrade $http_upgrade; 
    proxy_set_header Connection "upgrade"; 
    proxy_set_header X-Forwarded-Proto $scheme; 
    proxy_http_version 1.1; 
    add_header X-Cache $upstream_cache_status; 
}
2 个赞

proxy_ssl_server_name on;

1 个赞

我在宝塔只弄了这些

我的皇,是这样修改嘛?

location ^~ / {
    proxy_pass http://new.oaifree.com; 
    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 REMOTE-HOST $remote_addr; 
    proxy_set_header Upgrade $http_upgrade; 
    proxy_set_header Connection "upgrade"; 
    proxy_set_header X-Forwarded-Proto $scheme; 
    proxy_http_version 1.1; 
    add_header X-Cache $upstream_cache_status; 
    proxy_ssl_server_name on;
}

这样设置出来这个报错 :melting_face:

421 Misdirected Request

location /

Connection Upgrade 不要,没有websocket

2 个赞

这个简单

2 个赞

bingbing佬好强

:tieba_091:感谢大帅哥称赞

为啥我只设置了这个,一直在加载没反应呢

进不去网页,还是加载不出来UI

啥也没,一会就504超时了

啊这 :smiling_face_with_tear:不应该啊

From 快问快答 to 开发调优