[Window] nginx + mysql + php-cgi startup script Nginx
= Previously it was built on linux. this time it was changed to win...
Cls @ echo off # NGINX_PATH is useful in the following SET NGINX_PATH = D: SET NGINX_DIR = D:/wamp/bin/nginx/nginx-1.4.7/SET MYSQL_DIR = D: /wamp/bin/mysql/mysql5.5.24/bin/SET PHP_DIR = D:/wamp/bin/php/php5.3.13/color 0 aTITLE Nginx + PHP + MySQL management program goto menu: MENUCLSECHO. ECHO. * ****** Nginx + PHP + Mysql hypervisor ****** ECHO. ** ECHO. * 1 start all * ECHO. ** ECHO. * 2 close all * ECHO. ** ECHO. * 3 restart Nginx * ECHO. ** ECHO. * 4 restart php-cgi * ECHO. ** ECHO. * 5 restart Mysql * ECHO. ** ECHO. * 0 return * ECHO. ** ECHO. * ************************ ECHO. ECHO. enter the serial number of the selected project: set/p ID = IF "% id %" = "1" GOTO route 1If "% id %" = "2" GOTO route 2If "% id %" = "3" GOTO route 3If "% id %" = "4" GOTO route 4if "% id %" = "5" GOTO route 5IF "% id %" = "0" EXITPAUSE:: start all: running 1echo. start all services ECHO. start php-cgi ...... echo set wscriptObj = CreateObject ("Wscript. shell ")> start_fastcgi.vbsecho wscriptObj. run "maid php-cgi.exe-B 127.0.0.1: 9000", 0> start_fastcgi.vbsstart_fastcgi.vbsdel start_fastcgi.vbsECHO.php-cgi start ECHO successfully. start Nginx ...... if not exist already ECHO failed does not exist # Note: IF the following two lines are removed, nginx % NGINX_PATH % cd % NGINX_DIR % if exist has nginx_dir1_nginx.exe start has nginx_dir1_nginx.exe ECHO. nginx startup success ECHO. start Mysql ...... start using mysql_dir1_mysqld.exe ECHO. ECHO. operation complete pausegoto menu: close all services: running 2echo. disabling all services ...... ECHO. disable Nginxtaskkill/F/IM nginx.exe> nulECHO. close php-cgitaskkill/F/IM php-cgi.exe> nulECHO. disable Mysqltaskkill/F/IM mysqld.exe> nulECHO. all services pausegoto menu: restart Nginx: restart 3echo have been disabled. restarting Nginx ..... taskkill/F/IM nginx.exe> nulECHO. disable NginxECHO. start Nginx ...... start running nginx_dir1_nginx.exe ECHO. nginx is successfully started. pausegoto menu: restart php-cgi: ipv4echo. disabling php-cgi ...... taskkill/F/IM php-cgi.exe> nulECHO. disable php-cgiECHO. start php-cgi ...... echo set wscriptObj = CreateObject ("Wscript. shell ")> start_fastcgi.vbsecho wscriptObj. run "cmdphp_dir1_php-cgi.exe-B 127.0.0.1: 9000", 0> start_fastcgi.vbsstart_fastcgi.vbsdel start_fastcgi.vbsECHO.php-cgi start successfully PAUSEGOTO MENU: restart Mysql: cmd5ECHO. shutting down Mysql ...... taskkill/F/IM mysqld.exe> nulECHO. disable MysqlECHO. start Mysql ...... start using mysql_dir1_mysqld.exe ECHO. mysql started successfully PAUSEGOTO MENU
Then modify the nginx configuration ~ I don't want to explain. there are too many websites.