windows下簡單配置squid反向 Proxy伺服器

來源:互聯網
上載者:User
下載windwosNT版本的squid:

http://squid.acmeconsulting.it/download/squid-2.6.STABLE13-bin.zip

1.把squid-2.6.STABLE13-bin.zip解壓縮,把裡面的squid檔案夾拷到c:\下(squid預設的是c:\squid)
2.squid\etc目錄下把

squid.conf.default拷貝一份重新命名為squid.conf

cachemgr.conf.default拷貝一份重新命名為cachemgr.conf

mime.conf.default拷貝一份重新命名為mime.conf

3.用文字編輯器開啟squid.conf,需要修改的地方:

找到http_port 3128在後面增加一行

http_port 80 transparent

找到#cache_peer sib2.foo.net sibling 3128 3130 [proxy-only]在後面增加一行

cache_peer 192.168.1.8 parent 7001 0 no-query originserver

找到# TAG: visible_hostname在後面增加一行

visible_hostname volcano(任意命名)

找到http_access deny all在其前面加#將這一行注釋掉,然後增加一行

http_access allow all

4.從命令列到c:\squid\sbin目錄下執行

squid -i(將squid服務加入到服務裡面)

squid -z

安裝完成

5.從服務裡啟動squid

訪問squid伺服器:

http://192.168.1.2(你的squid伺服器IP地址)>>>指向http://192.168.1.8:7001(web伺服器位址)

如果把#http_access deny all開啟把http_access allow all注釋掉,你的訪問就會被拒絕

你需要配置一下:找到下面兩行

#acl our_networks src 192.168.1.0/24 192.168.2.0/24
#http_access allow our_networks

開啟注釋,修改你的內網ip(段)可以設為192.168.1.0/24一個也可以如上面的一樣設一段IP

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.