location ~* /cgi-bin/luci.* { include luci-backend.conf; } location /api/service/plugin { rewrite ^/api/service/plugin/control /api-third-party/download/private/$arg_appid/control.html? permanent; } location /api-third-party/service { add_header MiCGI-Switch "$finalvar"; add_header MiCGI-Client-Ip $remote_addr; add_header MiCGI-Host $host; add_header MiCGI-Http-Host $http_host; add_header MiCGI-Server-Ip $server_addr; add_header MiCGI-Server-Port $server_port; add_header MiCGI-Status CGI; add_header MiCGI-Preload no; # include 'fastcgi-proxy-tcp.conf'; # } # for upload_rom location ^~ /uploadfile/cgi-bin { add_header MiCGI-Switch "$finalvar"; add_header MiCGI-Client-Ip $remote_addr; add_header MiCGI-Host $host; add_header MiCGI-Http-Host $http_host; add_header MiCGI-Server-Ip $server_addr; add_header MiCGI-Server-Port $server_port; add_header MiCGI-Status CGI; add_header MiCGI-Preload no; add_header MiCGI-Upload-File yes; # for upload roms only [start] client_body_temp_path /tmp/uploadfiles/; client_body_in_file_only clean; client_body_buffer_size 16k; proxy_pass_request_headers on; proxy_set_body off; proxy_redirect off; fastcgi_param UPLOADFILE $request_body_file; client_max_body_size 100M; #TODO: upload_multipart_cut #upload_multipart_cut on; fastcgi_max_temp_file_size 0; # for upload rom only [end] # include 'fastcgi-proxy-tcp.conf'; # } # for datacenter download location ^~ /download-mnt/ { internal; alias /mnt/; } error_page 401 403 404 /err/404.html;