Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/www/users/infowjvsrt/wp-content/plugins/revslider/includes/operations.class.php on line 2854 Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/www/users/infowjvsrt/wp-content/plugins/revslider/includes/operations.class.php on line 2858 Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/www/users/infowjvsrt/wp-content/plugins/revslider/includes/output.class.php on line 3708 Warning: session_start(): Cannot start session when headers already sent in /usr/www/users/infowjvsrt/wp-content/plugins/wcp-contact-form/agp-core/classes/persistence/session/Agp_SessionAbstract.class.php on line 10 How to install nginx as a service on Windows Server 2012 | Infoware Studios

Blog

How to install nginx as a service on Windows Server 2012

Posted by:

Install nginx

Download the latest stable version from http://nginx.org/en/download.html

Extract the zip file to c:\nginx (or your preferred installation path)

Check nginx installation

Command: C:\nginx\nginx.exe

Go to http://localhost, you should see a welcome to nginx page.

Stop nginx

C:\nginx\nginx.exe –s stop

Install .net 3.5

Follow the instructions at http://www.danielclasson.com/install-net-framework-35-server-2012/

Install winsw

[list_icon color=”blue” type=”icon_arrow”] [/list_icon]

Create a XML file mynginx.xml

<service>
<id>nginx</id>
<name>nginx</name>
<description>nginx</description>
<executable>c:\nginx\nginx.exe</executable>
<logpath>c:\nginx\</logpath>
<logmode>roll</logmode>
<depend></depend>
<startargument>-p c:\nginx</startargument>
<stopargument>-p c:\nginx -s stop</stopargument>
</service>

Install nginx service

C:\nginx.exe\mynginx.exe install

Manage service

Open PowerShell and type in service.msc

You should see the nginx service in the list, now you can manage nginx like any other windows service. Your install nginx is complete.

install nginx


BY: SOFTWARE DEVELOPER AT INFOWARE STUDIOS


Interesting Infoware Studios Bookmarks

0

About the Author:

  Related Posts
  • No related posts found.