Nginx and PHP use Runhiddenconsole startup case in Windows

Source: Internet
Author: User
Using Runhiddenconsole to launch Nginx and PHP under Windows

The RunHiddenConsole.exe function is to automatically close the script after executing the command line script, and the process that is opened from the script is not closed. In simple terms, the black form (cmd command form) does not appear, but programs that are running in the cmd command form are not closed, especially if some of the commands that hang the command form must be displayed are good, such as Tomcat, PHP, Nginx, and so on.

1, start Php and Nginx, according to their own environment settings php_home and Nginx_home, and then save as a. bat file pieces.

@echo off set php_home=./php/php-5.6.1-nts-win32-vc11-x64 set nginx_home=./nginx/nginx-1.7.4  rem Windows invalid REM Set php_fcgi_children=5  REM The maximum number of requests processed per process, or set to Windows environment variable set php_fcgi_max_requests=1000  echo starting PHP FastCGI ... Runhiddenconsole%php_home%/php-cgi.exe-b 127.0.0.1:9000-c%php_home%/php.ini  echo starting nginx ... Runhiddenconsole%nginx_home%/nginx.exe-p%nginx_home%

2. Close PHP and Nginx

@echo off echo stopping nginx ... taskkill/f/im nginx.exe > nul echo stopping PHP FastCGI ... taskkill/f/im php-cgi.e Xe > Nul exit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.