Tag Archives: 反向代理

用apache做反向代理实例

用apahce也可以实现web的反向代理,以给ghs.google.com做反向为例,apache的写法: VirtualHost *:80> ServerName isme.com.ru ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPreserveHost on ProxyPass / http://ghs.google.com/ ProxyPassReverse / http://ghs.google.com/ </VirtualHost> <VirtualHost 173.212.195.x:80> ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPreserveHost on ProxyPass / … Continue reading

Posted in Apache, 随笔 | Tagged , | Leave a comment

nginx的web反向代理配置

下面是Nginx的web反向代理的配置。 以下是保守配置,大部分情况下可以将值加大,比如在http段里添加: server_names_hash_bucket_size 256; client_header_buffer_size 256k; large_client_header_buffers 4 256k; 以减少502出现的情况等。 worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 0; access_log off; #gzip on; limit_zone one $binary_remote_addr 10m; server { listen 80 default; … Continue reading

Posted in Nginx | Tagged , , | Leave a comment