inotgo.com

Download area
File name File size
nginx.rar 1m
Step 1 : Download and unzip   
Step 2 : Start mode - Double click directly   
Step 3 : Start mode - Command line   
Step 4 : Port occupied   
Step 5 : Port number modification   
Step 6 : nginx.conf Configuration file   

Download the... In the upper right corner nginx.rar And unzip
Step 2 :

Start mode - Double click directly

edit top fracture
There are generally two ways to start :
First kind : Double click directly
Double click directly nginx.exe A screen will flash by , This time , In fact, it has been started successfully . Just open the access address , You can see the effect as shown in the figure :

http://127.0.0.1


Closing mode , The way to cooperate with this is to close... With the task manager ~
notes : nginx After startup , There are two in task management nginx Process , This is normal , One is 1 A daemon 1 A working process , It has to be closed manually .
 Start mode - Double click directly
Second : Command line mode
hypothesis nginx stay d:/software/nginx Under the directory , Then you need to start... With the following command :

cmd
cd d:/software/nginx
d:
start nginx


The closing method also corresponds to it

nginx -s stop
 Start mode - Command line
If after startup , Unable to access , Or visit other pages , Usually because the port is occupied . Port occupied , Please refer to What if the port is occupied ?
It can be modified to other port numbers , Open nginx Under the directory conf/nginx.conf File , Then find listen 80, Change to 9090, close nginx Restart , You can access it through the following address :

http://127.0.0.1:9090/


notes : You can also restart with the following command

nginx -s reload
 Port number modification
Step 6 :

nginx.conf Configuration file

edit top fracture
nginx.conf yes nginx Core configuration file , There is also a lot of content , There are several main concerns for developers :
1. Port number

listen 80;

This is Port number modification It has been mentioned in

2. Page storage location :

root html;

Indicates that all pages are stored in nginx of html Under the directory

3. Welcome page

index index.html index.htm;

By default, you will access index.html Or index.htm File


The official account of programming , Follow and get the latest tutorials and promotions in real time , thank you .


Q & A area    
2021-07-19 Why do I use localhost You can access , But with 127.0.0.1 You can't access ?
AbCdEFf

Why do I use localhost You can access , But with 127.0.0.1 You can't access ?




1 One answer

Moon hugging wind
Answer time :2021-10-04
hosts No mapping added to file



The answer has been submitted successfully , Auditing . Please My answer Check the answer record at , thank you
answer Or code please Fill in at least one , If you have a problem , Please ask again , Otherwise, the webmaster may not see




2021-01-26 Download webmaster's can't start successfully , Go nginx Download from the official website 1.18.0 Version started successfully !
office worker

As the title , I don't know why , It has nothing to do with the port




1 One answer

AbCdEFf
Answer time :2021-07-13
fucking great !! Sure enough !!!



The answer has been submitted successfully , Auditing . Please My answer Check the answer record at , thank you
answer Or code please Fill in at least one , If you have a problem , Please ask again , Otherwise, the webmaster may not see




2021-01-22 Be sure to switch to NginX Can I start and close my directory like this ?
2019-12-17 Start nigix Failure
2019-07-29 If the worker threads are closed , Won't the daemon shut down automatically ?


Too many questions , Page rendering is too slow , To speed up rendering , Only a few questions are displayed on this page at most . also 5 Previous questions , please Click to view

Please... Before asking questions land
The question has been submitted successfully , Auditing . Please My question Check the question record at , thank you
about Tools and Middleware -Nginx- introduction Your questions

Try to provide Screenshot code and Abnormal information , Help to analyze and solve problems . You can also enter this station QQ Group communication : 496725845
Ask questions and try to provide complete code , Environment description , The more conducive to the recurrence of the problem , The faster your question can be answered .
Have questions about the code in the tutorial , Please provide which step , Which line is in doubt , This makes it easy to quickly locate the problem , Improve the speed at which questions are answered
In the thousands of questions that already exist , A considerable proportion , Because of the use of and webmaster Different versions of the development environment Resulting in , For example jdk, eclpise, idea, mysql,tomcat Wait, the version of the software is inconsistent .
Please use the same version as the webmaster , You can save yourself a lot of learning time . The webmaster sorted out the software versions used in teaching , It's all here , Convenient for everyone to download : /k/helloworld/helloworld-version/1718.html

Upload screenshot