http
{
include mime.types;
default_type application/octet-stream;
gzip on;
gzip_min_length 1000;
gzip_buffers 4 8k;
gzip_http_version 1.1;
gzip_types text/plain application/x-javascript text/css application/xml;
keepalive_timeout 120;
tcp_nodelay on;
upstream web_jn {
server wan_ip:80;
}
server
{
listen 80;
server_name 10.29.240.155; (这里定义的是本地访问的IP)
location / {
proxy_pass http://web_jn;
proxy_set_header Host hello.sina.com; (指定一个host的值,不然访问10.29.240.155时,会引用 其本机的host)
proxy_set_header X-Forwarded-Host $host;
}
{
include mime.types;
default_type application/octet-stream;
gzip on;
gzip_min_length 1000;
gzip_buffers 4 8k;
gzip_http_version 1.1;
gzip_types text/plain application/x-javascript text/css application/xml;
keepalive_timeout 120;
tcp_nodelay on;
upstream web_jn {
server wan_ip:80;
}
server
{
listen 80;
server_name 10.29.240.155; (这里定义的是本地访问的IP)
location / {
proxy_pass http://web_jn;
proxy_set_header Host hello.sina.com; (指定一个host的值,不然访问10.29.240.155时,会引用 其本机的host)
proxy_set_header X-Forwarded-Host $host;
}