Web server - Can Nginx be understood as a framework, and what programs are running on it?
阿神
阿神 2017-05-16 17:15:37
0
3
591

There are really too many things in the web, there are many kinds of frameworks, there are also web containers, web servers, so many terms, it is simply a nightmare for novices. . .
It took me a day to get a little clearer,

1, in fact, these so-called frameworks are nothing more than some encapsulation, providing interfaces for us to use.

2. Should the web container be regarded as a running environment or compiler? Used to generate html files.

3. The concept of web server is too broad and it feels unclear. . .

4. Closer to home, should Nginx belong to the framework? Or is it an application in itself? Also, do you use C to develop on Nginx? (Note, this does not mean what language Nginx itself is developed in), but what language is the program running on Nginx developed in? Can I only use C?

5. What does Nginx development mean? If it is an application itself, develop an application on top of the application?

I don’t know which of the above 5 points are correct, they may all be wrong. . . I hope you guys can help me, a newbie who wants to learn web

阿神
阿神

闭关修行中......

reply all(3)
漂亮男人
  1. I totally agree with you

  2. A web container is an application that uses http in the application layer to transmit data in various formats, such as html, and the browser will process it separately according to the data type

  3. The concept of web server is not big. It can be generally understood as a naked http service, but this http service transmits web-related data

  4. Nginx is located at the top of the network and belongs to an application. C development, which supports secondary development of modules.

  5. Nginx development should refer to the development of plug-ins. nginx also has an http module, but this http module is a default universal module. If you need to customize your own http module, you need to use C secondary development. We have a need to verify the legitimacy of the request. Our approach is to have an encrypted string in the header of each http request, and then decrypt it through the nginx http module we wrote ourselves. If it is incorrect, block it, which is invalid. The request will not enter our business server. Another situation that is also the most common is to use Lua to write nginx extensions. For example, when releasing a new version for grayscale release, we want to import a small amount of user traffic into the new server. When the test shows no problem, we will import all the traffic. This will do. Use Lua script to implement it and write an nginx component to achieve your personalized needs. Of course, the nginx framework itself provides some low-level APIs, so when writing plug-ins, you only need to focus on your logic and not the underlying implementation.

nginx development is like writing a class method for a class

巴扎黑

The framework extracts codes and patterns commonly used in development, and does not require programmers to create them manually

A web container is a virtual machine

A web server is a software process that processes network requests and returns various texts. For example, the most common one is to return html text when encountering an http request

nginx is a proxy server. Web server processes implemented in various languages ​​can still process network requests and spit back corresponding texts without nginx. The function of nginx is simply to filter various network requests and throw them to these corresponding web The server process then uses the text spit back by these web servers as the text it spits back when processing network requests. Well, nginx is also a web server process

As mentioned above, nginx can communicate with any process that can handle network socket requests, so it doesn’t matter what language nginx is developed in, unless you want to expand the functions of nginx itself, then use c and lua

淡淡烟草味

It is a server similar to Apache. The back-end programming language relies on the server to build the operating environment. It can be understood as a service, not a program

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!