Installing Nginx
How is the Windows version installed as a service?
- Download Nginx Windows version
- Download Microsoft's 2 tools: Instsrv.exe
- Run command
Instsrv Nginx C:\nginx\nginx.exe, this installs a Nginx service
- Configuring the Nginx operating parameters
You can import the configuration directly into the registry
Windows Registry Editor Version 5.00
[Hkey_local_machine\system\currentcontrolset\services\nginx\parameters]
"Application" = "C:\nginx\nginx.exe"
"Appparameters" = ""
"Appdirectory" = "C:\nginx\"
net stop Nginx stop service net start Nginx service
You can download my packaged Nginx directly, which includes the command and configuration required above.
install php install MySQL
Nginx is a good Web server software, the following describes how to install the WNMP Server suite environment.
1. Install MySQL
This can be downloaded to install the installation program
2. Install PHP
Modify the corresponding PHP configuration file
Extension_dir assigned to the corresponding directory
And the extension of the load need to get rid of the annotations (at least MySQL ...)
Cgi.fix_pathinfo=1
3. Installing Nginx
assigning document_root to the corresponding directory
That is, modify the root setting
Root e:/www;
Additionally, you need to add index.php to index
Index index.html index.htm index.php;
Find "~. php?$" To remove this comment
Fastcgi_param Script_filename E:/www$fastcgi_script_name;
4. Running PHP in CGI mode
C:/php/php-cgi.exe-b 127.0.0.1:9000-c C:/php/php.ini
5. Running Nginx
To the Nginx installation directory, find Nginx.exe, directly run is
net start [service name]
Stop command:
net stop [service name]
Win under nginx+mysql+php installation