Interview Questions For Nginx

What is nginx?

Nginx is an open source, fast, lightweight and high-performance web server which is used to serve static files, along with this it is also a reverse proxy server.

What are the differences between apache and nginx?

APACHE NGINX
Apache runs on various Unix systems such as Linux, BSD, etc. Nginx also runs on various unix systems but it has very limited support for windows.
It is a web server. It is both a web server as well as reverse proxy server
A single thread in apache can handle only 1 connection. A single thread in nginx can easily handle multiple connections.
Its performance is slow as compared to nginx. Its performance is fast and it consumes less memory
It cannot handle multiple client request It can handle multiple client request

How can we start nginx instead of port no. 80 to some another port?

To start Nginx on a different port, go to /etc/Nginx/sites-enabled/ and if this is the default file, then you have to open file called “default.” Edit the file and put the port you want

Like server { listen 81; }

Explain the process of -t with nginx?

-t in nginx is for testing the configuration, that weather the configuration that we have created is correct or not.

Mention two special features of nginx?

Special features of nginx are:-
a) Reverse proxy
b) Load balancing

Subscribe Now