Linux serverlinux web serverNETWORK ADMINISTRATIONS

Nginx Reverse Proxy on AWS EC2 Amazon Linux 2

Install and set up an nginx reverse proxy on an Amazon Linux 2 ec2 instance.

🔗Other tutorials:
MySQL on AWS EC2 Amazon Linux 2: https://youtu.be/N9DwaThhpsg
Deploy Node app on AWS EC2 Amazon Linux 2: https://youtu.be/oHAQ3TzUTro
Setting Up And Deploying AWS EC2 Instances: https://youtu.be/GEVbYQWWJkQ

🔗Moar Links
My Website: https://www.sammeechward.com
Instagram: https://www.instagram.com/meech_ward
Github: https://github.com/orgs/Sam-Meech-Ward

🔗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;
}
}
“`

source

by Sam Meech-Ward

linux web server

20 thoughts on “Nginx Reverse Proxy on AWS EC2 Amazon Linux 2

  • Hi sam i am having issues with CORS when i did the reverse proxy

  • sudo: amazon-linux-extras: command not found

    How to install nginx on Amazon Linux 2023:
    `sudo dnf install -y nginx`

  • shame, was hoping this was for NGINX PROXY MANAGER

  • I have a question here. So why you can access the NodeJS app via the IP of the EC2 of the enginx on port 8080 like that, cause the NodeJS app not running in the EC2 instance of the enginx at 4:18

  • My sincere gratitude! 🫡🙏🙏✅✅ For me I needed to include proxy params and add a couple sites available dirs but this video undoubtedly set me on the right path.

  • gj Sam

    Given a domain name and HTTPS certificate,
    is this enough to replace web hosting providers for some apps?

  • The video is very great (simple, easy to follow and it worked). But just a newbie question maybe, is there a benefit to doing this instead of say using a Load Balancer to listen to PORT 80 and redirect it to your app's specific port instead? TYIA!

  • Followed all the steps but receiving permission denied. What am I doing wrong?

  • Okay that was good. Thank you

  • in video screen u look like jesus man most helpful video to me ur jesus to me

  • Thank you very much for this video, was searching for this for a quite a long while

  • sam you're spoilling the silmarillion

  • I was searching since from 5 hours.. you just solved my problem in 10 min! really thanks

  • You're a fucking legend mate. Finally able to spin up my app on aws thanks to this tutorial.

Comments are closed.