• windows 配置squid反向代理服务器


    发现Window版本的Squid 和 Linux 配置有点不一样


    一、配置squid\etc目录
    1.squid.conf.default 拷贝一份重新命名为squid.conf
    2.cachemgr.conf.default拷贝一份重新命名为cachemgr.conf
    3.mime.conf.default拷贝一份重新命名为mime.conf

    二、编辑squid.conf 文件:
    1.http_port 80 vhost #访问的端口
    2.cache_peer 192.168.1.3 parent 80 0 no-query originserver #需要编辑的站点IP及端口
    3.visible_hostname stangray #在Headers 中显示的主机名
    4.http_access allow all

    三、服务加载
    程序位置:squid\sbin\
    1.squid -i -n stangray_squid  #命名squid服务的新名称
    2.squid -i  #将squid服务加入到服务里面
     squid -r -n stangray_squid  #删除指定名称的服务
    3.squid -z  #创建缓存目录
     squid -k parse  #检测配置是否有效
    4.net start stangray_squid #启动
     net stop stangray_squid #关闭
     squid -dx #当服务不能启动时,进行调试


    四、测试squid服务器:
    http://(你的squid服务器IP地址)
    实际指向http://192.168.1.3:80(web服务器地址)

    五、常见问题
    1.Error:Invalid Request
      添加:http_access allow all
     
    2.The requested URL could not be retrieved
      添加:always_direct allow all

  • 相关阅读:
    Comet学习资料
    vue 组件使用中的细节点
    js基本数据类型 BigInt 和 Number 的区别
    vue v-model 简单使用
    promise总结
    axio post 请求后端接收不到参数的解决办法
    快速配置webpack多入口脚手架
    BETA 版冲刺前准备
    Alpha 事后诸葛亮(团队)
    Alpha 答辩总结
  • 原文地址:https://www.cnblogs.com/stangray/p/1908819.html
Copyright © 2020-2023  润新知