VPS侦探论坛

 找回密码
 注册
查看: 3279|回复: 0

军哥请教问题:跨域反向代理问题,用户登录的时候直接跳转后端了,怎么解决

[复制链接]
发表于 2017-8-10 02:01:55 | 显示全部楼层 |阅读模式

如题前端地址:https://www.tgcoe.com  后端:http://zx.aoirs.com:7777
登陆页面https://www.tgcoe.com/wp-login.php  点击登陆,登陆成功但是地址变成http://zx.aoirs.com:7777/wp-admin/,请问军哥怎么让它不跳出前端域名
----------------------------------------------------------------------------------------------------

server {
listen 80;
server_name tgcoe.com;
return 301 https://www.tgcoe.com$request_uri;
}
server
    {
        listen 443 ssl http2;
        #listen [::]:443 ssl http2;
        server_name www.tgcoe.com tgcoe.com;
        #index index.html index.htm index.php default.html default.htm default.php;
        #root  /home/wwwroot/www.tgcoe.com;
        ssl on;
        ssl_certificate /etc/letsencrypt/live/www.tgcoe.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/www.tgcoe.com/privkey.pem;
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_ciphers "xxxx";
        ssl_session_cache builtin:1000 shared:SSL:10m;
        # openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
        ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;

        #include wordpress.conf;
        #error_page   404   /404.html;

        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

        #include enable-php.conf;

location / {
           proxy_pass http://zx.aoirs.com:7777;
           proxy_redirect off;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

        access_log  /home/wwwlogs/www.tgcoe.com.log;
    }
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-14 08:53 , Processed in 0.024836 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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