我的squid和nginx配置文件

By | 2010年3月8日

squid的

cache_effective_user www-data
cache_effective_group www-data
http_port 127.0.0.1:88 accel vhost vport
cache_peer 60.28.216.8 parent 80 0 no-query originserver forceddomain=www.iciba.com name=webServer1
cache_peer_domain webServer1 iciba.local
acl localhost src 127.0.0.1/255.255.255.255
http_access allow localhost
http_access deny all
cache_mgr luochong@kingsoft.com
cache_dir ufs /data/squid 1000 16 256
cache_mem 128 MB
maximum_object_size_in_memory 512 KB
max_open_disk_fds 0 KB
minimum_object_size 0 KB
maximum_object_size 4096 KB
cache_swap_low 90
cache_swap_high 95
cache_access_log /data/logs/squid/access.log
cache_log /data/logs/squid/cache.log
cache_store_log /data/logs/squid/store.log
visible_hostname No1.proxy
refresh_pattern -i . 1440 50% 2880 ignore-reload

与之配合的nginx的

upstream  iciba_local  {
  ip_hash;
  server   127.0.0.1:88;
}

server {
        listen   80;
        server_name  iciba.local;

        #access_log  /var/log/nginx/localhost.access.log;

        location / {
                proxy_pass http://iciba_local;
                proxy_redirect     off;
                proxy_set_header   Host             $host:80;
                proxy_set_header   X-Real-IP        $remote_addr;
                proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        }
}

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据