{"id":1342,"date":"2023-03-19T09:08:34","date_gmt":"2023-03-19T01:08:34","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1342"},"modified":"2023-04-29T09:05:59","modified_gmt":"2023-04-29T01:05:59","slug":"starting-nginx-and-php-using-runhiddenconsole-under-windows","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/19\/starting-nginx-and-php-using-runhiddenconsole-under-windows\/","title":{"rendered":"Windows\u4e0b\u4f7f\u7528RunHiddenConsole\u542f\u52a8Nginx\u548cPHP"},"content":{"rendered":"<p>RunHiddenConsole.exe\u7684\u4f5c\u7528\u662f\u5728\u6267\u884c\u5b8c\u547d\u4ee4\u884c\u811a\u672c\u540e\u53ef\u4ee5\u81ea\u52a8\u5173\u95ed\u811a\u672c,\u800c\u4ece\u811a\u672c\u4e2d\u5f00\u542f\u7684\u8fdb\u7a0b\u4e0d\u88ab\u5173\u95ed\u3002\u7b80\u5355\u6765\u8bf4\u5c31\u662f\u9ed1\u7a97\u4f53\uff08CMD\u547d\u4ee4\u7a97\u4f53\uff09\u4e0d\u4f1a\u663e\u793a\uff0c\u4f46CMD\u547d\u4ee4\u7a97\u4f53\u4e2d\u8fd0\u884c\u7684\u7a0b\u5e8f\u4e0d\u4f1a\u88ab\u5173\u95ed\uff0c\u7279\u522b\u662f\u4e00\u4e9b\u4f1a\u6302\u4f4f\u5fc5\u987b\u663e\u793a\u547d\u4ee4\u7a97\u4f53\u7684\u547d\u4ee4\u8fd8\u771f\u4e0d\u9519\uff0c\u5982 Tomcat\u3001Php\u3001Nginx\u7b49\u3002<\/p>\n<p><!-- more --><\/p>\n<p>RunHiddenConsol\u5b98\u65b9\u4e0b\u8f7d\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"http:\/\/redmine.lighttpd.net\/attachments\/660\/RunHiddenConsole.zip\">http:\/\/redmine.lighttpd.net\/attachments\/660\/RunHiddenConsole.zip<\/a><\/p>\n<h2>\u542f\u52a8PHP\u548cNginx<\/h2>\n<p>\u6839\u636e\u81ea\u5df1\u7684\u73af\u5883\u8bbe\u7f6ephp_home\u548cnginx_home\uff0c\u7136\u540e\u4fdd\u5b58\u4e3astart_server.bat \u6587\u4ef6\u5373\u53ef\u3002<\/p>\n<pre><code>@echo off\nset php_home=E:\/server\/php\/php-5.6.14-nts-Win32-VC11-x64\nset nginx_home=E:\/server\/nginx\/nginx-1.9.6\n\nREM Windows \u4e0b\u65e0\u6548\nREM set PHP_FCGI_CHILDREN=5\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=1000\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%<\/code><\/pre>\n<h2>\u505c\u6b62PHP\u548cNginx<\/h2>\n<p>\u521b\u5efastop_nginx.bat \u6587\u4ef6\u3002<\/p>\n<pre><code>@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>RunHiddenConsole.exe\u7684\u4f5c\u7528\u662f\u5728\u6267\u884c\u5b8c\u547d\u4ee4\u884c\u811a\u672c\u540e\u53ef\u4ee5\u81ea\u52a8\u5173\u95ed\u811a\u672c,\u800c\u4ece\u811a\u672c\u4e2d\u5f00\u542f\u7684\u8fdb\u7a0b\u4e0d\u88ab [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[334],"class_list":["post-1342","post","type-post","status-publish","format-standard","hentry","category-devops-base","tag-runhiddenconsole"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1342","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=1342"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1342\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}