The content of this article is to share with you how to set nginx and PHP to start automatically at boot, using code. Friends in need can refer to it
Switch to the root user and execute the command: vim /etc/rc.local
Add the following content:
source /etc/profile nginx -c /usr/local/nginx/conf/nginx.conf /usr/sbin/php-fpm start
or
/usr/loca/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf /usr/sbin/php-fpm start
Switch to the root user and execute the command: vim /etc/rc.local
Add the following content:
source /etc/profile nginx -c /usr/local/nginx/conf/nginx.conf /usr/sbin/php-fpm start
or
/usr/loca/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf /usr/sbin/php-fpm start
The above is the detailed content of Set nginx+PHP to start automatically at boot. For more information, please follow other related articles on the PHP Chinese website!