http://www.wtbis.cn/plugin/157
接口流式響應(yīng),本地可以,服務(wù)器上不行,接口沒(méi)錯(cuò)誤信息和日志
擴(kuò)展包安裝了,也重啟了
寶塔nginx+php8.1默認(rèn)配置
可能是nginx配置問(wèn)題,直接訪問(wèn)8787端口不經(jīng)過(guò)nginx試下。
寶塔和服務(wù)器安全組記得開(kāi)8787端口
cursor好強(qiáng)啊,可以了
server
{
listen 80;
server_name test.top;
index index.html index.htm default.htm default.html;
root /www/wwwroot/webman/start.php;
# ... 其他配置保持不變 ...
#REWRITE-START 偽靜態(tài)相關(guān)配置
include /www/server/panel/vhost/rewrite/other_webman.conf;
#REWRITE-END
#禁止訪問(wèn)的文件或目錄
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md|package.json|package-lock.json|\.env) {
return 404;
}
#一鍵申請(qǐng)SSL證書(shū)驗(yàn)證目錄相關(guān)設(shè)置
location /.well-known/ {
root /www/wwwroot/java_node_ssl;
}
#禁止在證書(shū)驗(yàn)證目錄放入敏感文件
if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) {
return 403;
}
# HTTP反向代理相關(guān)配置開(kāi)始 >>>
location ~ /purge(/.*) {
proxy_cache_purge cache_one 127.0.0.1$request_uri$is_args$args;
}
location / {
proxy_pass http://127.0.0.1:9501;
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_set_header REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
proxy_set_header X-Host $host:$server_port;
proxy_set_header X-Scheme $scheme;
# 修改以下配置以支持流式響應(yīng)
proxy_buffering off;
proxy_cache off;
proxy_http_version 1.1;
chunked_transfer_encoding on;
proxy_read_timeout 300s;
proxy_connect_timeout 300s;
# 保持長(zhǎng)連接
proxy_set_header Connection "keep-alive";
# 添加調(diào)試頭
add_header X-Debug-Message "Proxied through Nginx" always;
}
# 修改錯(cuò)誤日志路徑
error_log /www/wwwlogs/webman_error.log debug;
access_log /www/wwwlogs/webman_access.log;
}