Debian LNMP故障排查可按以下步骤进行:
systemctl status nginx
、systemctl status mysql
、systemctl status php-fpm
确认各服务是否正常运行。/var/log/nginx/error.log
/var/log/mysql/error.log
/var/log/php-fpm.log
nginx -t
检查语法,确保 fastcgi_pass
等配置正确。/etc/mysql/my.cnf
中的 datadir
、socket
等参数。listen
地址与Nginx配置一致,检查 pm.max_children
等参数。netstat -tuln
确认Nginx(80/443)、MySQL(3306)端口监听正常。ufw status
或 iptables -L
检查防火墙是否放行相关端口。top
/htop
查看CPU、内存占用,确认无资源耗尽。www-data
)对网站目录有读写权限:chown -R www-data:www-data /var/www/html
。ping
测试网络连通性,curl
或浏览器访问网站测试基础访问。info.php
(<?php phpinfo(); ?>
)验证PHP是否正常解析。request_terminate_timeout
或增加进程数。www-data
用户可访问。参考来源:[1,2,3,5,6,7,8,9,10,11,13,15]