Nginx is a free, open-source, high-performance HTTP server and reverse proxy. Nginx can be run as a Windows Service using FireDaemon Pro. FireDaemon Pro allows you to start Nginx automatically at system boot prior to login, start multiple instances of Nginx and restart Nginx should it crash. This guide will show you how to set it up. You can also use FireDaemon Fusion to manage FireDaemon Pro and other Windows services via your web browser.
Nginx Setup Under FireDaemon Pro
Download Nginx for Windows from the Nginx website.
Unpack the zip files into the directory of your choice. For the purposes of this guide, we will use C:\nginx. Nginx uses one configuration file to store its settings, which you can edit to your preferences. It's called C:\nginx\conf\nginx.conf.
Next, download and install FireDaemon Pro into the directory of your choice, typically C:\Program Files\FireDaemon.
Next start the FireDaemon Pro GUI from the desktop shortcut. Click on the "Create a new FireDaemon service" button in the toolbar (or type Ctrl+N) and enter the information into the fields as you see below. Adjust the paths to suit your installation.
- Executable: The path to your nginx.exe file. For the purposes of this guide, the path is C:\nginx\nginx.exe.
- Working Directory: The directory containing your nginx.exe file. For the purposes of this guide, the path is C:\nginx.
- Parameters: None. Leave this field blank.
- Type: Application
Now click on the Settings tab. Uncheck the Interact with Desktop check box. Change the "Job Type" to "Global Job", otherwise when Nginx is restarted the child processes will not be terminated properly.
Now click on the Lifecycle tab. Uncheck Graceful Shutdown as Nginx doesn't respond to it.
Now click the big tick to Save and Close. Nginx will start up right away. Point your browser at Nginx to confirm it's working! If not take a look in Nginx's access and error logs to see if there are any configuration issues which might not allow Nginx to start up properly.