Check the permissions of the rc.local file
ll /etc/rc.d/rc.local
If the permissions have been elevated, you do not need to perform the second step and proceed directly to the third step.
Increase rc.local file permissions
chmod +x /etc/rc.d/rc.local
Write the program startup path in the rc.local file
/usr/local/nginx/nginx
/usr/local/php/sbin/php-fpm
Restart the server and check the port
reboot Restart the server After the
server starts, check the port ss -ant