Nginx proxy local folder (Windows environment)

 

win10

nginx-1.17.2

2 | 0 steps:


2 | 1 a, open nginx.conf


Path: \ nginx-1.17.2 \ conf \ nginx.conf

2 | 2 Second, editor


Configuring Inter-agency and folder path

2 | 3 Third, start nginx


Start cmd in nginx folder path (see nginx version: nginx -v)

2 | 4 Fourth, verification


Browser validation can enter localhost

2 | 5 five issues


1, if before modifying nginx.conf, has launched nginx words, once you have read about the need to re-configure, and restart the service.

Re-read the file: nginx -s reload

Restart the service: nginx -s reopen

2, in the learning process, encountered a 403 forbidden situations.

Online said that the rights issue, the user nobody can change the user root, but the solutions are under linux, I win10 environment, try to change a variety of users, and no response.

start nginx, will start two nginx.exe process: each time you run the command during the study found. I do not know at the beginning, started a dozen process (normally there should be only two), and finally all killed, reconfigure it again, there is no longer a reported 403. (I do not know is not the reason)

 

2 | 6 VI closed


nginx because it is the command line to start, shut down the process will not close, you need the same command.

Exit: nginx -s quit

Forced OFF: nginx -s stop

Guess you like

Origin www.cnblogs.com/dybk/p/11791444.html