nginx 二级域名隐藏端口跳转及文件上传注意 配置示例

来源:互联网 发布:php管理软件 编辑:程序博客网 时间:2024/05/21 16:14
  server {
        listen       80;
        server_name  t1.lilin.com;


        #charset koi8-r;


        access_log  logs/localhost.access.log  main;
 
         location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/;
proxy_connect_timeout      300;
proxy_send_timeout         300;
proxy_read_timeout         300; 
rewrite ^/(.*) /HBBKONLINE break;
 
}


location /HBBKONLINE {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/HBBKONLINE;
proxy_connect_timeout      300;
proxy_send_timeout         300;
proxy_read_timeout         300;
 #默认上传文件大小1m  必须改大哦
client_max_body_size    1000m; 
}
        
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

    } 

 


0 0