快速业务通道

Linux Server Project

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-26
ow just using chmod works.
root@FileServe:/usr/local/squid/var# chmod a w logs
root@FileServe:/usr/local/squid/var# cd logs
root@FileServe:/usr/local/squid/var/logs# chmod a w *
root@FileServe:/usr/local/squid/var/logs# cd ../../sbin
root@FileServe:/usr/local/squid/sbin# ./squid -z
2003/12/01 14:53:54| Creating Swap Directories
FATAL: Failed to make swap directory /usr/local/squid/var/cache: (13) Permission denied
Squid Cache (Version 2.5.STABLE4): Terminated abnormally.
root@FileServe:/usr/local/squid/sbin# chmod a w ../var
root@FileServe:/usr/local/squid/sbin# ./squid -z
2003/12/01 15:02:54| Creating Swap Directories
root@FileServe:/usr/local/squid/sbin# ./squid -NCd1
It ran without error, so now it was time to point my browser at it. Port 3180 is the default and . . . dang, access denied. Oops, need to change the squid.conf file. You remembered to update the locate database, right? Just in case, it''s in the etc directory off the squid root. The offending line is quite a way down in the file. Basically I just needed to change the line http_access deny all to http_access allow all Which, I suppose, isn''t the safest setting in the world, but it''s good for testing. And test''s proved good. The browser now updated with only a tiny delay. Now to turn of caching, I don''t need it and it just wastes disk space. I''m using this as a domain filter, not a real proxy. To do this, back to the config file and add no_cache deny all Don''t forget to delete the files already cached. They add up fast. DansGuardian DansGuardian was easy to download and install. I did it before the above, so no script log of my efforts. Aside from the surprise of needing squid, it was completely uneventful. The details I followed are at he top of this. Since VectorLinux is slackware based I couldn''t install the binaries, but that didn''t hurt any. I pointed the browser at port 8080 and everything worked perfectly. I even tried visiting the playboy website and it was blocked. Of course, there was nothing preventing me from just pointing my browser right back at squid and bypassing DansGuardian that way. So I had to block all requests that didn''t come from DansGuardian which, fortunately, was easy. squid -N which halts the process. For inittab, this is correct since it ensures the process will keep rebooting whenever squid crashes. Easy to fix, if I could just get the computer to actually boot. Actually, I still don''t know how I did this, it just happened while I was searching the web for an answer. Maybe it timed out, or maybe one of the keypresses that seemed to have no effect actually just had a delayed one. Either way, a quick session with vi and everything worked.

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号