鍍金池/ 問(wèn)答/Linux  網(wǎng)絡(luò)安全/ nginx proxy_pass Access Denied

nginx proxy_pass Access Denied

nginx 代理配置如下

server
    {
        listen 80;
        #listen [::]:443 ssl http2;
        server_name nike.tao.cn ;

        location / {
                proxy_pass https://www.nike.com/;
         }
        access_log  /home/wwwlogs/nike.tao.cn.log;
    }

結(jié)果顯示 如下

Access Denied
You don't have permission to access "http://www.nike.com" on this server.
Reference #18.270ae07a.1516012262.10e6c714

有大佬知道 這個(gè)是什么原因嗎? 求大佬指點(diǎn)一二。

回答
編輯回答
孤慣

你的上游服務(wù)器呢???

2017年7月2日 04:52
編輯回答
女流氓

剛開(kāi)始看錯(cuò)你的問(wèn)題了..

我加上proxy_set_header X-real-ip $remote_addr;這句能了訪問(wèn),但它直接就跳到真實(shí)頁(yè)面了。而不加這句又說(shuō)你的服務(wù)器無(wú)權(quán)限,這應(yīng)該是nike官網(wǎng)有某種反偷站的技術(shù)吧。。

clipboard.png

再看nike首頁(yè)的a標(biāo)簽,所有路徑都是以它的域名開(kāi)頭的絕對(duì)路徑,所以即使你能代理到它的一個(gè)頁(yè)面,其余的頁(yè)面還是會(huì)跳轉(zhuǎn)到它的真實(shí)頁(yè)面的..

2018年2月16日 21:29