--- type: video yt_id: VVU2YVRMdUlfajQtMHdpRFN6bWFQY3RRLl9FQkFScXJlZWFv videoId: _EBARqreeao title: "Nginx Reverse Proxy on AWS EC2 Amazon Linux 2" date: "2021-09-19T01:30:21Z" slug: "nginx-reverse-proxy-on-aws-ec2-amazon-linux-2" image: name: "nginx-reverse-proxy-on-aws-ec2-amazon-linux-2.jpg" alt: "Nginx Reverse Proxy on AWS EC2 Amazon Linux 2" width: 1280 height: 720 status: 'published' description: "Install and set up an nginx reverse proxy on an Amazon Linux 2 ec2 instance." tags: ['aws', 'cloud computing'] previousPostSlug: 'deploy-node-app-on-aws-ec2-amazon-linux-2' nextPostSlug: 'mysql-on-aws-ec2-amazon-linux-2' --- Install and set up an nginx reverse proxy on an Amazon Linux 2 ec2 instance. ## nginx links: * https://www.nginx.com/blog/setting-up-nginx/ * https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus/ * http://nginx.org/en/docs/http/configuring_https_servers.html ## Code ``` sudo amazon-linux-extras install nginx1 -y sudo systemctl enable nginx sudo systemctl start nginx ``` ``` sudo vim /etc/nginx/nginx.conf ``` ``` server { location / { proxy_pass http://localhost:8080; } } ```