公司的网络真是不给力啊,惆怅啊我就在内网服务器搭建了个正向代理 上网测试下可以不。
nginx配置如下:
worker_processes 4;
error_log logs/error.log crit;
worker_rlimit_nofile 51200;
events {
worker_connections 51200;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
access_log off;
client_header_buffer_size 32k;
large_client_header_buffers 4 128k;
location / {
proxy_buffering on;
proxy_buffer_size 32k;
proxy_buffers 8 64k;
proxy_busy_buffers_size 128k;
resolver 192.168.0.222;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $host;
proxy_set_header X-Forwarded-For $host;
proxy_pass http://$host$request_uri;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /data1/logs/proxyaccess.log combined;
#//注意目录必须给守护nginx进程的用户;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
https网站不好用。。。
本文转自 houzaicunsky 51CTO博客,原文链接:http://blog.51cto.com/hzcsky/475586