This repository is created in order to share services automation tools for nginx in windows
- You can clone this repository and copy the .BAT files into the nginx binary folder you have installed on your computer.:
-
git clone https://github.com/lfelipe1501/Automated-NGINX-Windows.git
- To install and use the services for nginx and php-cgi you need to follow the following steps:
- Get and copy all the files in the folder MANAGER after this paste them inside the installation folder of your nginx binary.
- Make sure you have the correct path of your php and nginx services inside the windows variables, you can also use these commands to add them by adjusting the paths of the binaries on your computer:
Run the following commands:
# Set user VARIABLES
setx PHP_HOME "D:\serverlocal\php"
setx NGINX_HOME "D:\serverlocal\nginx"
# Set System Global VARIABLES
setx -m PHP_HOME "D:\serverlocal\php"
setx -m NGINX_HOME "D:\serverlocal\nginx"
# Set user PATH VARIABLES
[Environment]::SetEnvironmentVariable("path", $env:path + ";%PHP_HOME%;%NGINX_HOME%", "User")
# Set System Global PATH VARIABLES
[Environment]::SetEnvironmentVariable("path", $env:path + ";%PHP_HOME%;%NGINX_HOME%", "Machine")
If all goes well, it should look like this:
- Now you can execute from any place in your console the commands to start, restart, stop php-cgi and nginx
In cgi service the config used is: 127.0.0.1:900x |
---|
in the bat script 6 php cgi processes are created for the nginx, you can edit the script in the _restart and _start options to create more or decrease these processes.
Get the latest News about Web Development, Open Source, Tooling, Server & Security
Developer / Author: Luis Felipe Sánchez
Company: lfsystems