找到配置文件及修改方法※
打开宝塔面板,选择网站:

对应的网站选择设置:

选择反向代理后,点击配置文件:

将以下第二段内容粘贴到此处后保存:

配置详情※
nginx配置:
#PROXY-START/
location = / {
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;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:8080/share/Index;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
set $static_filesckcTEbZ 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_filesckcTEbZ 1;
expires 1m;
}
if ( $static_filesckcTEbZ = 0 )
{
add_header Cache-Control no-cache;
}
}
location / {
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;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:8080/share/;
}