Below are few major features of Nginx
Q1. What is nginx?
Nginx is a free open-source HTTP web server that can be also used as a reverse proxy, load balancer, mail proxy, and HTTP cache. It was written by Igor Sysoev in the year 2004. Nginx was initially released on 4 October 2004 and written in C programming language.
Q2. In which language nginx is written.
Nginx is written in C programming Language.
Q3. List some features of nginx?
Major Features of Nginx are
Q4. What is default port of nginx?
Port 80 is default port on nginx server.
Q5. What is C10K problem?
C10k is a numeronym for concurrently handling ten thousand connections. C10k problem refers to the problem of optimizing network sockets to handle a large number of clients at the same time.
Q6. List some important commands used on nginx?
Below is the list of some important commands used on Nginx
|systemctl reload nginx||Used to reload the setting of Nginx Server||
sudo systemctl reload nginx Or sudo service reload nginx
|nginx -t||Used to test the configuration changes of Nginx Server||
sudo nginx -t
|nginx -v||Used to check the version of Nginx Server||
sudo nginx -v
|systemctl restart nginx||Used to restart Nginx Server||
sudo systemctl restart nginx
|service nginx status||Used to check the status of Nginx Server||
sudo service nginx status
Q7. How to start and stop nginx server?
Run the below command to start Nginx server:
sudo systemctl start nginx
If you are running a Linux distribution without systemd then you can use
sudo service start nginx
Run the below command to stop Nginx server:
sudo systemctl stop nginx
Q8. What is worker process in Nginx?
Worker Process (a single-threaded process) is used to tune the performance of the Nginx server. If Nginx is doing CPU-intensive work such as SSL or gzipping and you have 2 or more CPUs/cores, then you may set worker_processes to be equal to the number of CPUs or cores.
Q9. What is the purpose of -s With Nginx Server?
The purpose of option -s With Nginx Server is used to send a signal to stop, quit, reopen or reload the server.
Q10. How to reload configuration file of Nginx server?
Run below command to reload configuration file of Nginx server
sudo service nginx reload or sudo /etc/init.d/nginx reload
Q11. Is Nginx better than Apache?
In term of speed, serving static content,number of concurrent connections, OS support, security, and flexibility Yes Nginx much better than Apache.
Q12. What are directive in Nginx? List few.
Directives are configuration options in Nginx. Each option has name and parameters and must end with a semicolon (;).Directives are used to control Modules and divided into simple directives and block directives.
Below is the list of few Nginx Directives:
Q13. What is Nginx reverse proxy?
A reverse proxy is an intermediary proxy service that takes a client request, passes it on to one or more servers, and subsequently delivers the server's response to the client. A common reverse proxy configuring is to put Nginx in front of an Apache webserver.
Q14. How to install Nginx on ubuntu?
Nginx can be installed using the apt packaging system.
$ Sudo apt install Nginx //this command is used to install Nginx.
To enable the Nginx, use the following command. $ sudo ufw allow ‘Nginx HTTP’
Q15. What is use of ngx_http_upstream_module?
The ngx_http_upstream_module module is used to define groups of servers that can be referenced by the proxy_pass, fastcgi_pass, uwsgi_pass, scgi_pass, memcached_pass, and grpc_pass directives.
Q16. What is use of sub_filter directives in Nginx?
The Sub_filter directives are used to search and replace the content in response and a quick fix of stale date.
Start working with Landrick that can provide everything you need to generate awareness, drive traffic, connect.