English + हिन्दी | TechWithAdi
Nginx is a high-performance web server, reverse proxy and load balancer.
A reverse proxy receives requests from users and forwards them to backend applications.
sudo apt install nginx -y
sudo systemctl status nginx
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
sudo nginx -t
sudo systemctl restart nginx
High-performance web server and reverse proxy.
Forwards client requests to backend servers.
Nginx uses event-driven architecture.
Directive used to forward requests.
nginx -t
systemctl restart nginx
Distributes traffic across servers.
Handles SSL at proxy layer.
Equivalent to Apache VirtualHost.
Usually /etc/nginx/nginx.conf
Check access.log and error.log
Defines backend servers.
Using gzip directives.
Stores content for faster delivery.
Using return 301 directive.
Backend service unavailable.
Use SSL, firewall and updates.
systemctl reload nginx
Monitoring, SSL and backups.
Client → Nginx → Backend → Client.
Nginx एक high-performance web server और reverse proxy है।
sudo apt install nginx -y
High-performance web server और reverse proxy।
Client requests backend servers को forward करता है।
Nginx event-driven architecture उपयोग करता है।
Request forwarding directive।
nginx -t
systemctl restart nginx
Traffic distribute करना।
SSL handling proxy layer पर।
Apache VirtualHost जैसा।
/etc/nginx/nginx.conf
access.log और error.log
Backend servers define करता है।
gzip directives से।
Content cache करना।
return 301
Backend unavailable।
SSL, firewall और updates।
systemctl reload nginx
Monitoring, SSL, backups।
Client → Nginx → Backend → Client।