NGINX Web App ProjectšŸ˜

NGINX Web App ProjectšŸ˜

Ā·

3 min read

What is NGINX?

A simple web server to serve web files.

why nginx?

NGINX is a popular web server software that is used to serve web pages and applications to users over the internet. It is known for its speed, scalability, and reliability, making it a great choice for websites and applications that receive high traffic. NGINX is also flexible and can be used as a load balancer, reverse proxy, and HTTP cache.

What are the advantages of nginx?

NGINX has several advantages, including

1. Speed: NGINX is designed to handle a large number of requests quickly and efficiently, making it ideal for high-traffic websites and applications.

2. Scalability: NGINX can handle a large number of concurrent connections, and it can be easily scaled up or down as needed.

3. Reliability: NGINX is known for its stability and reliability, and it can handle a wide range of workloads without crashing or slowing down.

4. Flexibility: NGINX can be used as a load balancer, reverse proxy, and HTTP cache, making it a versatile tool for web developers and system administrators.

5. Security: NGINX has several security features built-in, including SSL/TLS encryption, DDoS protection, and rate limiting, which can help protect websites and applications from cyber-attacks.

Features of nginx?

NGINX has several features that make it a popular web server software, including:

1. Serving web files: NGINX is a simple web server that can serve web files.

2. Load balancing: NGINX can distribute incoming traffic across multiple servers to improve performance and prevent overload.

3. Reverse proxying: NGINX can act as a reverse proxy, forwarding requests from clients to servers.

4. HTTP caching: NGINX can cache frequently requested content to improve website performance.

5. SSL/TLS encryption: NGINX supports secure connections using SSL/TLS encryption.

6. DDoS protection: NGINX can protect websites and applications from DDoS attacks.

7. Rate limiting: NGINX can limit the number of requests from clients to prevent overloading the server.

Hands-on:

create instance:

sudo apt-get update

sudo apt install nginx

systemctl status nginx

sudo systemctl restart nginx

go to the incognito tab and paste here your public IP just to check whether nginx is installed or not

cd /var/www/html

cd /etc/nginx

sudo apt-get install docker.io

docker ps

sudo usermod -aG docker $USER

sudo reboot

git clone https://github.com/LondheShubham153/django-notes-app.git

docker build -t notes-app .

docker run -d -p 8000:8000 notes-app:latest

docker ps

curl -L http://127.0.0.1:8000

cd /etc/nginx/sites-enabled

proxy_pass http://127.0.0.1:8000;

sudo systemctl restart nginx

sudo cp -r * /var/www/html/

curl -L http://127.0.0.1;8000/api

cd /etc/nginx/sites-enabled/

Thank you for reading this blog! I hope you like it if you like then please like my blog **********

Safia khatoon

Ā