新手一枚,不明白傳統(tǒng)php-fpm與HTTP框架部署差異,以下是我個人理解并部署的方法,請大佬指導(dǎo),謝謝~
upstream webman {
server 127.0.0.1:8787;
keepalive 10240;
}
server
{
listen 80;
server_name 192.168.31.188;
access_log off;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/webman/public;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
if (!-f $request_filename){
proxy_pass http://webman;
}
}
access_log /www/wwwlogs/192.168.31.188.log;
error_log /www/wwwlogs/192.168.31.188.error.log;
}
以上寶塔部署步驟,請大佬指點是否正確?按以上步驟可以正常訪問,我怎么判斷不是以php-fpm方式運行呢?
看起來都正確。
最后一步不知道寶塔帶不帶守護進程,如果不帶運行命令應(yīng)該是 php start.php start -d
,有個-d
。如果帶就不用加。