Required Skills for Test Architects - Nginx Installation and Deployment

Nginx ("engine x") is a high-performance free open source web and reverse proxy server developed by Russian programmer Igor Sysoev, and is also an IMAP/POP3/SMTP proxy server. In the case of high concurrent access, Nginx is a good substitute for the Apache server. The official website data shows that the TPS per second is as high as about 50W. This article introduces the deployment and startup of nginx on the windows platform for readers and friends .

01. Download

Download at the official website address of nginx, and its official website address is as follows:

http://nginx.org/

Click on the current latest version nginx1.19.6 version link, and then jump to the following download address of nginx version 1.19.6 under Linux and Windows operating systems

We need to install nginx in the windows environment, so click "nginx/Windows-1.19.6", and then, as shown in the figure below, a small nginx download progress tab will appear at the bottom of the browser window, waiting for the nginx download to complete.

02. Installation

Unzip the downloaded file nginx-1.19.6.zip. Cut the decompressed file nginx-1.19.6 to a non-system disk.

As shown below, it is the directory structure of nginx , nginx.exe is the startup tool of nginx, the configuration file of nginx is in the conf directory, and the log files of nginx are stored in the logs directory.

现在我也找了很多测试的朋友,做了一个分享技术的交流群,共享了很多我们收集的技术文档和视频教程。
如果你不想再体验自学时找不到资源,没人解答问题,坚持几天便放弃的感受
可以加入我们一起交流。而且还有很多在自动化,性能,安全,测试开发等等方面有一定建树的技术大牛
分享他们的经验,还会分享很多直播讲座和技术沙龙
可以免费学习!划重点!开源的!!!
qq群号:110685036

 

03. Start

There are many ways to start. You can double-click nginx.exe in the nginx decompression directory to start nginx. A flashing window will appear, which is normal, indicating that the nginx server has been started;

You can also enter the command nginx in the cmd command window, use the command to reach the compressed directory of nginx, and then enter the nginx command, as shown below:

Enter the address in the browser address box:

Then the browser displays the following information, indicating that nginx started successfully

04. Configuration

(1) Modify the port number

In nginx.conf under the conf directory, the default configured nginx monitor port is 80. If port 80 is occupied, it can be changed to an unoccupied port.

Notice:

  • The command to check whether port 80 is occupied is: netstat -ano | findstr "80"
  • When we modify the nginx configuration file nginx.conf, there is no need to restart nginx after closing nginx, just execute the command nginx -s reload to make the changes take effect.

(2) Configure static resources

Create a new static directory under the decompressed nginx directory, and copy and paste a picture resource 1.jpg in this directory:

Then in the nginx.conf configuration file, root modifies the relative path to static, as shown below:

Then execute the command nginx -s reload to make the modification take effect, and then enter the access address in the browser address bar: http://localhost/1.jpg

05. stop

If you use the cmd command window to start nginx, closing the cmd window cannot end the nginx process. You can use the following three methods to close nginx:

  • Enter the nginx command
    nginx -s stop (stop nginx quickly) or nginx -s quit (stop nginx completely and orderly).
  • 使用taskkill
    taskkill /f /t /im nginx.exe
  • End the nginx task in the task manager

The above are the commonly used operation steps such as downloading, installing, starting, configuring, and stopping in the windows environment.

The following are supporting learning materials. For friends who do [software testing], it should be the most comprehensive and complete preparation warehouse. This warehouse also accompanied me through the most difficult journey. I hope it can help you too!

Software testing interview applet

The software test question bank maxed out by millions of people! ! ! Who is who knows! ! ! The most comprehensive quiz mini program on the whole network, you can use your mobile phone to do the quizzes, on the subway or on the bus, roll it up!

The following interview question sections are covered:

1. Basic theory of software testing, 2. web, app, interface function testing, 3. network, 4. database, 5. linux

6. web, app, interface automation, 7. performance testing, 8. programming basics, 9. hr interview questions, 10. open test questions, 11. security testing, 12. computer basics

Information acquisition method:

Guess you like

Origin blog.csdn.net/jiangjunsss/article/details/132362052