优化Ubuntu上的PHP加载速度可从以下方面入手:
sudo apt install php-opcache。php.ini:设置opcache.enable=1、opcache.memory_consumption=128等参数,重启PHP-FPM生效。pm.max_children、pm.start_servers等参数,优化进程管理。KeepAlive,调整MaxClients等参数。worker_processes、fastcgi_pass配置。具体操作前建议备份配置文件,根据服务器资源调整参数。