2015-10-16 189 views
2

我在本地運行Squid,我想通過Squid在localhost:3000上運行的Ruby服務器訪問。允許從本地主機通過Squid訪問本地主機

如果我嘗試存取權限本地主機:3000我得到這個消息:

The following error was encountered while trying to retrieve the URL: 
http://localhost:3000/ 

Access Denied. 

Access control configuration prevents your request from being allowed 
at this time. 

我如何配置Squid允許從localhost localhost數據庫? 從來就更新從該行拒絕允許:http_access allow to_localhost

回答

0

轉到: SquidMan>首選項>模板 和評論這些行:

#Deny requests to certain unsafe ports 
#http_access deny !Safe_ports 

#Deny CONNECT to other than secure SSL ports 
#http_access deny CONNECT !SSL_ports 

或者你可以在白名單下面的ACL端口列表此端口這些線。

如果這無助於確保您在網絡>高級>代理中正確添加旁路代理(localhost或127.0.0.1)。

在我的情況下,這個旁路代理在每2-3分鐘後消失。 (我不知道如何解決它)

1

也許不是最性感的解決方案,但我解決它通過 建立Ngrok tunell $ ./ngrok http 3128

現在我可以通過identifier.ngrok.com訪問魷魚

0

必須爲本地主機或127.0.0.0/8添加異常以直接連接而不使用代理。例如在Firefox中:首選項 - >高級 - >網絡 - >設置 - >無代理。

或使用envirometn變量no_proxy

export no_proxy=localhost,127.0.0.0/8 

我的系統範圍設置爲/etc/environment

http_proxy=http://172.16.0.253:3128/ 
https_proxy=http://172.16.0.253:3128/ 
no_proxy=localhost,127.0.0.0/8