2015-10-16 188 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