宇宙主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

欧基零壹微头条IP归属甄别会员请立即修改密码
查看: 554|回复: 0

咨询宝塔反代wordpress后台无法登录

[复制链接]
发表于 2023-12-3 07:58:28 | 显示全部楼层 |阅读模式
反代vps1宝塔,被反代wordpress 宝塔vps2,我用vps1反代了vps2,wordpress可以正常浏览,但是进入后台就不行,也按照搜索方法设置了vp1的反代规则
  1. #PROXY-START/
  2. location /
  3. {
  4.     #缓存媒体文件
  5.     location ~* .jpg|.png|.gif|.jpeg|.ttf|.webp|.woff|.woff2|.ico$
  6.     {
  7.         proxy_set_header Host $host;
  8.         proxy_set_header X-Real-IP $remote_addr;
  9.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  10.         proxy_set_header REMOTE-HOST $remote_addr;
  11.         proxy_pass https://shopee6.flxzz.com;
  12.         proxy_cache cache_one;
  13.             proxy_cache_valid 30d;
  14.         proxy_ignore_headers Cache-Control;
  15.             add_header X-Cache "$upstream_cache_status from $server_addr";
  16.     }
  17.    
  18.     #缓存css、js、html
  19.      location ~* .css|.js|.html$
  20.     {
  21.         proxy_set_header Host $host;
  22.         proxy_set_header X-Real-IP $remote_addr;
  23.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  24.         proxy_set_header REMOTE-HOST $remote_addr;
  25.         proxy_pass https://shopee6.flxzz.com;
  26.         proxy_cache cache_one;
  27.             proxy_cache_valid 3d;
  28.         proxy_ignore_headers Cache-Control;
  29.             add_header X-Cache "$upstream_cache_status from $server_addr";
  30.     }
  31.    
  32.     proxy_pass https://shopee6.flxzz.com;
  33.     proxy_set_header Host $host;
  34.     proxy_set_header X-Real-IP $remote_addr;
  35.     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  36.     proxy_set_header REMOTE-HOST $remote_addr;
  37.    
  38.     #持久化连接相关配置
  39.     #proxy_connect_timeout 30s;
  40.     #proxy_read_timeout 86400s;
  41.     #proxy_send_timeout 30s;
  42.     #proxy_http_version 1.1;
  43.     #proxy_set_header Upgrade $http_upgrade;
  44.     #proxy_set_header Connection "upgrade";

  45.     #add_header X-Cache $upstream_cache_status;


  46.     #expires 12h;
  47. }
  48. location /wp-admin {
  49. proxy_pass https://shopee6.flxzz.com;
  50. proxy_cache_valid any 0s;
  51. }
  52. #PROXY-END/
复制代码

域名替换了自己的,不让/wp-admin缓存,可是后台还是无法登录,哪里还有问题吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|宇宙主机交流论坛

GMT+8, 2024-10-31 07:23 , Processed in 0.055601 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表