一、添加站点反向代理设置

  • 目标URL:http://127.0.0.1:5212
  • 发送域名:$host

二、编辑站点反代配置

location ^~ /

{
proxy_buffering off;
proxy_cache off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:5212;
client_max_body_size 200000m;

}

三、编辑nginx反代配置

  • 修改/www/server/nginx/conf/proxy.conf

    proxy_temp_path /www/server/nginx/proxy_temp_dir;
    proxy_cache_path /www/server/nginx/proxy_cache_dir/ levels=1:2 keys_zone=cache_one:2m inactive=1d max_size=1g;
    client_body_buffer_size 2048k;
    proxy_connect_timeout 60;
    proxy_read_timeout 60;
    proxy_send_timeout 60;
    proxy_buffer_size 32k;
    proxy_buffers 4 64k;
    proxy_busy_buffers_size 128k;
    proxy_temp_file_write_size 128k;
    proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
    #proxy_cache cache_one;

如果觉得我的文章对你有用,请随意赞赏