军哥请教问题:跨域反向代理问题,用户登录的时候直接跳转后端了,怎么解决
如题前端地址: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;
}
页:
[1]