nginx 反代 到 8787 端口
在xshell中,進入程序根目錄下
執(zhí)行 php start.php start 調(diào)試正常
執(zhí)行 php start.php start -d ,如果不關閉當前ssh終端,也是正常
如果一旦關閉了當前 ssh終端窗口,網(wǎng)站就是 502,而另開一個ssh終端,執(zhí)行 php start.php status 顯示進程都在,
php版本
此時正常網(wǎng)站, 關閉當前ssh窗口后,刷新網(wǎng)頁502
另開一個ssh終端, 執(zhí)行 php start.php status,看起來似乎無錯
nginx配置
location / {
error_page 403 = @webman;
error_page 404 = @webman;
error_page 405 = @webman;
try_files ${uri} ${uri}/ ${uri}/index.html @webman;
}
## WEBMAN LOCATION
location @webman {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8787;
}
====
已解決
在 502時,runtime下error.log 沒有產(chǎn)生錯誤或異常日志,只有 master.log 里提示 進程退出 exit with status 65280
目前問題解決了。 方法是:刪掉控制器中所有 echo 和 print_r 輸出,就可以了。
具體為什么不知道,總之反復測試發(fā)現(xiàn),刪掉這些輸出就正常,加上后daemon模式就502。
lsof -np 28010
是用root用戶操作的嗎?
是的。初步判斷貌似和 afterAction(Request $request, $response) 有關,我刪掉了 afterAction 方法就可以了,但只要加上,即使 afterAction 函數(shù)體為空也不行
在 502時,runtime下error.log 沒有產(chǎn)生錯誤或異常日志,只有 master.log 里提示 進程退出 exit with status 65280
目前問題解決了。 刪掉了 方法里所有的 echo 和 print_r 輸出,就可以了。具體因為什么不知道,總之刪掉這些輸出就正常,加上就502