week 11.2 aws | nginx
https://projects.100xdevs.com/tracks/g0AcDSPl74nk45ZZjRdU/aws-7
first transfer permition of this fle
chmod 700 fileName.pem
get access of your instances
ssh -i fileName.pem ubuntu@publicIP
clone your code in aws machine
git clone https://github.com/luciferdk/auth0backend.git
for then when our connection lost or server stuck on our terminal
sudo vi /etc/resolve.conf and write nameserver 8.8.8.8
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
//reverse proxy
sudo apt update
sudo apt install nginx sudo rm /etc/nginx/nginx.cong
sudo vi /etc/nginx/nginx.cong
//write this code and modified server_name and localhostevents {
# 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;
}
}
}
Copy
sudo nginx -s reload
Comments