Reputation: 677
This issue might seem very trivial but please try to suggest a solution for this if possible. I have deployed a django App on AWS ec2 host and I am able to run the following command successfully.
(venv)[ec2-user@ip-xxx-xx-xx-xx abc]$ python manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
January 03, 2016 - 13:15:31
Django version 1.7.1, using settings 'abc.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
But I am not able to access http://127.0.0.1:8000/ from the browser. On googling it's suggesting to use nginx or gunicorn. I am not sure if nginx, gunicorn etc. are to be used for this.
Can someone please let me know how can this be accessed from browser ? Thanks,
Upvotes: 3
Views: 5617
Reputation: 3364
In order to archive this all you need to do 3 simple steps.
Open any web browser(from any device) and open the link 'public IPv4':8000
No need any app servers like Apache, NginX..
Upvotes: 5
Reputation: 8897
You need to open HTTP port in AWS instance menu.(all ports except ssh closed in AWS)
Go to your console.aws.amazon.com, then pick your instance and go to last menu item "security groups". It lauch wizard, click on "Inbound" in bottom menu, then "edit", and add HTTP or any port what you want :)
And be sure you using your public AWS IP, to open in browser
Add some screen for you, hope it help:
Upvotes: 12
Reputation: 4268
@Baterson is right. You should open port 8000 for your server first.
Official document is here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html . It is highly detailed.
Upvotes: 0