{"id":1483,"date":"2023-03-24T22:41:36","date_gmt":"2023-03-24T14:41:36","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1483"},"modified":"2023-04-28T20:31:34","modified_gmt":"2023-04-28T12:31:34","slug":"nginx-and-php-backend-startup-scripts-under-windows","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/24\/nginx-and-php-backend-startup-scripts-under-windows\/","title":{"rendered":"Windows\u4e0bNginx\u53caPHP\u540e\u53f0\u542f\u52a8\u811a\u672c"},"content":{"rendered":"<h2>start_nginx.bat<\/h2>\n<pre><code class=\"language-bash\">@echo off\nset nginx_home=D:\/Server\/Nginx\/nginx-1.13.8\n\nREM Windows \u4e0b\u65e0\u6548\nREM set PHP_FCGI_CHILDREN=10\n\necho Starting Nginx...\nRunHiddenConsole %nginx_home%\/nginx.exe -p %nginx_home%\n\npause()<\/code><\/pre>\n<p><!-- more --><\/p>\n<h2>start_server.bat<\/h2>\n<pre><code class=\"language-bash\">@echo off\nset php_home=D:\/Server\/PHP\/php-7.2.0-nts-Win32-VC15-x64\nset nginx_home=D:\/Server\/Nginx\/nginx-1.13.8\n\nREM Windows \u4e0b\u65e0\u6548\nREM set PHP_FCGI_CHILDREN=10\n\nREM \u6bcf\u4e2a\u8fdb\u7a0b\u5904\u7406\u7684\u6700\u5927\u8bf7\u6c42\u6570\uff0c\u6216\u8bbe\u7f6e\u4e3a Windows \u73af\u5883\u53d8\u91cf\nset PHP_FCGI_MAX_REQUESTS=1024\n\necho Starting PHP FastCGI...\nRunHiddenConsole %php_home%\/php-cgi.exe -b 127.0.0.1:9000 -c %php_home%\/php.ini\n\necho Starting Nginx...\nRunHiddenConsole %nginx_home%\/nginx.exe -p %nginx_home%\n\npause()<\/code><\/pre>\n<h2>stop_server.bat<\/h2>\n<pre><code class=\"language-bash\">@echo off\necho Stopping nginx...  \ntaskkill \/F \/IM nginx.exe &gt; nul\necho Stopping PHP FastCGI...\ntaskkill \/F \/IM php-cgi.exe &gt; nul\nexit<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>start_nginx.bat @echo off set nginx_home=D:\/Server\/Ngin [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[333],"tags":[25,47],"class_list":["post-1483","post","type-post","status-publish","format-standard","hentry","category-install-deploy","tag-nginx","tag-php"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1483"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1483\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}