可以做网站的服务器,如何做网站链接分析,浙江荣盛建设集团网站,品牌包装建设网站1.找到宝塔的nginx配置文件
宝塔有一点不同#xff0c;nginx配置文件不在nginx的安装目录中#xff0c;应当去/www/server/panel/vhost/nginx找到
2.添加你要跨域的地址 location /api {proxy_pass http://localhost:8080;proxy_set_header Host $host;proxy_set_header X-…1.找到宝塔的nginx配置文件
宝塔有一点不同nginx配置文件不在nginx的安装目录中应当去/www/server/panel/vhost/nginx找到
2.添加你要跨域的地址 location /api {proxy_pass http://localhost:8080;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 X-Forwarded-Proto $scheme;rewrite ^/api/(.*)$ /$1 break;
}