Change IP address from localhost 127.0.0.1 to AWS EC2 xxx.xxx.xxx.xxx

26 views
Skip to first unread message

Andreas Abrahamsson

unread,
Jun 12, 2019, 8:54:13 PM6/12/19
to django-oscar
Hi, 
I successfully installed Oscar on an EC2 instance, but starting the ecommerce service I get:

"Starting development server at http://127.0.0.1:8000/"

How do I change the IP address to my EC2 instance's instead? There is no documentation about this anywhere.

Regards
Andreas

Frantchesco Cecchin

unread,
Jun 13, 2019, 7:36:16 AM6/13/19
to django-oscar
.\manage.py runserver 0.0.0.0:8080

Be sure you have set EC2 security groups and inbound rules. Also, you need to set ALLOWED_HOSTS to '*'

Anthony RICAUD

unread,
Jun 13, 2019, 8:18:44 AM6/13/19
to django-oscar
Hi Andreas,

You should not use `./manage.py runserver` on a server. This is only for development purposes as explained in the Django docs:

DO NOT USE THIS SERVER IN A PRODUCTION SETTING. It has not gone through security audits or performance tests. (And that’s how it’s gonna stay. We’re in the business of making Web frameworks, not Web servers, so improving this server to be able to handle a production environment is outside the scope of Django.)

You should dive into the Django deployment docs, specifically How to deploy with WSGI.

Cheers,
Anthony.

Andreas Abrahamsson

unread,
Jun 14, 2019, 2:15:47 PM6/14/19
to django-oscar
Hi guys and thanks for your replies. I just want to deploy it and play around with it. We are currently using Open edX and its Oscar, but it appears to lack a number of great features from the stock version. We therefor consider using Oscar standalone, hence the reason for this deployment. I want to compare the two versions side by side. 

Thanks for the links. I'll dive into the documentation at once. :) 

Regards
Andreas

 
Reply all
Reply to author
Forward
Message has been deleted
0 new messages