第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Nginx 反向代理整站與指定目錄問(wèn)題

Nginx 反向代理整站與指定目錄問(wèn)題

慕工程0101907 2019-05-23 19:13:53
現(xiàn)在部署了一個(gè)web,本機(jī)地址是localhost:6666/blogs/user然后利用nginx反代配置如下:upstreammyweb{serverlocalhost:6666;}server{listen80;server_namemyhost.net;indexindex.phpindex.htmlindex.htmdefault.phpdefault.htmdefault.html;root/www/wwwroot/host.net;location/{proxy_passhttp://localhost:6666/blogs/user/;proxy_set_headerHost$host:$server_port;proxy_set_headerX-Real-IP$remote_addr;client_max_body_size10m;}這樣配置后可以訪問(wèn),然而又發(fā)現(xiàn)一個(gè)問(wèn)題是這個(gè)web還有一個(gè)路由是localhost:6666/admin我按照搜出來(lái)的方法又加了一個(gè)配置如下:location^~/admin/{proxy_passhttp://localhost:6666/admin/;proxy_set_headerHost$host:$server_port;proxy_set_headerX-Real-IP$remote_addr;client_max_body_size10m;}但是似乎沒(méi)有用........不知道何解各位還請(qǐng)幫忙看看謝謝!
查看完整描述

2 回答

?
弒天下

TA貢獻(xiàn)1818條經(jīng)驗(yàn) 獲得超8個(gè)贊

使用try_files$uri$uri//;
location/{
proxy_passhttp://localhost:6666;
proxy_set_headerHost$host:$server_port;
proxy_set_headerX-Real-IP$remote_addr;
client_max_body_size10m;
try_files$uri$uri//;
}
                            
查看完整回答
反對(duì) 回復(fù) 2019-05-23
?
烙印99

TA貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超13個(gè)贊

試試去掉后面的proxy_pass后面的/admin/
location^~/admin/{
proxy_passhttp://localhost:6666;
proxy_set_headerHost$host:$server_port;
proxy_set_headerX-Real-IP$remote_addr;
client_max_body_size10m;
}
                            
查看完整回答
反對(duì) 回復(fù) 2019-05-23
  • 2 回答
  • 0 關(guān)注
  • 1829 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)