vendredi 2 janvier 2015

Web2Py on AWS EC2 Linux

I have an instance running Linux at Amazon AWS EC2 after carefully following the instructions provided by Amazon here: http://ift.tt/1DcKsvd. I have set-up the security groups as mentioned in the documentation provided by Amazon.


The default security group has all traffic, all protocols, on all ports open.


In addition to the above security rule, I have setup SSH on port 22 and then, using CyberDuck (a great FTP app), I have uploaded the Web2Py source code into a folder named web2py at AWS. After successfully FTP the source code into this web2py folder, I have SSH'ed into the AWS machine using the Terminal (on Mac locally) having the my-keys-file.pem on hand:


ssh -i my-keys-file.pem ec2-user@ec2-xx-xx-xx-xx.compute-1.amazonaws.com


(where the xx are the numbers in the Public DNS as they appear on my instance on EC2 page)


Then I have checked whether my AWS instance has python installed and it does have it. Thus, I have proceeded to install Web2Py.


python2.6 web2py.py password = pwd it warns that GUI not available since Tlk library is not installed, but Massimo says here (http://ift.tt/14iXH1W) that it's not critical.


Running the Web2Py .... 1. If I try:


python web2py.py -a pwd -i 0.0.0.0 -p 80


It says: there is an error with the Rocket Server with that specific port (used by another process that is not willing to share...)



  1. If I try:


python web2py.py -a pwd


it says nothing (which begs the question: is web2py running ?) and when I try to access the web2py server http://ift.tt/1pJELxe or http://ift.tt/14iXJqw in both cases it says page is not available since it takes too long to access it (nothing about security cause).



  1. If I try:


python web2py.py -a pwd -i 0.0.0.0 -p 8000


again - it says nothing (is web2py running ?) trying to access the Web2Py server at http://ift.tt/1pJELxe or http://ift.tt/14iXJqw in both cases it says page is not available, same as above.



  1. I have tried to use the IP address instead, but it is immediately translated to the amazon format of ec2-xx-xx-xx-xxx.etc...

  2. I have tried to access web2py by explicitly mentioning the port (8000) in the address - still it doesn't work while giving no reason except page is not available


My questions: 1. Is there any DETAILED recipe on how to install AND run Web2Py on AWS EC2 ? 2. Is the web2py server running ? How can I know if it is running ? If it is not - what am I doing incorrectly ? 3. If the web2py server is running how can I access it ?


Any help would be much appreciated. Thanks





1 commentaire:

  1. Use Web2py hosted on Turnkey Linux:
    https://aws.amazon.com/marketplace/pp/B009I68K0E

    RépondreSupprimer