全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 2368|回复: 10
打印 上一主题 下一主题

[疑问] C大建议在论坛发个····反向代理教程

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-8 21:03:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
·············RT  详细·一点的
2#
发表于 2010-1-8 21:43:20 | 只看该作者

回复 1# 的帖子

这个是zyypp的强项
3#
发表于 2010-1-8 21:44:08 | 只看该作者
楼主可以看看 http://443502.xyz/thread-2903-2-1.html 11楼帖子。
4#
发表于 2010-1-8 21:51:36 | 只看该作者

回复 2# 的帖子

.......
无语了...
C大 你直接把我上会给你发的反省代理 的配置放上来不就得了 ⊙﹏⊙b汗
5#
发表于 2010-1-8 22:25:57 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
6#
发表于 2010-1-8 22:28:36 | 只看该作者

回复 4# 的帖子

额,我贴出nginx.conf

user  www www;

worker_processes 1;

error_log  /web/logs/nginx_error.log  crit;

pid        /web/serv/nginx/nginx.pid;

#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;

events
{
  use epoll;
  worker_connections 51200;
}

http
{
  include       mime.types;
  default_type  application/octet-stream;

  server_names_hash_bucket_size 128;
  client_header_buffer_size 32k;
  large_client_header_buffers 4 32k;
  client_max_body_size 8m;

  sendfile on;
  tcp_nopush     on;
  keepalive_timeout 60;
  tcp_nodelay on;

  fastcgi_connect_timeout 300;
  fastcgi_send_timeout 300;
  fastcgi_read_timeout 300;
  fastcgi_buffer_size 64k;
  fastcgi_buffers 4 64k;
  fastcgi_busy_buffers_size 128k;
  fastcgi_temp_file_write_size 128k;
  fastcgi_intercept_errors on;

  gzip on;
  gzip_min_length  1k;
  gzip_buffers     4 16k;
  gzip_http_version 1.1;
  gzip_comp_level 3;
#  gzip_types       text/plain application/x-javascript text/css application/xml text/javascript;
gzip_types       text/plain application/x-javascript text/css text/xml image/gif image/jpeg application/atom+xml application/rss+x
ml text/vnd.wap.wml text/x-component application/octet-stream application/x-rar-compressed;
  gzip_vary on;


            upstream bbc {
                 server 212.58.253.68:80;
             }


  server
  {
    listen       80;
    server_name  www.qzoner.info qzoner.info;
    if ($host != 'www.qzoner.info' )
    {
      rewrite ^/(.*)$ http://www.qzoner.info/$1 permanent;
    }
    index index.html index.htm index.php;
    root  /web/htdocs/;


#    location / {
#        proxy_pass              http://212.58.253.68/;
#        proxy_redirect          off;
#        proxy_set_header        X-Real-IP       $remote_addr;
#        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
#    }

location / {
             root    /web/htdocs/;
             proxy_redirect off ;
             proxy_set_header Host $host;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header REMOTE-HOST $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             client_max_body_size 50m;
             client_body_buffer_size 256k;
             proxy_connect_timeout 30;
             proxy_send_timeout 30;
             proxy_read_timeout 60;
             proxy_buffer_size 256k;
             proxy_buffers 4 256k;
             proxy_busy_buffers_size 256k;
             proxy_temp_file_write_size 256k;
             proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
             proxy_max_temp_file_size 128m;
             proxy_pass    http://www.bbc.co.uk;
}


    log_format  daigoulogs  '$remote_addr - $remote_user [$time_local] "$request" '
               '$status $body_bytes_sent "$http_referer" '
               '"$http_user_agent" $http_x_forwarded_for';
    access_log  /web/logs/host/host.log  daigoulogs;
  }

  server
  {
    listen  80;
    server_name  status.qzoner.info;

    location / {
    stub_status on;
    log_format  sdaigoulogs  '$remote_addr - $remote_user [$time_local] "$request" '
               '$status $body_bytes_sent "$http_referer" '
               '"$http_user_agent" $http_x_forwarded_for';
    access_log  /web/logs/hostloc/hostloc.log  sdaigoulogs;
    }
  }
}

这样算做了bbc.co.uk的反向代理了吧。
7#
发表于 2010-1-8 22:32:34 | 只看该作者
8#
发表于 2010-1-8 22:41:32 | 只看该作者

回复 7# 的帖子

确实是好东西
9#
发表于 2010-1-9 01:24:44 | 只看该作者
这个太肥流量了,我算是惨了
10#
发表于 2010-1-9 04:41:18 | 只看该作者
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-9-30 17:13 , Processed in 0.062192 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表