Because you always need to reinstall the system, you need to reset the http Service Startup Script again. This time, the script is backed up.
Httpd for Ubuntu
System: nginx + php-fpm
#! /Bin/sh ### begin init info # Provides: httpd # Required-Start: $ all # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: run http server ### end init INFOexec_phpfpm = "/opt/php5/sbin/php-fpm" pid_phpfpm = "/run/php-fpm.pid" exec_nginx = "/opt/nginx/sbin/ nginx "pid_nginx ="/run/nginx. pid "# Stop the php-fpm service do_stop_phpfpm () {echo-n" Stoping php-fpm... "kill-QUIT 'cat $ {pid_phpfpm} '>/dev/n Ull 2> & 1 if [$? -Eq 0]; then show_success else show_failed fi echo "" }## output OKshow_success () {echo-n "\ 033 [32 m [OK] \ 033 [0 m" }## output NOshow_failed () {echo-n "\ 033 [37 m [NO] \ 033 [0 m" }## start the php-fpm service do_start_phpfpm () {echo-n "starting php-fpm... "$ exec_phpfpm-g $ pid_phpfpm>/dev/null 2> & 1 if [$? -Eq 0]; thenshow_success else echo-n "\ 033 [37 m [NO] \ 033 [0 m" fi echo "" }## nginx reload setting do_reload_nginx () {$ exec_nginx-s reload>/dev/null 2> & 1 echo "\ 033 [32 m nginx reload config successfully. \ 033 [0 m "}## start the nginx service do_start_nginx () {echo-n" Starting nginx... "$ exec_nginx>/dev/null 2> & 1 if [$? -Eq 0]; thenshow_success else show_failed fi echo} # Stop the nginx service do_stop_nginx () {echo-n "Stoping nginx... "$ exec_nginx-s stop>/dev/null 2> & 1if [$? -Eq 0]; thenshow_success else show_failed fi echo} case $1 instart) echo "starting httpd server... "do_start_phpfpmdo_start_nginx; stop_phpfpm) echo" stoping php-fpm server... "do_stop_phpfpm; stop_nginx) echo" stoping nginx server... "do_stop_nginx; start_nginx) echo" starting nginx server... "do_start_nginx; restart_nginx) echo" restart nginx server... "do_stop_nginxdo_start_nginx; restart_phpfpm) echo" restart php-fpm server... "do_stop_phpfpmdo_start_phpfpm; restart) echo" restart httpd server... "do_stop_phpfpmdo_stop_nginxdo_start_phpfpmdo_start_nginx; stop) echo" stop httpd server... "outputs; reload) echo" reload nginx config "do_reload_nginx; *) echo" USE: httpd start | restart | reload | stop | restart_phpfpm | stop_phpfpm | stop_nginx | start_nginx ";; esacexit 0