Nginx Installation on a Windows machine

Опубликовано: 18 Май 2026
на канале: Coding Choice
12
0

Prerequisites
• A Windows machine (Windows 10 or later recommended)
• Internet connection
• A user account with administrative privileges

Downloading Nginx
1. Open a web browser and go to https://nginx.org/en/download.html
2. Scroll down to the Windows section and download the latest stable version (zip file).
3. Save the file in an easily accessible location (e.g., C:\nginx).

Extracting Nginx Files
1. Navigate to the downloaded ZIP file.
2. Right-click and select Extract All…
3. Choose the destination folder (e.g., C:\nginx).
4. Click Extract to complete the process.

Running Nginx
1. Open Command Prompt (Win + R, type cmd, press Enter).
2. Navigate to the Nginx folder using the command:
cd C:\nginx
3. Start Nginx by running:
start nginx
4. Nginx should now be running in the background.

Verifying Installation
1. Open a web browser.
2. Type http://localhost/ in the address bar and press Enter.
3. If the installation was successful, you should see the default Nginx welcome page.

Stopping and Restarting Nginx
• To stop Nginx, run:
nginx -s stop
• To reload the configuration without stopping, run:
nginx -s reload

Configuring Nginx
• The main configuration file is nginx.conf located in C:\nginx\conf\.
• Open the file in a text editor (e.g., Notepad++).
• Modify settings as needed and restart Nginx for changes to take effect.

Uninstalling Nginx
1. Stop Nginx using nginx -s stop.
2. Delete the Nginx folder from C:\nginx.
3. Remove any related environment variables if configured.