- Make sure instance is allowing HTTP traffic through the SecurityGroup (Type:
HTTP, Protocol:TCP, Port Range:80, Source:0.0.0.0/0on EC2. Note: THIS CAN ONLY BE DONE WHEN YOU ARE SETTING UP THE IMAGE - SSH into the machine:
ssh -i [MYCREDS].pem ubuntu@[public ip] - Install whatever packages/Python you need
- Redirect HTTP traffic from port 80 to another port greater than 1024. 8080 is a common choice:
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
-
Use screen so that it keeps running after you disconnect ssh:
screen -s rodeo -
Run Rodeo on the server headlessly:
rodeo . --host=0.0.0.0 --port=8080 --no-browser
- Exit the screen using
ctrl-athenctrl-d(you can reconnect from ssh usingscreen -r rodeo.-rconnects to existing session,-screates a new one). - Exit ssh by typing
exit - In the browser on your local machine, head to
http://[The Machine's Public IP from the EC2 console]