Set nginx+PHP to start automatically at boot

不言
Release: 2023-03-23 09:06:02
Original
3256 people have browsed it

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
Copy after login
Copy after login

or

/usr/loca/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
/usr/sbin/php-fpm start
Copy after login
Copy after login

           

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
Copy after login
Copy after login

or

/usr/loca/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
/usr/sbin/php-fpm start
Copy after login
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!