Install and Configure nginx on Windows

preview_player
Показать описание
#nginx #windows #webserver

--------------------------------------------------------------------
Installing and Running nginx
--------------------------------------------------------------------
   02. Extract the downloaded .zip file
   03. Rename the extracted folder nginx
   04. Copy the extracted nginx files to the desired location, for example C:\Program Files\nginx
 
--------------------------------------------------------------------
Adding PHP Support
--------------------------------------------------------------------
   03. Install Microsoft Visual C++
   04. Extract the downloaded .zip file
   05. Rename the extracted folder php
   06. Copy the extracted php folder to the desired location, for example C:\Program Files\PHP
   07. Open the php install location and right click in the white space while holding down the Shift key ≫ Open PowerShell window here
   08. Paste the following command in the PowerShell window to start the PHP CGI process
   09. Open Windows Explorer and navigate to the nginx installation directory /conf
   11. Add the following lines inside the server object
         location ~ \.php$ {
             fastcgi_pass   127.0.0.1:9123;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
             include        fastcgi_params;
         }
 
--------------------------------------------------------------------
Running nginx Server on Startup
--------------------------------------------------------------------
nginx doesn't currently have the ability to run as a Windows service natively. A simple workaround is to create a scheduled task to start the nginx server on system startup
 
   01. Open notepad and paste the following into a blank text file
   03. Click the Start button ≫ Search Task ≫ Click Task Scheduler
   04. Right click the Task Scheduler Library folder in the top left ≫ Create Basic Task
   05. Name the task nginx startup ≫ Click Next
   06. Select When the computer starts ≫ Click Next
   07. Select Start a program ≫ Click Next
   09. Set the Start in value to C:\Program Files\nginx ≫ Click Next
   10. Click Finish
   11. Reboot to test that nginx with PHP support starts with the system on boot
 
 

### Connect with me and others ###
Рекомендации по теме
Комментарии
Автор

Wow!.. it's perfectly working for me😄 thanks for your help. Continue your best and good luck:)

gpraj
Автор

Is there any way to use grub bootloader with armbian so i can choose to boot in either armbian or android?

Imran-cwjc
Автор

How to access this from public devices

codingwithmagic