0
votes

I set up a web2py server on my Amazon EC2 instance (Ubuntu), but I can't reach it even though on my personal machine. I can however reach Apache from it. Here were the steps I took:

This one step deployment from web2py website

wget http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
chmod +x setup-web2py-ubuntu.sh
sudo ./setup-web2py-ubuntu.sh

Edited my EC2 Inbound traffic rules to accept traffic on port 8000 and 80

Then I run sudo python web2py.py and add the password when prompted and it prints out that it's running.

I then take the public dns for my server from the AWS management console and append the port(8000) to the domain name.

I also checked that I'm listening on the appropriate ports.

I also tried to start web2py.py with

sudo python web2py.py --ip 0.0.0.0 -p 8000 

in order to get it listening on all available ips on port 8000. However it tells me to check 127.0.0.1:8000. I wonder if it's still not picking up requests from the public ip that ec2 gives you.

It's probably something simple I missed, thanks!

2

2 Answers

0
votes

To troubleshoot this, install the Lynx text-based browser on the ec2 machine, then while ssh'ed into the machine try lynx http://127.0.0.1:8000. This will give you an idea whether the problem is in the network / security configuration or the web2py server configuration.

0
votes

Trying appending :8000 to the Public IP address, rather than the Public DNS.