<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post//</link>
<title><![CDATA[Windows下Nginx以服务的方式运行]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[服务器技术]]></category>
<pubDate>Mon, 17 May 2010 02:50:50 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	从wnmp发布以来，很多朋友就问Windows下如何将Nginx加入服务中，以便于服务器重启后自动运行，我在朋友的留言中回复了，可能不是很好找，便整理在此，便于需要的朋友查找。<br/><br/>假设nginx安装在c:&#92;nginx&#92;下:<br/><br/>1.下载微软服务注册工具srvany.exe, instsrv.exe, srvany-instsrv存放到c:&#92;nginx&#92;目录下<br/><br/>2.安装Nginx服务, 将命令行切换到c:&#92;nginx&#92;,执行下列命令<br/><br/>instsrv NGINX c:&#92;nginx&#92;srvany.exe<br/><br/>3.在c:&#92;nginx&#92;下,新建一个nginx.reg文件，输入一下内容：<br/><br/>Windows Registry Editor Version 5.00<br/><br/>[HKEY_LOCAL_MACHINE&#92;SYSTEM&#92;CurrentControlSet&#92;Services&#92;NGINX&#92;Parameters]<br/>"Application"="C:&#92;&#92;nginx&#92;&#92;nginx.exe"<br/>"AppParameters"=""<br/>"AppDirectory"="C:&#92;&#92;nginx&#92;&#92;"<br/><br/>5.让服务与程序关联起来, 命令行执行<br/><br/>regedit /s nginx.reg<br/><br/>6.编辑启动nginx脚本start-nginx.bat(关闭脚本不用变), 让程序以服务方式运行<br/><br/>@ECHO OFF<br/>net stop nginx<br/>net start nginx<br/>EXIT<br/><br/>完成~<br/><br/>最近一直在研究Linux下的Nginx自动安装，呵呵，鼓励大家迁移到Linux平台...<br/><br/><br/><a href="attachment.php?fid=46">点击这里下载文件</a><br/><br/><br/>Tags - <a href="http://www.dzhope.com/tags/windows/" rel="tag">windows</a> , <a href="http://www.dzhope.com/tags/nginx/" rel="tag">nginx</a>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] Windows下Nginx以服务的方式运行]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.dzhope.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>