一、檢查反向: https://doc.crmeb.com/mer/mer2/4249
自己配置 nginx 時(shí), 需保證靜態(tài)資源路徑正確或者能正常轉(zhuǎn)發(fā)到反向代理
1.配置站點(diǎn),點(diǎn)擊項(xiàng)目站點(diǎn)名稱
2.配置反向代理,代理名稱隨意填寫,添加目標(biāo) URL:http://127.0.0.1:8324
注意 這里不能開啟緩存功能
3.配置 ws反向代理,點(diǎn)擊 配置文件
寶塔版本大于等于7.8版本復(fù)制一下內(nèi)容,替換配置文件
#PROXY-START/
location ^~ /
{
proxy_pass http://127.0.0.1:8324;
proxy_http_version 1.1;
proxy_read_timeout 360s;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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 REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
set $static_fileLzXnun8E 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_fileLzXnun8E 1;
expires 12h;
}
if ( $static_fileLzXnun8E = 0 )
{
add_header Cache-Control no-cache;
}
}
#PROXY-END/
寶塔版本小于7.8 復(fù)制以下內(nèi)容,替換配置文件里10-24行并保存
location /
{
proxy_pass http://127.0.0.1:8324;
proxy_http_version 1.1;
proxy_read_timeout 360s;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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 REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
add_header Cache-Control no-cache;
expires 12h;
}
查看寶塔版本
替換后,點(diǎn)擊保存
二、檢查客服域名有沒(méi)有配置: https://doc.crmeb.com/mer/mer2/4269