Skip to content

nginx

Course: AWS Deploying (EC2) - chapter 7

https://www.nginx.com/resources/glossary/nginx/

Terminal window
sudo apt update
sudo apt install nginx

This should start a nginx server on port 80

Try visiting the website

Terminal window
sudo rm sudo vi /etc/nginx/nginx.conf
sudo vi /etc/nginx/nginx.conf
Terminal window
events {
# Event directives...
}
http {
server {
listen 80;
server_name be1.100xdevs.com;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
}
Terminal window
sudo nginx -s reload
Terminal window
node index.js
Terminal window
https://be1.100xdevs.com/