好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > nginx 反向代理之 proxy_pass的實現

nginx 反向代理之 proxy_pass的實現

熱門標簽:智能電銷機器人真的有用么 撫州市城區地圖標注 中國地圖標注上各個省 激光標記地圖標注 高德地圖標注足跡怎么打標 企業辦理400電話收費標準 電銷智能機器人試用 新鄉牧野400電話申請 百度地圖底圖標注

格式很簡單: proxy_pass URL;

其中URL包含:傳輸協議(http://, https://等)、主機名(域名或者IP:PORT)、uri。

示例如下:

proxy_pass http://www.xxx.com/;
proxy_pass http://192.168.200.101:8080/uri;
proxy_pass unix:/tmp/www.sock;

對于proxy_pass的配置有幾種情況需要注意:

假設server_name為www.xxx.com

當請求http://www.xxx.com/aming/a.html的時候,以上示例分別訪問的結果是

示例1:

location /aming/
{
  proxy_pass http://192.168.1.10;
  ...
}

結果1:http://192.168.1.10/aming/a.html

示例2:

location /aming/
{
  proxy_pass http://192.168.1.10/;
  ...
}

結果2:http://192.168.1.10/a.html

示例3:

location /aming/
{
  proxy_pass http://192.168.1.10/linux/;
  ...
}

結果3:http://192.168.1.10/linux/a.html

示例4:

location /aming/
{
  proxy_pass http://192.168.1.10/linux;
  ...
}

結果4:http://192.168.1.10/linuxa.html

總結:

為了方便記憶和規范配置,建議所有的 proxy_pass 后的url都以“/”結尾。

proxy_pass http://192.168.1.10/linux/;

到此這篇關于nginx 反向代理之 proxy_pass的實現的文章就介紹到這了,更多相關nginx 反向代理 proxy_pass內容請搜索腳本之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持腳本之家!

標簽:忻州 延安 辛集 西安 海西 邯鄲 南通 臨汾

巨人網絡通訊聲明:本文標題《nginx 反向代理之 proxy_pass的實現》,本文關鍵詞  nginx,反向,代理,之,proxy,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《nginx 反向代理之 proxy_pass的實現》相關的同類信息!
  • 本頁收集關于nginx 反向代理之 proxy_pass的實現的相關信息資訊供網民參考!
  • 推薦文章